summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2018-11-27 11:35:19 -0500
committergarak <garakmon@gmail.com>2018-11-27 11:35:19 -0500
commit73cce797533c5985406b7b5696834b0976039c4f (patch)
treebcf7766a7a7ae0ad42bbfacd9566c219fe1d0fd3 /src
parent091b5194e7bfc6049931202d9712541083fd61cd (diff)
parentc909aa92dee0a8d202d9195d80d0cc96b0d1ebc8 (diff)
Merge remote-tracking branch 'upstream/master' into frontier-data
Diffstat (limited to 'src')
-rw-r--r--src/battle_anim_80A5C6C.c32
-rw-r--r--src/battle_anim_80D51AC.c6
-rw-r--r--src/battle_arena.c1
-rw-r--r--src/battle_bg.c22
-rw-r--r--src/battle_controller_link_opponent.c4
-rw-r--r--src/battle_controller_link_partner.c4
-rw-r--r--src/battle_controller_opponent.c4
-rw-r--r--src/battle_controller_player.c10
-rw-r--r--src/battle_controller_player_partner.c4
-rw-r--r--src/battle_controller_recorded_opponent.c4
-rw-r--r--src/battle_controller_recorded_player.c4
-rw-r--r--src/battle_controller_wally.c2
-rw-r--r--src/battle_dome.c16
-rw-r--r--src/battle_interface.c102
-rw-r--r--src/battle_main.c6
-rw-r--r--src/battle_message.c55
-rw-r--r--src/battle_pyramid.c6
-rw-r--r--src/berry.c6
-rw-r--r--src/bg.c1195
-rw-r--r--src/bug.c317
-rw-r--r--src/cable_club.c12
-rw-r--r--src/contest_ai.c2
-rw-r--r--src/data/pokemon/pokedex_entries.h3873
-rw-r--r--src/data/pokemon/pokedex_text.h2321
-rw-r--r--src/data/pokemon_graphics/back_pic_coordinates.h700
-rw-r--r--src/data/pokemon_graphics/footprint_table.h416
-rw-r--r--src/data/pokemon_graphics/front_pic_coordinates.h716
-rw-r--r--src/dewford_trend.c3
-rw-r--r--src/dragon.c269
-rw-r--r--src/effects_1.c4
-rw-r--r--src/field_effect.c312
-rwxr-xr-xsrc/field_effect_helpers.c297
-rw-r--r--src/fight.c681
-rw-r--r--src/frontier_util.c1034
-rw-r--r--src/graphics.c6
-rw-r--r--src/ground.c655
-rw-r--r--src/map_name_popup.c234
-rw-r--r--src/poison.c154
-rw-r--r--src/pokeball.c4
-rw-r--r--src/pokedex.c502
-rw-r--r--src/rock.c615
-rw-r--r--src/rom_8011DC0.c6
-rwxr-xr-xsrc/script_pokemon_util_80F87D8.c707
-rw-r--r--src/strings.c464
-rw-r--r--src/text.c1059
45 files changed, 12843 insertions, 4003 deletions
diff --git a/src/battle_anim_80A5C6C.c b/src/battle_anim_80A5C6C.c
index d8e422bb5..2ac6cca90 100644
--- a/src/battle_anim_80A5C6C.c
+++ b/src/battle_anim_80A5C6C.c
@@ -36,9 +36,7 @@ extern const union AffineAnimCmd *gUnknown_082FF6C0[];
// This file's functions.
void sub_80A64EC(struct Sprite *sprite);
void sub_80A653C(struct Sprite *sprite);
-void InitAnimLinearTranslation(struct Sprite *sprite);
void sub_80A6FB4(struct Sprite *sprite);
-void sub_80A6F98(struct Sprite *sprite);
void sub_80A7144(struct Sprite *sprite);
void sub_80A791C(struct Sprite *sprite);
void sub_80A8DFC(struct Sprite *sprite);
@@ -50,8 +48,6 @@ void sub_80A7AFC(u8 taskId);
void sub_80A8CAC(u8 taskId);
void AnimTask_BlendMonInAndOutStep(u8 taskId);
bool8 sub_80A7238(void);
-void sub_80A8048(s16 *bottom, s16 *top, const void *ptr);
-void *sub_80A8050(s16 bottom, s16 top);
u8 sub_80A82E4(u8 battlerId);
void sub_80A8D78(struct Task *task, u8 taskId);
@@ -532,7 +528,7 @@ void sub_80A6450(struct Sprite *sprite)
// Simply waits until the sprite's data[0] hits zero.
// This is used to let sprite anims or affine anims to run for a designated
// duration.
-void sub_80A64B0(struct Sprite *sprite)
+void WaitAnimForDuration(struct Sprite *sprite)
{
if (sprite->data[0] > 0)
sprite->data[0]--;
@@ -745,7 +741,7 @@ void sub_80A6864(struct Sprite *sprite, s16 a2)
}
}
-void sub_80A68D4(struct Sprite *sprite)
+void InitAnimArcTranslation(struct Sprite *sprite)
{
sprite->data[1] = sprite->pos1.x;
sprite->data[3] = sprite->pos1.y;
@@ -791,7 +787,7 @@ void sub_80A6980(struct Sprite *sprite, bool8 a2)
sprite->pos1.y += gBattleAnimArgs[1];
}
-void sub_80A69CC(struct Sprite *sprite, u8 a2)
+void InitAnimSpritePos(struct Sprite *sprite, u8 a2)
{
if (!a2)
{
@@ -1004,12 +1000,12 @@ void sub_80A6DEC(struct Sprite *sprite)
{
sprite->data[1] = sprite->pos1.x;
sprite->data[3] = sprite->pos1.y;
- sub_80A6E14(sprite);
+ InitSpriteDataForLinearTranslation(sprite);
sprite->callback = sub_80A65A8;
sprite->callback(sprite);
}
-void sub_80A6E14(struct Sprite *sprite)
+void InitSpriteDataForLinearTranslation(struct Sprite *sprite)
{
s16 x = (sprite->data[2] - sprite->data[1]) << 8;
s16 y = (sprite->data[4] - sprite->data[3]) << 8;
@@ -1047,7 +1043,7 @@ void InitAnimLinearTranslation(struct Sprite *sprite)
sprite->data[3] = 0;
}
-void sub_80A6EEC(struct Sprite *sprite)
+void StartAnimLinearTranslation(struct Sprite *sprite)
{
sprite->data[1] = sprite->pos1.x;
sprite->data[3] = sprite->pos1.y;
@@ -1476,7 +1472,7 @@ void sub_80A77C8(struct Sprite *sprite)
else
var = FALSE;
if (!gBattleAnimArgs[2])
- sub_80A69CC(sprite, var);
+ InitAnimSpritePos(sprite, var);
else
sub_80A6980(sprite, var);
sprite->data[0]++;
@@ -1511,27 +1507,27 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
else
attributeId = BATTLER_COORD_Y;
- sub_80A69CC(sprite, v1);
+ InitAnimSpritePos(sprite, v1);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, attributeId) + gBattleAnimArgs[3];
- sprite->callback = sub_80A6EEC;
+ sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
void sub_80A78AC(struct Sprite *sprite)
{
- sub_80A69CC(sprite, 1);
+ InitAnimSpritePos(sprite, 1);
if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
sprite->data[5] = gBattleAnimArgs[5];
- sub_80A68D4(sprite);
+ InitAnimArcTranslation(sprite);
sprite->callback = sub_80A791C;
}
@@ -1558,7 +1554,7 @@ void sub_80A7938(struct Sprite *sprite)
}
if (!gBattleAnimArgs[5])
{
- sub_80A69CC(sprite, r4);
+ InitAnimSpritePos(sprite, r4);
battlerId = gBattleAnimAttacker;
}
else
@@ -1572,7 +1568,7 @@ void sub_80A7938(struct Sprite *sprite)
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
sprite->data[4] = GetBattlerSpriteCoord(battlerId, attributeId) + gBattleAnimArgs[3];
- sprite->callback = sub_80A6EEC;
+ sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
@@ -2454,6 +2450,6 @@ void sub_80A8EE4(struct Sprite *sprite)
sprite->pos1.x += x;
sprite->pos1.y = gBattleAnimArgs[5] - 80;
}
- sprite->callback = sub_80A6EEC;
+ sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
diff --git a/src/battle_anim_80D51AC.c b/src/battle_anim_80D51AC.c
index 1864a1a7a..25e07dc3a 100644
--- a/src/battle_anim_80D51AC.c
+++ b/src/battle_anim_80D51AC.c
@@ -442,7 +442,7 @@ void SlideMonToOriginalPos(struct Sprite *sprite)
sprite->data[2] = gSprites[monSpriteId].pos1.x;
sprite->data[3] = gSprites[monSpriteId].pos1.y + gSprites[monSpriteId].pos2.y;
sprite->data[4] = gSprites[monSpriteId].pos1.y;
- sub_80A6E14(sprite);
+ InitSpriteDataForLinearTranslation(sprite);
sprite->data[3] = 0;
sprite->data[4] = 0;
sprite->data[5] = gSprites[monSpriteId].pos2.x;
@@ -520,7 +520,7 @@ void SlideMonToOffset(struct Sprite *sprite)
sprite->data[2] = gSprites[monSpriteId].pos1.x + gBattleAnimArgs[1];
sprite->data[3] = gSprites[monSpriteId].pos1.y;
sprite->data[4] = gSprites[monSpriteId].pos1.y + gBattleAnimArgs[2];
- sub_80A6E14(sprite);
+ InitSpriteDataForLinearTranslation(sprite);
sprite->data[3] = 0;
sprite->data[4] = 0;
sprite->data[5] = monSpriteId;
@@ -556,7 +556,7 @@ void sub_80D5B48(struct Sprite *sprite)
sprite->data[2] = sprite->data[1] + gBattleAnimArgs[1];
sprite->data[3] = gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y;
sprite->data[4] = sprite->data[3] + gBattleAnimArgs[2];
- sub_80A6E14(sprite);
+ InitSpriteDataForLinearTranslation(sprite);
sprite->data[3] = gSprites[spriteId].pos2.x << 8;
sprite->data[4] = gSprites[spriteId].pos2.y << 8;
sprite->data[5] = spriteId;
diff --git a/src/battle_arena.c b/src/battle_arena.c
index c686ed791..cd2c976da 100644
--- a/src/battle_arena.c
+++ b/src/battle_arena.c
@@ -15,6 +15,7 @@
#include "palette.h"
#include "random.h"
#include "sound.h"
+#include "string_util.h"
#include "text.h"
#include "util.h"
#include "constants/songs.h"
diff --git a/src/battle_bg.c b/src/battle_bg.c
index 51138040c..bb66a41fd 100644
--- a/src/battle_bg.c
+++ b/src/battle_bg.c
@@ -157,9 +157,9 @@ const struct BgTemplate gBattleBgTemplates[] =
},
};
-static const struct WindowTemplate gUnknown_0831AA18[] =
+static const struct WindowTemplate gStandardBattleWindowTemplates[] =
{
- {
+ { // 0 Standard battle message
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
@@ -168,7 +168,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 0,
.baseBlock = 0x0090,
},
- {
+ { // 1 "What will (pokemon) do?"
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 35,
@@ -177,7 +177,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 0,
.baseBlock = 0x01c0,
},
- {
+ { // 2 "Fight/Pokemon/Bag/Run"
.bg = 0,
.tilemapLeft = 17,
.tilemapTop = 35,
@@ -186,7 +186,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 5,
.baseBlock = 0x0190,
},
- {
+ { // 3 Top left move
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 55,
@@ -195,7 +195,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 5,
.baseBlock = 0x0300,
},
- {
+ { // 4 Top right move
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 55,
@@ -204,7 +204,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 5,
.baseBlock = 0x0310,
},
- {
+ { // 5 Bottom left move
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 57,
@@ -213,7 +213,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
.paletteNum = 5,
.baseBlock = 0x0320,
},
- {
+ { // 6 Bottom right move
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 57,
@@ -378,7 +378,7 @@ static const struct WindowTemplate gUnknown_0831AA18[] =
DUMMY_WIN_TEMPLATE
};
-static const struct WindowTemplate gUnknown_0831AAE0[] =
+static const struct WindowTemplate gBattleArenaWindowTemplates[] =
{
{
.bg = 0,
@@ -592,8 +592,8 @@ static const struct WindowTemplate gUnknown_0831AAE0[] =
const struct WindowTemplate * const gBattleWindowTemplates[] =
{
- gUnknown_0831AA18,
- gUnknown_0831AAE0,
+ gStandardBattleWindowTemplates,
+ gBattleArenaWindowTemplates,
};
static const struct BattleBackground gBattleTerrainTable[] =
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c
index 7589eb962..0cec046e4 100644
--- a/src/battle_controller_link_opponent.c
+++ b/src/battle_controller_link_opponent.c
@@ -1344,7 +1344,7 @@ static void LinkOpponentHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_8064470;
}
@@ -1706,7 +1706,7 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_80676FC);
diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c
index 04554a81b..04a3784da 100644
--- a/src/battle_controller_link_partner.c
+++ b/src/battle_controller_link_partner.c
@@ -1166,7 +1166,7 @@ static void LinkPartnerHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_814AF54;
}
@@ -1532,7 +1532,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c
index 72dfb7e6b..403cc5eed 100644
--- a/src/battle_controller_opponent.c
+++ b/src/battle_controller_opponent.c
@@ -1381,7 +1381,7 @@ static void OpponentHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_805F240;
}
@@ -1855,7 +1855,7 @@ static void OpponentHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_806280C);
diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c
index 3fabf25f8..49629198c 100644
--- a/src/battle_controller_player.c
+++ b/src/battle_controller_player.c
@@ -114,7 +114,7 @@ static void MoveSelectionDisplayPpNumber(void);
static void MoveSelectionDisplayPpString(void);
static void MoveSelectionDisplayMoveType(void);
static void MoveSelectionDisplayMoveNames(void);
-static void HandleMoveSwitchting(void);
+static void HandleMoveSwitching(void);
static void sub_8058FC0(void);
static void WaitForMonSelection(void);
static void CompleteWhenChoseItem(void);
@@ -617,7 +617,7 @@ static void HandleInputChooseMove(void)
MoveSelectionCreateCursorAt(gMultiUsePlayerCursor, 27);
BattlePutTextOnWindow(gText_BattleSwitchWhich, 0xB);
- gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitchting;
+ gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitching;
}
}
}
@@ -672,7 +672,7 @@ u32 sub_8057FBC(void) // unused
return var;
}
-static void HandleMoveSwitchting(void)
+static void HandleMoveSwitching(void)
{
u8 perMovePPBonuses[4];
struct ChooseMoveStruct moveStruct;
@@ -2385,7 +2385,7 @@ static void PlayerHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
StartSpriteAnim(&gSprites[gBattlerSpriteIds[gActiveBattler]], 1);
gBattlerControllerFuncs[gActiveBattler] = sub_80588B4;
@@ -2930,7 +2930,7 @@ static void PlayerHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c
index 0790cbbff..bd892c922 100644
--- a/src/battle_controller_player_partner.c
+++ b/src/battle_controller_player_partner.c
@@ -1361,7 +1361,7 @@ static void PlayerPartnerHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_81BAE98;
}
@@ -1785,7 +1785,7 @@ static void PlayerPartnerHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c
index 83c4965ea..b54e61255 100644
--- a/src/battle_controller_recorded_opponent.c
+++ b/src/battle_controller_recorded_opponent.c
@@ -1275,7 +1275,7 @@ static void RecordedOpponentHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_81865C8;
}
@@ -1649,7 +1649,7 @@ static void RecordedOpponentHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_818962C);
diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c
index cbb46a940..17b115caa 100644
--- a/src/battle_controller_recorded_player.c
+++ b/src/battle_controller_recorded_player.c
@@ -1276,7 +1276,7 @@ static void RecordedPlayerHandleTrainerSlideBack(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], SpriteCallbackDummy);
gBattlerControllerFuncs[gActiveBattler] = sub_81899F0;
}
@@ -1671,7 +1671,7 @@ static void RecordedPlayerHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c
index 922c5d80b..1a3a2d53d 100644
--- a/src/battle_controller_wally.c
+++ b/src/battle_controller_wally.c
@@ -1435,7 +1435,7 @@ static void WallyHandleIntroTrainerBallThrow(void)
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
- gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_80A6EEC;
+ gSprites[gBattlerSpriteIds[gActiveBattler]].callback = StartAnimLinearTranslation;
gSprites[gBattlerSpriteIds[gActiveBattler]].data[5] = gActiveBattler;
StoreSpriteCallbackInData6(&gSprites[gBattlerSpriteIds[gActiveBattler]], sub_805CC00);
diff --git a/src/battle_dome.c b/src/battle_dome.c
index c4cb24204..152a11ae8 100644
--- a/src/battle_dome.c
+++ b/src/battle_dome.c
@@ -63,9 +63,9 @@ extern u8 GetFrontierBrainMonNature(u8);
extern void sub_81A4C30(void);
extern u8 sub_81A3610(void);
extern u16 GetFrontierBrainMonSpecies(u8);
-extern void ReducePlayerPartyToThree(void);
+extern void ReducePlayerPartyToSelectedMons(void);
-extern u8 gUnknown_0203CEF8[];
+extern u8 gSelectedOrderFromParty[];
extern const u16 gBattleFrontierHeldItems[];
extern const struct FacilityMon gBattleFrontierMons[];
@@ -2465,8 +2465,8 @@ static void sub_818EA84(void)
break;
case 8:
sub_81B8558();
- gUnknown_0203CEF8[0] = gSaveBlock2Ptr->frontier.field_CB0;
- gUnknown_0203CEF8[1] = gSaveBlock2Ptr->frontier.field_CB0 >> 8;
+ gSelectedOrderFromParty[0] = gSaveBlock2Ptr->frontier.field_CB0;
+ gSelectedOrderFromParty[1] = gSaveBlock2Ptr->frontier.field_CB0 >> 8;
break;
case 9:
gSpecialVar_Result = (gSaveBlock2Ptr->frontier.field_D0A * 2) - 3 + gSaveBlock2Ptr->frontier.field_D0B;
@@ -2535,7 +2535,7 @@ static void sub_818ED28(void)
}
break;
case 8:
- gSaveBlock2Ptr->frontier.field_CB0 = T1_READ_16(gUnknown_0203CEF8);
+ gSaveBlock2Ptr->frontier.field_CB0 = T1_READ_16(gSelectedOrderFromParty);
break;
}
}
@@ -6070,7 +6070,7 @@ static void sub_8194D68(void)
for (i = 0; i < 2; i++)
{
- s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gUnknown_0203CEF8[i] - 1] - 1;
+ s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gSelectedOrderFromParty[i] - 1] - 1;
s32 count;
for (moveSlot = 0; moveSlot < 4; moveSlot++)
@@ -6096,7 +6096,7 @@ static void sub_8194E44(void)
for (i = 0; i < 2; i++)
{
- s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gUnknown_0203CEF8[i] - 1] - 1;
+ s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gSelectedOrderFromParty[i] - 1] - 1;
u16 item = GetMonData(&gSaveBlock1Ptr->playerParty[playerMonId], MON_DATA_HELD_ITEM, NULL);
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &item);
}
@@ -6104,7 +6104,7 @@ static void sub_8194E44(void)
static void sub_8194EB4(void)
{
- ReducePlayerPartyToThree();
+ ReducePlayerPartyToSelectedMons();
}
static void sub_8194EC0(void)
diff --git a/src/battle_interface.c b/src/battle_interface.c
index ec8a06094..c7eb11293 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -168,15 +168,15 @@ extern const u8 gText_DynColor1Female[];
// this file's functions
static const u8 *GetHealthboxElementGfxPtr(u8 elementId);
-static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId);
+static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId);
static void RemoveWindowOnHealthbox(u32 windowId);
static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent);
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId);
-static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 arg2);
-static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2);
-static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2);
+static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 windowWidth);
+static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth);
+static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth);
static void FillHealthboxObject(void *dest, u32 arg1, u32 arg2);
static void sub_8073E08(u8 taskId);
@@ -965,7 +965,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId)
healthBarSpritePtr->subspriteMode = 2;
healthBarSpritePtr->oam.priority = 1;
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * 32), 64);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
gSprites[healthboxLeftSpriteId].hMain_HealthBarSpriteId = healthbarSpriteId;
gSprites[healthboxLeftSpriteId].hMain_Battler = battlerId;
@@ -1154,7 +1154,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
xPos += var1;
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, 2, &windowId);
- spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
+ spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER)
{
@@ -1182,7 +1182,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER && !IsDoubleBattle())
{
- spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
+ spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
if (maxOrCurrent != HP_CURRENT) // singles, max
{
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
@@ -1243,7 +1243,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
for (i = 0; i < 3; i++)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32],
- (void*)((OBJ_VRAM0) + 32 * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
+ (void*)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
0x20);
}
}
@@ -1261,7 +1261,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
{
if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible
{
- spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * 32;
+ spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP;
objVram = (void*)(OBJ_VRAM0) + spriteTileNum;
if (maxOrCurrent != HP_CURRENT) // doubles, max hp
@@ -1271,7 +1271,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
RemoveWindowOnHealthbox(windowId);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
- (void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * 32),
+ (void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
0x20);
}
else
@@ -1328,16 +1328,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
if (maxOrCurrent == HP_CURRENT)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224],
- (void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * 32)),
+ (void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
0x20);
- CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * 32)), 0x20);
+ CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
}
else
{
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
{
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116),
- (void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * 32),
+ (void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
0x20);
}
}
@@ -1349,7 +1349,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
{
u8 text[20];
- s32 j, var2;
+ s32 j, spriteTileNum;
u8 *barFontGfx;
u8 i, var, nature, healthBarSpriteId;
@@ -1376,12 +1376,12 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
for (j = 1; j < var + 1; j++)
{
- var2 = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * 32;
- CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (var2), 0x20);
+ spriteTileNum = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
+ CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
barFontGfx += 0x20;
- var2 = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * 32;
- CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (var2), 0x20);
+ spriteTileNum = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
+ CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
barFontGfx += 0x20;
}
@@ -1398,13 +1398,13 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
if (j <= 1)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
- (void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * 32,
+ (void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
32);
}
else
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
- (void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * 32,
+ (void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
32);
}
}
@@ -1436,7 +1436,7 @@ void SwapHpBarsWithHpText(void)
{
healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId;
- CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 0x100);
+ CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT);
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX);
}
@@ -1444,7 +1444,7 @@ void SwapHpBarsWithHpText(void)
{
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * 32), 32);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
}
}
else
@@ -1970,7 +1970,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
break;
}
- spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
+ spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER)
{
@@ -2008,9 +2008,9 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
if (noStatus)
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * 32), 32);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
else
- CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * 32), 32);
+ CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
}
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
@@ -2068,10 +2068,10 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
statusGfxPtr = GetHealthboxElementGfxPtr(HEALTHBOX_GFX_39);
for (i = 0; i < 3; i++)
- CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * 32), 32);
+ CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 64);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 64);
TryAddPokeballIconToHealthbox(healthboxSpriteId, TRUE);
return;
@@ -2082,13 +2082,13 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2);
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void*)(OBJ_PLTT + pltAdder * 2), 2);
- CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * 32), 96);
+ CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
{
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
{
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 32);
- CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * 32), 32);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
+ CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
}
}
TryAddPokeballIconToHealthbox(healthboxSpriteId, FALSE);
@@ -2160,7 +2160,7 @@ static void UpdateSafariBallsTextOnHealthbox(u8 healthboxSpriteId)
u8 *windowTileData;
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gText_SafariBalls, 0, 3, 2, &windowId);
- spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
+ spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
RemoveWindowOnHealthbox(windowId);
@@ -2177,7 +2177,7 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
ConvertIntToDecimalStringN(txtPtr, gNumSafariBalls, STR_CONV_MODE_LEFT_ALIGN, 2);
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(0, text, 0x2F), 3, 2, &windowId);
- spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
+ spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
RemoveWindowOnHealthbox(windowId);
@@ -2323,10 +2323,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
u8 healthbarSpriteId = gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].hMain_HealthBarSpriteId;
if (i < 2)
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
- (void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * 32), 32);
+ (void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
else
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
- (void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * 32), 32);
+ (void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
}
break;
case EXP_BAR:
@@ -2345,10 +2345,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
{
if (i < 4)
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
- (void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * 32), 32);
+ (void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
else
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
- (void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * 32), 32);
+ (void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
}
break;
}
@@ -2571,16 +2571,16 @@ u8 GetHPBarLevel(s16 hp, s16 maxhp)
return result;
}
-static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 arg3, u32 *windowId)
+static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId)
{
u16 winId;
u8 color[3];
struct WindowTemplate winTemplate = sHealthboxWindowTemplate;
winId = AddWindow(&winTemplate);
- FillWindowPixelBuffer(winId, (arg3 << 4) | (arg3));
+ FillWindowPixelBuffer(winId, (bgColor << 4) | (bgColor));
- color[0] = arg3;
+ color[0] = bgColor;
color[1] = 1;
color[2] = 3;
@@ -2597,31 +2597,31 @@ static void RemoveWindowOnHealthbox(u32 windowId)
static void FillHealthboxObject(void *dest, u32 arg1, u32 arg2)
{
- CpuFill32(0x11111111 * arg1, dest, arg2 * 32);
+ CpuFill32(0x11111111 * arg1, dest, arg2 * TILE_SIZE_4BPP);
}
-static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2)
+static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth)
{
- CpuCopy32(windowTileData + 256, dest, arg2 * 32);
+ CpuCopy32(windowTileData + 256, dest, windowWidth * TILE_SIZE_4BPP);
}
-static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 arg2)
+static void TextIntoHealthboxObject(void *dest, u8 *windowTileData, s32 windowWidth)
{
- CpuCopy32(windowTileData + 256, dest + 256, arg2 * 32);
-
- if (arg2 > 0)
+ CpuCopy32(windowTileData + 256, dest + 256, windowWidth * TILE_SIZE_4BPP);
+// + 256 as that prevents the top 4 blank rows of sHealthboxWindowTemplate from being copied
+ if (windowWidth > 0)
{
do
{
CpuCopy32(windowTileData + 20, dest + 20, 12);
dest += 32, windowTileData += 32;
- arg2--;
- } while (arg2 != 0);
+ windowWidth--;
+ } while (windowWidth != 0);
}
}
-static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 arg2)
+static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth)
{
- CpuCopy32(windowTileData, dest, arg2 * 32);
- CpuCopy32(windowTileData + 256, dest + 256, arg2 * 32);
+ CpuCopy32(windowTileData, dest, windowWidth * TILE_SIZE_4BPP);
+ CpuCopy32(windowTileData + 256, dest + 256, windowWidth * TILE_SIZE_4BPP);
}
diff --git a/src/battle_main.c b/src/battle_main.c
index 116f5963a..8bdd2220b 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -166,7 +166,7 @@ static void HandleAction_WatchesCarefully(void);
static void HandleAction_SafariZoneBallThrow(void);
static void HandleAction_ThrowPokeblock(void);
static void HandleAction_GoNear(void);
-static void HandleAction_SafriZoneRun(void);
+static void HandleAction_SafariZoneRun(void);
static void HandleAction_WallyBallThrow(void);
static void HandleAction_Action11(void);
static void HandleAction_NothingIsFainted(void);
@@ -515,7 +515,7 @@ static void (* const sTurnActionsFuncsTable[])(void) =
HandleAction_SafariZoneBallThrow, // B_ACTION_SAFARI_BALL
HandleAction_ThrowPokeblock, // B_ACTION_SAFARI_POKEBLOCK
HandleAction_GoNear, // B_ACTION_SAFARI_GO_NEAR
- HandleAction_SafriZoneRun, // B_ACTION_SAFARI_RUN
+ HandleAction_SafariZoneRun, // B_ACTION_SAFARI_RUN
HandleAction_WallyBallThrow, // B_ACTION_WALLY_THROW
HandleAction_RunBattleScript, // B_ACTION_EXEC_SCRIPT
HandleAction_Action11, // not sure about this one
@@ -5783,7 +5783,7 @@ static void HandleAction_GoNear(void)
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
}
-static void HandleAction_SafriZoneRun(void)
+static void HandleAction_SafariZoneRun(void)
{
gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
PlaySE(SE_NIGERU);
diff --git a/src/battle_message.c b/src/battle_message.c
index 44ea5d7d7..47c4cbe1d 100644
--- a/src/battle_message.c
+++ b/src/battle_message.c
@@ -1,25 +1,25 @@
#include "global.h"
#include "battle.h"
+#include "battle_controllers.h"
#include "battle_message.h"
-#include "constants/battle_string_ids.h"
-#include "constants/moves.h"
-#include "text.h"
-#include "string_util.h"
-#include "constants/items.h"
-#include "constants/trainers.h"
+#include "battle_setup.h"
+#include "battle_tower.h"
+#include "data2.h"
#include "event_data.h"
-#include "link.h"
+#include "frontier_util.h"
+#include "international_string_util.h"
#include "item.h"
-#include "window.h"
-#include "palette.h"
-#include "battle_controllers.h"
-#include "battle_setup.h"
+#include "link.h"
#include "menu.h"
+#include "palette.h"
#include "recorded_battle.h"
-#include "international_string_util.h"
-#include "frontier_util.h"
-#include "battle_tower.h"
-#include "data2.h"
+#include "string_util.h"
+#include "text.h"
+#include "window.h"
+#include "constants/battle_string_ids.h"
+#include "constants/items.h"
+#include "constants/moves.h"
+#include "constants/trainers.h"
struct BattleWindowText
{
@@ -1367,7 +1367,8 @@ static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS,
static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
{
- { // 0
+// The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c
+ { // 0 Standard battle message
.fillValue = 0xFF,
.fontId = 1,
.x = 0,
@@ -1379,7 +1380,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 15,
.shadowColor = 6,
},
- { // 1
+ { // 1 "What will (pokemon) do?"
.fillValue = 0xFF,
.fontId = 1,
.x = 1,
@@ -1391,7 +1392,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 15,
.shadowColor = 6,
},
- { // 2
+ { // 2 "Fight/Pokemon/Bag/Run"
.fillValue = 0xEE,
.fontId = 1,
.x = 0,
@@ -1403,7 +1404,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 3
+ { // 3 Top left move
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1415,7 +1416,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 4
+ { // 4 Top right move
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1427,7 +1428,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 5
+ { // 5 Bottom left move
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1439,7 +1440,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 6
+ { // 6 Bottom right move
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1451,7 +1452,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 7
+ { // 7 "PP"
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1475,7 +1476,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 9
+ { // 9 PP remaining
.fillValue = 0xEE,
.fontId = 1,
.x = 2,
@@ -1487,7 +1488,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 11,
},
- { // 10
+ { // 10 "type"
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1499,7 +1500,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 11
+ { // 11 "switch which?"
.fillValue = 0xEE,
.fontId = 7,
.x = 0,
@@ -1511,7 +1512,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.bgColor = 14,
.shadowColor = 15,
},
- { // 12
+ { // 12 "gText_BattleYesNoChoice"
.fillValue = 0xEE,
.fontId = 1,
.x = 0,
diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c
index dabaf20d0..29176db7a 100644
--- a/src/battle_pyramid.c
+++ b/src/battle_pyramid.c
@@ -29,7 +29,7 @@
#include "constants/maps.h"
#include "constants/moves.h"
-extern u8 gUnknown_0203CEF8[3];
+extern u8 gSelectedOrderFromParty[3];
extern void door_upload_tiles(void);
extern const struct MapLayout *const gMapLayouts[];
@@ -508,14 +508,14 @@ static void sub_81A9834(void)
SetMonMoveSlot(&gPlayerParty[j], MOVE_SKETCH, k);
}
gSaveBlock1Ptr->playerParty[id] = gPlayerParty[j];
- gUnknown_0203CEF8[j] = id + 1;
+ gSelectedOrderFromParty[j] = id + 1;
break;
}
}
}
for (i = 0; i < 3; i++)
- gSaveBlock2Ptr->frontier.selectedPartyMons[i] = gUnknown_0203CEF8[i];
+ gSaveBlock2Ptr->frontier.selectedPartyMons[i] = gSelectedOrderFromParty[i];
}
static u8 sub_81A9998(s32 *arg0, u8 arg1, u8 arg2)
diff --git a/src/berry.c b/src/berry.c
index 7cd28d69f..9f08165b8 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -1,10 +1,13 @@
#include "global.h"
#include "berry.h"
#include "event_data.h"
+#include "field_control_avatar.h"
#include "fieldmap.h"
#include "item.h"
+#include "item_menu.h"
#include "main.h"
#include "random.h"
+#include "string_util.h"
#include "text.h"
#include "constants/event_object_movement_constants.h"
#include "constants/items.h"
@@ -12,11 +15,8 @@
extern u8 EventObjectGetBerryTreeId(u8 eventObjectId);
extern void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
extern void CB2_ChooseBerry(void);
-extern const u8* GetEventObjectScriptPointerPlayerFacing(void);
extern bool8 IsBerryTreeSparkling(u8, u8, u8);
-extern u16 gSpecialVar_ItemId;
-
extern const u8 BerryTreeScript[];
static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry);
diff --git a/src/bg.c b/src/bg.c
index 7c55410b1..a41075ad7 100644
--- a/src/bg.c
+++ b/src/bg.c
@@ -135,22 +135,22 @@ u16 GetBgControlAttribute(u8 bg, u8 attributeId)
{
switch (attributeId)
{
- case BG_CTRL_ATTR_VISIBLE:
- return sGpuBgConfigs.configs[bg].visible;
- case BG_CTRL_ATTR_CHARBASEINDEX:
- return sGpuBgConfigs.configs[bg].charBaseIndex;
- case BG_CTRL_ATTR_MAPBASEINDEX:
- return sGpuBgConfigs.configs[bg].mapBaseIndex;
- case BG_CTRL_ATTR_SCREENSIZE:
- return sGpuBgConfigs.configs[bg].screenSize;
- case BG_CTRL_ATTR_PALETTEMODE:
- return sGpuBgConfigs.configs[bg].paletteMode;
- case BG_CTRL_ATTR_PRIORITY:
- return sGpuBgConfigs.configs[bg].priority;
- case BG_CTRL_ATTR_MOSAIC:
- return sGpuBgConfigs.configs[bg].mosaic;
- case BG_CTRL_ATTR_WRAPAROUND:
- return sGpuBgConfigs.configs[bg].wraparound;
+ case BG_CTRL_ATTR_VISIBLE:
+ return sGpuBgConfigs.configs[bg].visible;
+ case BG_CTRL_ATTR_CHARBASEINDEX:
+ return sGpuBgConfigs.configs[bg].charBaseIndex;
+ case BG_CTRL_ATTR_MAPBASEINDEX:
+ return sGpuBgConfigs.configs[bg].mapBaseIndex;
+ case BG_CTRL_ATTR_SCREENSIZE:
+ return sGpuBgConfigs.configs[bg].screenSize;
+ case BG_CTRL_ATTR_PALETTEMODE:
+ return sGpuBgConfigs.configs[bg].paletteMode;
+ case BG_CTRL_ATTR_PRIORITY:
+ return sGpuBgConfigs.configs[bg].priority;
+ case BG_CTRL_ATTR_MOSAIC:
+ return sGpuBgConfigs.configs[bg].mosaic;
+ case BG_CTRL_ATTR_WRAPAROUND:
+ return sGpuBgConfigs.configs[bg].wraparound;
}
}
@@ -166,15 +166,15 @@ u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode)
{
switch (mode)
{
- case 0x1:
- offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE;
- break;
- case 0x2:
- offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE;
- break;
- default:
- cursor = -1;
- goto end;
+ case 0x1:
+ offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE;
+ break;
+ case 0x2:
+ offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE;
+ break;
+ default:
+ cursor = -1;
+ goto end;
}
offset = destOffset + offset;
@@ -241,17 +241,17 @@ static void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispC
switch (sGpuBgConfigs.bgVisibilityAndMode & 0x7)
{
- case 1:
- if (bg != 2)
- return;
- break;
- case 2:
- if (bg < 2 || bg > 3)
- return;
- break;
- case 0:
- default:
+ case 1:
+ if (bg != 2)
+ return;
+ break;
+ case 2:
+ if (bg < 2 || bg > 3)
return;
+ break;
+ case 0:
+ default:
+ return;
}
src.texX = srcCenterX;
@@ -279,7 +279,8 @@ bool8 IsInvalidBg(u8 bg)
{
if (bg > 3)
return TRUE;
- return FALSE;
+ else
+ return FALSE;
}
int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4)
@@ -434,7 +435,6 @@ u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset)
return (u8)cursor;
}
-#ifdef NONMATCHING // Matches everything but r5 and r6 are flipped, rrr
bool8 IsDma3ManagerBusyWithBgCopy(void)
{
u8 mod;
@@ -462,60 +462,6 @@ bool8 IsDma3ManagerBusyWithBgCopy(void)
return FALSE;
}
-#else
-NAKED
-bool8 IsDma3ManagerBusyWithBgCopy(void)
-{
- asm("push {r4-r7,lr}\n\
- mov r5, #0\n\
- mov r7, #0x1\n\
- neg r7, r7\n\
-_08001ADC:\n\
- add r0, r5, #0\n\
- cmp r5, #0\n\
- bge _08001AE4\n\
- add r0, #0x1F\n\
-_08001AE4:\n\
- asr r0, #5\n\
- lsl r2, r0, #24\n\
- lsl r0, #5\n\
- sub r0, r5, r0\n\
- lsl r0, #24\n\
- lsr r0, #24\n\
- ldr r1, =sDmaBusyBitfield\n\
- lsr r2, #22\n\
- add r4, r2, r1\n\
- mov r6, #0x1\n\
- lsl r6, r0\n\
- ldr r0, [r4]\n\
- and r0, r6\n\
- cmp r0, #0\n\
- beq _08001B22\n\
- lsl r0, r5, #16\n\
- asr r0, #16\n\
- bl CheckForSpaceForDma3Request\n\
- lsl r0, #24\n\
- asr r0, #24\n\
- cmp r0, r7\n\
- bne _08001B1C\n\
- mov r0, #0x1\n\
- b _08001B2A\n\
- .pool\n\
-_08001B1C:\n\
- ldr r0, [r4]\n\
- bic r0, r6\n\
- str r0, [r4]\n\
-_08001B22:\n\
- add r5, #0x1\n\
- cmp r5, #0x7F\n\
- ble _08001ADC\n\
- mov r0, #0\n\
-_08001B2A:\n\
- pop {r4-r7}\n\
- pop {r1}\n\
- bx r1\n");
-}
-#endif // NONMATCHING
void ShowBg(u8 bg)
{
@@ -533,27 +479,27 @@ void SetBgAttribute(u8 bg, u8 attributeId, u8 value)
{
switch (attributeId)
{
- case 1:
- SetBgControlAttributes(bg, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
- break;
- case 2:
- SetBgControlAttributes(bg, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
- break;
- case 3:
- SetBgControlAttributes(bg, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF);
- break;
- case 4:
- SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF);
- break;
- case 7:
- SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF);
- break;
- case 5:
- SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF);
- break;
- case 6:
- SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value);
- break;
+ case 1:
+ SetBgControlAttributes(bg, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
+ break;
+ case 2:
+ SetBgControlAttributes(bg, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
+ break;
+ case 3:
+ SetBgControlAttributes(bg, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF);
+ break;
+ case 4:
+ SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF);
+ break;
+ case 7:
+ SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF);
+ break;
+ case 5:
+ SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF);
+ break;
+ case 6:
+ SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value);
+ break;
}
}
@@ -561,36 +507,36 @@ u16 GetBgAttribute(u8 bg, u8 attributeId)
{
switch (attributeId)
{
- case 1:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_CHARBASEINDEX);
- case 2:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_MAPBASEINDEX);
- case 3:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
- case 4:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE);
- case 7:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_PRIORITY);
- case 5:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_MOSAIC);
- case 6:
- return GetBgControlAttribute(bg, BG_CTRL_ATTR_WRAPAROUND);
- case 8:
- switch (GetBgType(bg))
- {
- case 0:
- return GetBgMetricTextMode(bg, 0) * 0x800;
- case 1:
- return GetBgMetricAffineMode(bg, 0) * 0x100;
- default:
- return 0;
- }
- case 9:
- return GetBgType(bg);
- case 10:
- return sGpuBgConfigs2[bg].baseTile;
- default:
- return -1;
+ case 1:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_CHARBASEINDEX);
+ case 2:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_MAPBASEINDEX);
+ case 3:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
+ case 4:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE);
+ case 7:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_PRIORITY);
+ case 5:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_MOSAIC);
+ case 6:
+ return GetBgControlAttribute(bg, BG_CTRL_ATTR_WRAPAROUND);
+ case 8:
+ switch (GetBgType(bg))
+ {
+ case 0:
+ return GetBgMetricTextMode(bg, 0) * 0x800;
+ case 1:
+ return GetBgMetricAffineMode(bg, 0) * 0x100;
+ default:
+ return 0;
+ }
+ case 9:
+ return GetBgType(bg);
+ case 10:
+ return sGpuBgConfigs2[bg].baseTile;
+ default:
+ return -1;
}
}
@@ -607,58 +553,58 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op)
switch (op)
{
- case 0:
- default:
- sGpuBgConfigs2[bg].bg_x = value;
- break;
- case 1:
- sGpuBgConfigs2[bg].bg_x += value;
- break;
- case 2:
- sGpuBgConfigs2[bg].bg_x -= value;
- break;
+ case 0:
+ default:
+ sGpuBgConfigs2[bg].bg_x = value;
+ break;
+ case 1:
+ sGpuBgConfigs2[bg].bg_x += value;
+ break;
+ case 2:
+ sGpuBgConfigs2[bg].bg_x -= value;
+ break;
}
mode = GetBgMode();
switch (bg)
{
- case 0:
- temp1 = sGpuBgConfigs2[0].bg_x >> 0x8;
- SetGpuReg(REG_OFFSET_BG0HOFS, temp1);
- break;
- case 1:
- temp1 = sGpuBgConfigs2[1].bg_x >> 0x8;
- SetGpuReg(REG_OFFSET_BG1HOFS, temp1);
- break;
- case 2:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[2].bg_x >> 0x8;
- SetGpuReg(REG_OFFSET_BG2HOFS, temp1);
- }
- else
- {
- temp1 = sGpuBgConfigs2[2].bg_x >> 0x10;
- temp2 = sGpuBgConfigs2[2].bg_x & 0xFFFF;
- SetGpuReg(REG_OFFSET_BG2X_H, temp1);
- SetGpuReg(REG_OFFSET_BG2X_L, temp2);
- }
- break;
- case 3:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[3].bg_x >> 0x8;
- SetGpuReg(REG_OFFSET_BG3HOFS, temp1);
- }
- else if (mode == 2)
- {
- 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;
+ case 0:
+ temp1 = sGpuBgConfigs2[0].bg_x >> 0x8;
+ SetGpuReg(REG_OFFSET_BG0HOFS, temp1);
+ break;
+ case 1:
+ temp1 = sGpuBgConfigs2[1].bg_x >> 0x8;
+ SetGpuReg(REG_OFFSET_BG1HOFS, temp1);
+ break;
+ case 2:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[2].bg_x >> 0x8;
+ SetGpuReg(REG_OFFSET_BG2HOFS, temp1);
+ }
+ else
+ {
+ temp1 = sGpuBgConfigs2[2].bg_x >> 0x10;
+ temp2 = sGpuBgConfigs2[2].bg_x & 0xFFFF;
+ SetGpuReg(REG_OFFSET_BG2X_H, temp1);
+ SetGpuReg(REG_OFFSET_BG2X_L, temp2);
+ }
+ break;
+ case 3:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[3].bg_x >> 0x8;
+ SetGpuReg(REG_OFFSET_BG3HOFS, temp1);
+ }
+ else if (mode == 2)
+ {
+ 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 sGpuBgConfigs2[bg].bg_x;
@@ -668,9 +614,10 @@ u32 GetBgX(u8 bg)
{
if (IsInvalidBg32(bg) != FALSE)
return -1;
- if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
+ else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
return -1;
- return sGpuBgConfigs2[bg].bg_x;
+ else
+ return sGpuBgConfigs2[bg].bg_x;
}
u32 ChangeBgY(u8 bg, u32 value, u8 op)
@@ -686,58 +633,58 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op)
switch (op)
{
- case 0:
- default:
- sGpuBgConfigs2[bg].bg_y = value;
- break;
- case 1:
- sGpuBgConfigs2[bg].bg_y += value;
- break;
- case 2:
- sGpuBgConfigs2[bg].bg_y -= value;
- break;
+ case 0:
+ default:
+ sGpuBgConfigs2[bg].bg_y = value;
+ break;
+ case 1:
+ sGpuBgConfigs2[bg].bg_y += value;
+ break;
+ case 2:
+ sGpuBgConfigs2[bg].bg_y -= value;
+ break;
}
mode = GetBgMode();
switch (bg)
{
- case 0:
- temp1 = sGpuBgConfigs2[0].bg_y >> 0x8;
- SetGpuReg(REG_OFFSET_BG0VOFS, temp1);
- break;
- case 1:
- temp1 = sGpuBgConfigs2[1].bg_y >> 0x8;
- SetGpuReg(REG_OFFSET_BG1VOFS, temp1);
- break;
- case 2:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[2].bg_y >> 0x8;
- SetGpuReg(REG_OFFSET_BG2VOFS, temp1);
- }
- else
- {
- temp1 = sGpuBgConfigs2[2].bg_y >> 0x10;
- temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF;
- SetGpuReg(REG_OFFSET_BG2Y_H, temp1);
- SetGpuReg(REG_OFFSET_BG2Y_L, temp2);
- }
- break;
- case 3:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[3].bg_y >> 0x8;
- SetGpuReg(REG_OFFSET_BG3VOFS, temp1);
- }
- else if (mode == 2)
- {
- 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;
+ case 0:
+ temp1 = sGpuBgConfigs2[0].bg_y >> 0x8;
+ SetGpuReg(REG_OFFSET_BG0VOFS, temp1);
+ break;
+ case 1:
+ temp1 = sGpuBgConfigs2[1].bg_y >> 0x8;
+ SetGpuReg(REG_OFFSET_BG1VOFS, temp1);
+ break;
+ case 2:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[2].bg_y >> 0x8;
+ SetGpuReg(REG_OFFSET_BG2VOFS, temp1);
+ }
+ else
+ {
+ temp1 = sGpuBgConfigs2[2].bg_y >> 0x10;
+ temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF;
+ SetGpuReg(REG_OFFSET_BG2Y_H, temp1);
+ SetGpuReg(REG_OFFSET_BG2Y_L, temp2);
+ }
+ break;
+ case 3:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[3].bg_y >> 0x8;
+ SetGpuReg(REG_OFFSET_BG3VOFS, temp1);
+ }
+ else if (mode == 2)
+ {
+ 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 sGpuBgConfigs2[bg].bg_y;
@@ -756,59 +703,59 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
switch (op)
{
- case 0:
- default:
- sGpuBgConfigs2[bg].bg_y = value;
- break;
- case 1:
- sGpuBgConfigs2[bg].bg_y += value;
- break;
- case 2:
- sGpuBgConfigs2[bg].bg_y -= value;
- break;
+ case 0:
+ default:
+ sGpuBgConfigs2[bg].bg_y = value;
+ break;
+ case 1:
+ sGpuBgConfigs2[bg].bg_y += value;
+ break;
+ case 2:
+ sGpuBgConfigs2[bg].bg_y -= value;
+ break;
}
mode = GetBgMode();
switch (bg)
{
- case 0:
- temp1 = sGpuBgConfigs2[0].bg_y >> 0x8;
- SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, temp1);
- break;
- case 1:
- temp1 = sGpuBgConfigs2[1].bg_y >> 0x8;
- SetGpuReg_ForcedBlank(REG_OFFSET_BG1VOFS, temp1);
- break;
- case 2:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[2].bg_y >> 0x8;
- SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1);
+ case 0:
+ temp1 = sGpuBgConfigs2[0].bg_y >> 0x8;
+ SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, temp1);
+ break;
+ case 1:
+ temp1 = sGpuBgConfigs2[1].bg_y >> 0x8;
+ SetGpuReg_ForcedBlank(REG_OFFSET_BG1VOFS, temp1);
+ break;
+ case 2:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[2].bg_y >> 0x8;
+ SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1);
- }
- else
- {
- 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);
- }
- break;
- case 3:
- if (mode == 0)
- {
- temp1 = sGpuBgConfigs2[3].bg_y >> 0x8;
- SetGpuReg_ForcedBlank(REG_OFFSET_BG3VOFS, temp1);
- }
- else if (mode == 2)
- {
- 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;
+ }
+ else
+ {
+ 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);
+ }
+ break;
+ case 3:
+ if (mode == 0)
+ {
+ temp1 = sGpuBgConfigs2[3].bg_y >> 0x8;
+ SetGpuReg_ForcedBlank(REG_OFFSET_BG3VOFS, temp1);
+ }
+ else if (mode == 2)
+ {
+ 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 sGpuBgConfigs2[bg].bg_y;
@@ -818,9 +765,10 @@ u32 GetBgY(u8 bg)
{
if (IsInvalidBg32(bg) != FALSE)
return -1;
- if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
+ else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
return -1;
- return sGpuBgConfigs2[bg].bg_y;
+ else
+ return sGpuBgConfigs2[bg].bg_y;
}
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
@@ -842,57 +790,57 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2)
switch (a2)
{
- case 0:
- default:
- test1 = a1 & 0xF;
- test2 = a1 >> 0x4;
- break;
- case 1:
- test1 = a1 & 0xF;
- break;
- case 2:
- if ((test1 + a1) > 0xF)
- {
- test1 = 0xF;
- }
- else
- {
- test1 += a1;
- }
- break;
- case 3:
- if ((test1 - a1) < 0)
- {
- test1 = 0x0;
- }
- else
- {
- test1 -= a1;
- }
- break;
- case 4:
- test2 = a1 & 0xF;
- break;
- case 5:
- if ((test2 + a1) > 0xF)
- {
- test2 = 0xF;
- }
- else
- {
- test2 += a1;
- }
- break;
- case 6:
- if ((test2 - a1) < 0)
- {
- test2 = 0x0;
- }
- else
- {
- test2 -= a1;
- }
- break;
+ case 0:
+ default:
+ test1 = a1 & 0xF;
+ test2 = a1 >> 0x4;
+ break;
+ case 1:
+ test1 = a1 & 0xF;
+ break;
+ case 2:
+ if ((test1 + a1) > 0xF)
+ {
+ test1 = 0xF;
+ }
+ else
+ {
+ test1 += a1;
+ }
+ break;
+ case 3:
+ if ((test1 - a1) < 0)
+ {
+ test1 = 0x0;
+ }
+ else
+ {
+ test1 -= a1;
+ }
+ break;
+ case 4:
+ test2 = a1 & 0xF;
+ break;
+ case 5:
+ if ((test2 + a1) > 0xF)
+ {
+ test2 = 0xF;
+ }
+ else
+ {
+ test2 += a1;
+ }
+ break;
+ case 6:
+ if ((test2 - a1) < 0)
+ {
+ test2 = 0x0;
+ }
+ else
+ {
+ test2 -= a1;
+ }
+ break;
}
result |= ((test2 << 0x4) & 0xF0);
@@ -923,9 +871,10 @@ void* GetBgTilemapBuffer(u8 bg)
{
if (IsInvalidBg32(bg) != FALSE)
return NULL;
- if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
+ else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0)
return NULL;
- return sGpuBgConfigs2[bg].tilemap;
+ else
+ return sGpuBgConfigs2[bg].tilemap;
}
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset)
@@ -933,13 +882,9 @@ void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset)
if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE)
{
if (mode != 0)
- {
CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode);
- }
else
- {
LZ77UnCompWram(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)));
- }
}
}
@@ -951,15 +896,15 @@ void CopyBgTilemapBufferToVram(u8 bg)
{
switch (GetBgType(bg))
{
- case 0:
- sizeToLoad = GetBgMetricTextMode(bg, 0) * 0x800;
- break;
- case 1:
- sizeToLoad = GetBgMetricAffineMode(bg, 0) * 0x100;
- break;
- default:
- sizeToLoad = 0;
- break;
+ case 0:
+ sizeToLoad = GetBgMetricTextMode(bg, 0) * 0x800;
+ break;
+ case 1:
+ sizeToLoad = GetBgMetricAffineMode(bg, 0) * 0x100;
+ break;
+ default:
+ sizeToLoad = 0;
+ break;
}
LoadBgVram(bg, sGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2);
}
@@ -976,27 +921,27 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
{
switch (GetBgType(bg))
{
- case 0:
- srcCopy = src;
- for (destY16 = destY; destY16 < (destY + height); destY16++)
+ case 0:
+ srcCopy = src;
+ for (destY16 = destY; destY16 < (destY + height); destY16++)
+ {
+ for (destX16 = destX; destX16 < (destX + width); destX16++)
{
- for (destX16 = destX; destX16 < (destX + width); destX16++)
- {
- ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++;
- }
+ ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++;
}
- break;
- case 1:
- srcCopy = src;
- mode = GetBgMetricAffineMode(bg, 0x1);
- for (destY16 = destY; destY16 < (destY + height); destY16++)
+ }
+ break;
+ case 1:
+ srcCopy = src;
+ mode = GetBgMetricAffineMode(bg, 0x1);
+ for (destY16 = destY; destY16 < (destY + height); destY16++)
+ {
+ for (destX16 = destX; destX16 < (destX + width); destX16++)
{
- for (destX16 = destX; destX16 < (destX + width); destX16++)
- {
- ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++;
- }
+ ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++;
}
- break;
+ }
+ break;
}
}
}
@@ -1005,295 +950,49 @@ void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u
{
CopyRectToBgTilemapBufferRect(bg, src, 0, 0, rectWidth, rectHeight, destX, destY, rectWidth, rectHeight, palette, 0, 0);
}
-// Skipping for now, it probably uses structs passed by value
-/*
-void CopyRectToBgTilemapBufferRect(u8 bg, const void* src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2)
-{
- u16 attribute;
- u16 mode;
- u16 mode2;
- void* srcCopy;
- u16 destX16;
- u16 destY16;
+void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 unused, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, s16 palette1, s16 tileOffset)
+{
+ u16 screenWidth, screenHeight, screenSize;
+ u16 var;
+ const void *srcPtr;
+ u16 i, j;
- if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE)
+ if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg))
{
- attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
- mode = GetBgMetricTextMode(bg, 0x1) * 0x20;
- mode2 = GetBgMetricTextMode(bg, 0x2) * 0x20;
+ screenSize = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
+ screenWidth = GetBgMetricTextMode(bg, 0x1) * 0x20;
+ screenHeight = GetBgMetricTextMode(bg, 0x2) * 0x20;
switch (GetBgType(bg))
{
- case 0:
- srcCopy = src;
- for (destY16 = destY; destY16 < (destY + rectHeight); destY16++)
+ case 0:
+ srcPtr = src + ((srcY * srcWidth) + srcX) * 2;
+ for (i = destX; i < (destX + rectWidth); i++)
+ {
+ for (j = srcHeight; j < (srcHeight + destY); j++)
{
- for (destX16 = destX; destX16 < (destX + rectWidth); destX16++)
- {
- CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2);
- }
+ u16 index = GetTileMapIndexFromCoords(j, i, screenSize, screenWidth, screenHeight);
+ CopyTileMapEntry(srcPtr, sGpuBgConfigs2[bg].tilemap + (index * 2), rectHeight, palette1, tileOffset);
+ srcPtr += 2;
}
- break;
- case 1:
- srcCopy = src;
- mode = GetBgMetricAffineMode(bg, 0x1);
- for (destY16 = destY; destY16 < (destY + rectHeight); destY16++)
+ srcPtr += (srcWidth - destY) * 2;
+ }
+ break;
+ case 1:
+ srcPtr = src + ((srcY * srcWidth) + srcX);
+ var = GetBgMetricAffineMode(bg, 0x1);
+ for (i = destX; i < (destX + rectWidth); i++)
+ {
+ for (j = srcHeight; j < (srcHeight + destY); j++)
{
- for (destX16 = destX; destX16 < (destX + rectWidth); destX16++)
- {
- CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2);
- }
+ *(u8*)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8*)(srcPtr) + palette1;
+ srcPtr++;
}
- break;
+ srcPtr += (srcWidth - destY);
+ }
+ break;
}
}
-}*/
-NAKED
-void CopyRectToBgTilemapBufferRect(u8 bg, const void* src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2)
-{
- asm("push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, #0x40\n\
- str r1, [sp, #0x8]\n\
- ldr r1, [sp, #0x60]\n\
- ldr r4, [sp, #0x68]\n\
- ldr r5, [sp, #0x6C]\n\
- ldr r6, [sp, #0x70]\n\
- ldr r7, [sp, #0x74]\n\
- mov r8, r7\n\
- ldr r7, [sp, #0x78]\n\
- mov r9, r7\n\
- ldr r7, [sp, #0x7C]\n\
- mov r10, r7\n\
- ldr r7, [sp, #0x80]\n\
- mov r12, r7\n\
- lsl r0, #24\n\
- lsr r0, #24\n\
- str r0, [sp, #0x4]\n\
- lsl r2, #24\n\
- lsr r2, #24\n\
- str r2, [sp, #0xC]\n\
- lsl r3, #24\n\
- lsr r3, #24\n\
- str r3, [sp, #0x10]\n\
- lsl r1, #24\n\
- lsr r7, r1, #24\n\
- lsl r4, #24\n\
- lsr r4, #24\n\
- str r4, [sp, #0x14]\n\
- lsl r5, #24\n\
- lsr r5, #24\n\
- lsl r6, #24\n\
- lsr r6, #24\n\
- str r6, [sp, #0x18]\n\
- mov r0, r8\n\
- lsl r0, #24\n\
- lsr r4, r0, #24\n\
- mov r1, r9\n\
- lsl r1, #24\n\
- lsr r1, #24\n\
- str r1, [sp, #0x1C]\n\
- mov r2, r10\n\
- lsl r2, #16\n\
- lsr r2, #16\n\
- str r2, [sp, #0x20]\n\
- mov r0, r12\n\
- lsl r0, #16\n\
- lsr r0, #16\n\
- str r0, [sp, #0x24]\n\
- ldr r0, [sp, #0x4]\n\
- bl IsInvalidBg32\n\
- cmp r0, #0\n\
- beq _08002592\n\
- b _080026EE\n\
-_08002592:\n\
- ldr r0, [sp, #0x4]\n\
- bl IsTileMapOutsideWram\n\
- cmp r0, #0\n\
- beq _0800259E\n\
- b _080026EE\n\
-_0800259E:\n\
- ldr r0, [sp, #0x4]\n\
- mov r1, #0x4\n\
- bl GetBgControlAttribute\n\
- lsl r0, #16\n\
- lsr r0, #16\n\
- str r0, [sp, #0x30]\n\
- ldr r0, [sp, #0x4]\n\
- mov r1, #0x1\n\
- bl GetBgMetricTextMode\n\
- lsl r0, #21\n\
- lsr r0, #16\n\
- str r0, [sp, #0x28]\n\
- ldr r0, [sp, #0x4]\n\
- mov r1, #0x2\n\
- bl GetBgMetricTextMode\n\
- lsl r0, #21\n\
- lsr r0, #16\n\
- str r0, [sp, #0x2C]\n\
- ldr r0, [sp, #0x4]\n\
- bl GetBgType\n\
- cmp r0, #0\n\
- beq _080025D8\n\
- cmp r0, #0x1\n\
- beq _08002674\n\
- b _080026EE\n\
-_080025D8:\n\
- ldr r1, [sp, #0x10]\n\
- add r0, r1, #0\n\
- mul r0, r7\n\
- ldr r2, [sp, #0xC]\n\
- add r0, r2\n\
- lsl r0, #1\n\
- ldr r1, [sp, #0x8]\n\
- add r6, r1, r0\n\
- add r0, r5, r4\n\
- cmp r5, r0\n\
- blt _080025F0\n\
- b _080026EE\n\
-_080025F0:\n\
- ldr r2, [sp, #0x18]\n\
- sub r2, r7, r2\n\
- str r2, [sp, #0x34]\n\
- str r0, [sp, #0x38]\n\
-_080025F8:\n\
- ldr r4, [sp, #0x14]\n\
- ldr r7, [sp, #0x18]\n\
- add r0, r4, r7\n\
- add r1, r5, #0x1\n\
- str r1, [sp, #0x3C]\n\
- cmp r4, r0\n\
- bge _0800265A\n\
- ldr r2, [sp, #0x4]\n\
- lsl r0, r2, #4\n\
- ldr r1, =sGpuBgConfigs2+4\n\
- add r0, r1\n\
- mov r10, r0\n\
- ldr r7, [sp, #0x20]\n\
- lsl r7, #16\n\
- mov r9, r7\n\
- ldr r1, [sp, #0x24]\n\
- lsl r0, r1, #16\n\
- asr r0, #16\n\
- mov r8, r0\n\
-_0800261E:\n\
- ldr r2, [sp, #0x2C]\n\
- str r2, [sp]\n\
- add r0, r4, #0\n\
- add r1, r5, #0\n\
- ldr r2, [sp, #0x30]\n\
- ldr r3, [sp, #0x28]\n\
- bl GetTileMapIndexFromCoords\n\
- lsl r0, #16\n\
- lsr r0, #15\n\
- mov r7, r10\n\
- ldr r1, [r7]\n\
- add r1, r0\n\
- mov r0, r8\n\
- str r0, [sp]\n\
- add r0, r6, #0\n\
- ldr r2, [sp, #0x1C]\n\
- mov r7, r9\n\
- asr r3, r7, #16\n\
- bl CopyTileMapEntry\n\
- add r6, #0x2\n\
- add r0, r4, #0x1\n\
- lsl r0, #16\n\
- lsr r4, r0, #16\n\
- ldr r1, [sp, #0x14]\n\
- ldr r2, [sp, #0x18]\n\
- add r0, r1, r2\n\
- cmp r4, r0\n\
- blt _0800261E\n\
-_0800265A:\n\
- ldr r5, [sp, #0x34]\n\
- lsl r0, r5, #1\n\
- add r6, r0\n\
- ldr r7, [sp, #0x3C]\n\
- lsl r0, r7, #16\n\
- lsr r5, r0, #16\n\
- ldr r0, [sp, #0x38]\n\
- cmp r5, r0\n\
- blt _080025F8\n\
- b _080026EE\n\
- .pool\n\
-_08002674:\n\
- ldr r1, [sp, #0x10]\n\
- add r0, r1, #0\n\
- mul r0, r7\n\
- ldr r2, [sp, #0xC]\n\
- add r0, r2\n\
- ldr r1, [sp, #0x8]\n\
- add r6, r1, r0\n\
- ldr r0, [sp, #0x4]\n\
- mov r1, #0x1\n\
- bl GetBgMetricAffineMode\n\
- lsl r0, #16\n\
- lsr r0, #16\n\
- mov r9, r0\n\
- add r0, r5, r4\n\
- cmp r5, r0\n\
- bge _080026EE\n\
- ldr r2, [sp, #0x18]\n\
- sub r2, r7, r2\n\
- str r2, [sp, #0x34]\n\
- str r0, [sp, #0x38]\n\
- ldr r7, =sGpuBgConfigs2+4\n\
- mov r10, r7\n\
- ldr r0, [sp, #0x4]\n\
- lsl r0, #4\n\
- mov r8, r0\n\
-_080026A8:\n\
- ldr r4, [sp, #0x14]\n\
- ldr r1, [sp, #0x18]\n\
- add r0, r4, r1\n\
- add r2, r5, #0x1\n\
- str r2, [sp, #0x3C]\n\
- cmp r4, r0\n\
- bge _080026DE\n\
- mov r3, r8\n\
- add r3, r10\n\
- mov r7, r9\n\
- mul r7, r5\n\
- mov r12, r7\n\
- add r2, r0, #0\n\
-_080026C2:\n\
- ldr r1, [r3]\n\
- mov r5, r12\n\
- add r0, r5, r4\n\
- add r1, r0\n\
- ldrb r0, [r6]\n\
- ldr r7, [sp, #0x20]\n\
- add r0, r7\n\
- strb r0, [r1]\n\
- add r6, #0x1\n\
- add r0, r4, #0x1\n\
- lsl r0, #16\n\
- lsr r4, r0, #16\n\
- cmp r4, r2\n\
- blt _080026C2\n\
-_080026DE:\n\
- ldr r0, [sp, #0x34]\n\
- add r6, r0\n\
- ldr r1, [sp, #0x3C]\n\
- lsl r0, r1, #16\n\
- lsr r5, r0, #16\n\
- ldr r2, [sp, #0x38]\n\
- cmp r5, r2\n\
- blt _080026A8\n\
-_080026EE:\n\
- add sp, #0x40\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");
}
void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height)
@@ -1384,42 +1083,42 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric)
switch (whichMetric)
{
+ case 0:
+ switch (attribute)
+ {
case 0:
- switch (attribute)
- {
- case 0:
- return 1;
- case 1:
- case 2:
- return 2;
- case 3:
- return 4;
- }
- break;
+ return 1;
case 1:
- switch (attribute)
- {
- case 0:
- return 1;
- case 1:
- return 2;
- case 2:
- return 1;
- case 3:
- return 2;
- }
- break;
case 2:
- switch (attribute)
- {
- case 0:
- case 1:
- return 1;
- case 2:
- case 3:
- return 2;
- }
- break;
+ return 2;
+ case 3:
+ return 4;
+ }
+ break;
+ case 1:
+ switch (attribute)
+ {
+ case 0:
+ return 1;
+ case 1:
+ return 2;
+ case 2:
+ return 1;
+ case 3:
+ return 2;
+ }
+ break;
+ case 2:
+ switch (attribute)
+ {
+ case 0:
+ case 1:
+ return 1;
+ case 2:
+ case 3:
+ return 2;
+ }
+ break;
}
return 0;
}
@@ -1432,22 +1131,22 @@ u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric)
switch (whichMetric)
{
+ case 0:
+ switch (attribute)
+ {
case 0:
- switch (attribute)
- {
- case 0:
- return 0x1;
- case 1:
- return 0x4;
- case 2:
- return 0x10;
- case 3:
- return 0x40;
- }
- break;
+ return 0x1;
case 1:
+ return 0x4;
case 2:
- return 0x10 << attribute;
+ return 0x10;
+ case 3:
+ return 0x40;
+ }
+ break;
+ case 1:
+ case 2:
+ return 0x10 << attribute;
}
return 0;
}
@@ -1459,44 +1158,45 @@ u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32
switch (screenSize)
{
- case 0:
- case 2:
- break;
- case 3:
- if (y >= 0x20)
- y += 0x20;
- case 1:
- if (x >= 0x20)
- {
- x -= 0x20;
- y += 0x20;
- }
+ case 0:
+ case 2:
+ break;
+ case 3:
+ if (y >= 0x20)
+ y += 0x20;
+ case 1:
+ if (x >= 0x20)
+ {
+ x -= 0x20;
+ y += 0x20;
+ }
+ break;
}
return (y * 0x20) + x;
}
#ifdef NONMATCHING // This one has some weird switch statement cases that refuse to cooperate
-void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 palette2)
+void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2)
{
- u16 test;
+ u16 var;
switch (palette1)
{
- default:
- if (palette1 > 0x10 || palette1 < 0)
- test = *src + tileOffset + (palette2 << 12);
- else
- test = ((*src + tileOffset) & 0xFFF) + ((palette1 + palette2) << 12);
- break;
- case 0x10:
- test = ((*dest & 0xFC00) + (palette2 << 12)) | ((*src + tileOffset) & 0x3FF);
- break;
+ case 0 ... 16:
+ if (palette1 != 16)
+ var = ((*src + tileOffset) & 0xFFF) + ((palette1 + palette2) << 12);
+ else
+ var = ((*dest & 0xFC00) + (palette2 << 12)) | ((*src + tileOffset) & 0x3FF);
+ break;
+ default:
+ var = *src + tileOffset + (palette2 << 12);
+ break;
}
- *dest = test;
+ *dest = var;
}
#else
NAKED
-void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 palette2)
+void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2)
{
asm("push {r4-r6,lr}\n\
add r4, r0, #0\n\
@@ -1550,41 +1250,38 @@ _08002B3C:\n\
u32 GetBgType(u8 bg)
{
- u8 mode;
-
- mode = GetBgMode();
-
+ u8 mode = GetBgMode();
switch (bg)
{
+ case 0:
+ case 1:
+ switch (mode)
+ {
case 0:
case 1:
- switch (mode)
- {
- case 0:
- case 1:
- return 0;
- }
- break;
+ return 0;
+ }
+ break;
+ case 2:
+ switch (mode)
+ {
+ case 0:
+ return 0;
+ case 1:
case 2:
- switch (mode)
- {
- case 0:
- return 0;
- case 1:
- case 2:
- return 1;
- }
- break;
- case 3:
- switch (mode)
- {
- case 0:
- return 0;
- case 2:
- return 1;
- }
- break;
+ return 1;
+ }
+ break;
+ case 3:
+ switch (mode)
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
+ break;
}
return 0xFFFF;
@@ -1594,14 +1291,16 @@ bool32 IsInvalidBg32(u8 bg)
{
if (bg > 3)
return TRUE;
- return FALSE;
+ else
+ return FALSE;
}
bool32 IsTileMapOutsideWram(u8 bg)
{
if (sGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END)
return TRUE;
- if (sGpuBgConfigs2[bg].tilemap == 0x0)
+ else if (sGpuBgConfigs2[bg].tilemap == NULL)
return TRUE;
- return FALSE;
+ else
+ return FALSE;
}
diff --git a/src/bug.c b/src/bug.c
index a14ec2226..59b31b37d 100644
--- a/src/bug.c
+++ b/src/bug.c
@@ -1,15 +1,22 @@
#include "global.h"
#include "battle_anim.h"
+#include "gpu_regs.h"
+#include "trig.h"
#include "constants/rgb.h"
-extern void sub_8110368(struct Sprite *);
-extern void sub_8110438(struct Sprite *);
-extern void sub_81104E4(struct Sprite *);
-extern void sub_81105B4(struct Sprite *);
-extern void sub_811067C(struct Sprite *);
-extern void sub_8110720(struct Sprite *);
-extern void sub_8110850(struct Sprite *);
-extern void sub_8110994(struct Sprite *);
+void sub_8110368(struct Sprite *);
+void sub_8110438(struct Sprite *);
+void sub_81104E4(struct Sprite *);
+void sub_81105B4(struct Sprite *);
+void sub_811067C(struct Sprite *);
+void AnimTranslateStinger(struct Sprite *);
+void AnimMissileArc(struct Sprite *);
+void sub_8110994(struct Sprite *);
+static void sub_811057C(struct Sprite *);
+static void sub_8110630(struct Sprite *);
+static void sub_81106A4(struct Sprite *);
+static void sub_8110700(struct Sprite *);
+static void AnimMissileArcStep(struct Sprite *);
const union AffineAnimCmd gUnknown_08596938[] =
{
@@ -136,7 +143,7 @@ const struct SpriteTemplate gLinearStingerSpriteTemplate =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8110720,
+ .callback = AnimTranslateStinger,
};
const struct SpriteTemplate gPinMissileSpriteTemplate =
@@ -147,7 +154,7 @@ const struct SpriteTemplate gPinMissileSpriteTemplate =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8110850,
+ .callback = AnimMissileArc,
};
const struct SpriteTemplate gIcicleSpearSpriteTemplate =
@@ -158,7 +165,7 @@ const struct SpriteTemplate gIcicleSpearSpriteTemplate =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8110850,
+ .callback = AnimMissileArc,
};
const union AffineAnimCmd gUnknown_08596A8C[] =
@@ -187,3 +194,291 @@ const struct SpriteTemplate gUnknown_08596AC8 =
.affineAnims = gUnknown_08596AC4,
.callback = sub_8110994,
};
+
+void sub_8110368(struct Sprite *sprite)
+{
+ if (IsContest())
+ {
+ StartSpriteAffineAnim(sprite, 2);
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+ }
+ else if (!GetBattlerSide(gBattleAnimTarget))
+ {
+ StartSpriteAffineAnim(sprite, 1);
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+ gBattleAnimArgs[3] = -gBattleAnimArgs[3];
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+ }
+
+ sprite->pos1.x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0];
+ sprite->pos1.y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1];
+ sprite->data[0] = gBattleAnimArgs[4];
+
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_8110438(struct Sprite *sprite)
+{
+ if (IsContest())
+ {
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+ StartSpriteAffineAnim(sprite, 2);
+ }
+ else if (!GetBattlerSide(gBattleAnimTarget))
+ {
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+ }
+
+ sprite->pos1.x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0];
+ sprite->pos1.y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1];
+ sprite->data[0] = gBattleAnimArgs[2];
+
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_81104E4(struct Sprite *sprite)
+{
+ if (IsContest())
+ gBattleAnimArgs[2] /= 2;
+
+ InitAnimSpritePos(sprite, 1);
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[3] = sprite->pos1.y;
+
+ if (!gBattleAnimArgs[4])
+ {
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+ }
+ else
+ {
+ SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]);
+ }
+
+ sub_80A6FD4(sprite);
+ sprite->data[5] = gBattleAnimArgs[3];
+ sprite->callback = sub_811057C;
+}
+
+static void sub_811057C(struct Sprite *sprite)
+{
+ if (TranslateAnimLinear(sprite))
+ {
+ DestroyAnimSprite(sprite);
+ return;
+ }
+
+ sprite->pos2.x += Sin(sprite->data[6], sprite->data[5]);
+ sprite->data[6] = (sprite->data[6] + 13) & 0xFF;
+}
+
+void sub_81105B4(struct Sprite *sprite)
+{
+ SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
+ if (GetBattlerSide(gBattleAnimAttacker))
+ sprite->pos1.x -= gBattleAnimArgs[0];
+ else
+ sprite->pos1.x += gBattleAnimArgs[0];
+
+ sprite->pos1.y += gBattleAnimArgs[1];
+ if (!GetBattlerSide(gBattleAnimTarget))
+ sprite->pos1.y += 8;
+
+ sprite->callback = sub_8110630;
+}
+
+static void sub_8110630(struct Sprite *sprite)
+{
+ if (++sprite->data[0] == 3)
+ {
+ sprite->data[0] = 0;
+ sprite->invisible ^= 1;
+ }
+
+ if (++sprite->data[1] == 51)
+ {
+ DestroyAnimSprite(sprite);
+ }
+}
+
+void sub_811067C(struct Sprite *sprite)
+{
+ SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
+ SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0));
+
+ sprite->data[0] = 16;
+ sprite->callback = sub_81106A4;
+}
+
+static void sub_81106A4(struct Sprite *sprite)
+{
+ if (sprite->data[2] < 20)
+ {
+ sprite->data[2]++;
+ }
+ else if (sprite->data[1]++ & 1)
+ {
+ sprite->data[0]--;
+ SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 16 - sprite->data[0]));
+
+ if (sprite->data[0] == 0)
+ {
+ sprite->invisible = TRUE;
+ sprite->callback = sub_8110700;
+ }
+ }
+}
+
+static void sub_8110700(struct Sprite *sprite)
+{
+ SetGpuReg(REG_OFFSET_BLDCNT, 0);
+ SetGpuReg(REG_OFFSET_BLDALPHA, 0);
+ DestroyAnimSprite(sprite);
+}
+
+// Translates a stinger sprite linearly to a destination location. The sprite is
+// initially rotated so that it appears to be traveling in a straight line.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: target x pixel offset
+// arg 3: target y pixel offset
+// arg 4: duration
+void AnimTranslateStinger(struct Sprite *sprite)
+{
+ s16 lVarX, lVarY;
+ u16 rot;
+
+ if (IsContest())
+ {
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+ }
+ else
+ {
+ if (GetBattlerSide(gBattleAnimAttacker))
+ {
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ gBattleAnimArgs[3] = -gBattleAnimArgs[3];
+ }
+ }
+
+ if (!IsContest() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
+ {
+ if (GetBattlerPosition(gBattleAnimTarget) == B_POSITION_PLAYER_LEFT
+ || GetBattlerPosition(gBattleAnimTarget) == B_POSITION_OPPONENT_LEFT)
+ {
+ s16 temp1, temp2;
+
+ temp1 = gBattleAnimArgs[2];
+ gBattleAnimArgs[2] = -temp1;
+
+ temp2 = gBattleAnimArgs[0];
+ gBattleAnimArgs[0] = -temp2;
+ }
+ }
+
+ InitAnimSpritePos(sprite, 1);
+
+ lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
+ lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
+ rot = ArcTan2Neg(lVarX - sprite->pos1.x, lVarY - sprite->pos1.y);
+ rot += 0xC000;
+ sub_80A73E0(sprite, FALSE, 0x100, 0x100, rot);
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->data[2] = lVarX;
+ sprite->data[4] = lVarY;
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+// Rotates sprite and moves it in an arc, so that it appears like a missle or arrow traveling.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: target x pixel offset
+// arg 3: target y pixel offset
+// arg 4: duration
+// arg 5: wave amplitude
+void AnimMissileArc(struct Sprite *sprite)
+{
+ InitAnimSpritePos(sprite, 1);
+
+ if (GetBattlerSide(gBattleAnimAttacker))
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
+ sprite->data[5] = gBattleAnimArgs[5];
+ InitAnimArcTranslation(sprite);
+
+ sprite->callback = AnimMissileArcStep;
+ sprite->invisible = TRUE;
+}
+
+static void AnimMissileArcStep(struct Sprite *sprite)
+{
+ sprite->invisible = FALSE;
+
+ if (TranslateAnimArc(sprite))
+ {
+ DestroyAnimSprite(sprite);
+ }
+ else
+ {
+ s16 tempData[8];
+ u16 *data = sprite->data;
+ u16 x1 = sprite->pos1.x;
+ s16 x2 = sprite->pos2.x;
+ u16 y1 = sprite->pos1.y;
+ s16 y2 = sprite->pos2.y;
+ int i;
+
+ for (i = 0; i < 8; i++)
+ tempData[i] = data[i];
+
+ x2 += x1;
+ y2 += y1;
+
+ if (!TranslateAnimArc(sprite))
+ {
+ u16 rotation = ArcTan2Neg(sprite->pos1.x + sprite->pos2.x - x2,
+ sprite->pos1.y + sprite->pos2.y - y2);
+ rotation += 0xC000;
+ sub_80A73E0(sprite, FALSE, 0x100, 0x100, rotation);
+
+ for (i = 0; i < 8; i++)
+ data[i] = tempData[i];
+ }
+ }
+}
+
+void sub_8110994(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18;
+ }
+ else
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 18;
+ }
+
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+ sprite->callback = sub_80A67BC;
+}
diff --git a/src/cable_club.c b/src/cable_club.c
index b0e5f0500..56154d5bf 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -31,7 +31,7 @@
#include "constants/songs.h"
extern u8 gUnknown_02032298[2];
-extern u8 gUnknown_0203CEF8[];
+extern u8 gSelectedOrderFromParty[];
static const struct WindowTemplate gUnknown_08550594 = {
.bg = 0,
@@ -358,8 +358,8 @@ static void sub_80B2918(u8 taskId)
sub_800AA04(gFieldLinkPlayerCount);
card = (struct TrainerCard *)gBlockSendBuffer;
TrainerCard_GenerateCardForPlayer(card);
- card->monSpecies[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES, NULL);
- card->monSpecies[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
+ card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL);
+ card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
gTasks[taskId].func = sub_80B2C30;
}
}
@@ -405,8 +405,8 @@ static void sub_80B2A08(u8 taskId)
sub_800AA04(gFieldLinkPlayerCount);
card = (struct TrainerCard *)gBlockSendBuffer;
TrainerCard_GenerateCardForPlayer(card);
- card->monSpecies[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES, NULL);
- card->monSpecies[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
+ card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL);
+ card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
gTasks[taskId].func = sub_80B2C30;
sub_800A4D8(2);
}
@@ -800,7 +800,7 @@ static void sub_80B3260(int a0)
gBattleTypeFlags = BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER;
break;
case 5:
- ReducePlayerPartyToThree();
+ ReducePlayerPartyToSelectedMons();
gBattleTypeFlags = BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER | BATTLE_TYPE_MULTI;
break;
case 9:
diff --git a/src/contest_ai.c b/src/contest_ai.c
index 3324ddf87..1342ea102 100644
--- a/src/contest_ai.c
+++ b/src/contest_ai.c
@@ -4,8 +4,6 @@
#include "contest_ai.h"
#include "contest_effect.h"
-extern u16 gContestMonConditions[];
-
extern const u8 *gAIScriptPtr;
extern const u8 *gContestAIs[];
diff --git a/src/data/pokemon/pokedex_entries.h b/src/data/pokemon/pokedex_entries.h
new file mode 100644
index 000000000..acf6506bd
--- /dev/null
+++ b/src/data/pokemon/pokedex_entries.h
@@ -0,0 +1,3873 @@
+const struct PokedexEntry gPokedexEntries[] =
+{
+ { //Dummy
+ .categoryName = _("UNKNOWN"),
+ .height = 0,
+ .weight = 0,
+ .description = gDummyPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Bulbasaur
+ .categoryName = _("SEED"),
+ .height = 7,
+ .weight = 69,
+ .description = gBulbasaurPokedexText,
+ .pokemonScale = 356,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ivysaur
+ .categoryName = _("SEED"),
+ .height = 10,
+ .weight = 130,
+ .description = gIvysaurPokedexText,
+ .pokemonScale = 335,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Venusaur
+ .categoryName = _("SEED"),
+ .height = 20,
+ .weight = 1000,
+ .description = gVenusaurPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 388,
+ .trainerOffset = 6,
+ },
+ { //Charmander
+ .categoryName = _("LIZARD"),
+ .height = 6,
+ .weight = 85,
+ .description = gCharmanderPokedexText,
+ .pokemonScale = 444,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Charmeleon
+ .categoryName = _("FLAME"),
+ .height = 11,
+ .weight = 190,
+ .description = gCharmeleonPokedexText,
+ .pokemonScale = 302,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Charizard
+ .categoryName = _("FLAME"),
+ .height = 17,
+ .weight = 905,
+ .description = gCharizardPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 302,
+ .trainerOffset = 3,
+ },
+ { //Squirtle
+ .categoryName = _("TINY TURTLE"),
+ .height = 5,
+ .weight = 90,
+ .description = gSquirtlePokedexText,
+ .pokemonScale = 412,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wartortle
+ .categoryName = _("TURTLE"),
+ .height = 10,
+ .weight = 225,
+ .description = gWartortlePokedexText,
+ .pokemonScale = 332,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Blastoise
+ .categoryName = _("SHELLFISH"),
+ .height = 16,
+ .weight = 855,
+ .description = gBlastoisePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = -1,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ { //Caterpie
+ .categoryName = _("WORM"),
+ .height = 3,
+ .weight = 29,
+ .description = gCaterpiePokedexText,
+ .pokemonScale = 549,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Metapod
+ .categoryName = _("COCOON"),
+ .height = 7,
+ .weight = 99,
+ .description = gMetapodPokedexText,
+ .pokemonScale = 350,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Butterfree
+ .categoryName = _("BUTTERFLY"),
+ .height = 11,
+ .weight = 320,
+ .description = gButterfreePokedexText,
+ .pokemonScale = 312,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Weedle
+ .categoryName = _("HAIRY BUG"),
+ .height = 3,
+ .weight = 32,
+ .description = gWeedlePokedexText,
+ .pokemonScale = 455,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kakuna
+ .categoryName = _("COCOON"),
+ .height = 6,
+ .weight = 100,
+ .description = gKakunaPokedexText,
+ .pokemonScale = 424,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Beedrill
+ .categoryName = _("POISON BEE"),
+ .height = 10,
+ .weight = 295,
+ .description = gBeedrillPokedexText,
+ .pokemonScale = 366,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pidgey
+ .categoryName = _("TINY BIRD"),
+ .height = 3,
+ .weight = 18,
+ .description = gPidgeyPokedexText,
+ .pokemonScale = 508,
+ .pokemonOffset = -3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pidgeotto
+ .categoryName = _("BIRD"),
+ .height = 11,
+ .weight = 300,
+ .description = gPidgeottoPokedexText,
+ .pokemonScale = 331,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pidgeot
+ .categoryName = _("BIRD"),
+ .height = 15,
+ .weight = 395,
+ .description = gPidgeotPokedexText,
+ .pokemonScale = 269,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Rattata
+ .categoryName = _("MOUSE"),
+ .height = 3,
+ .weight = 35,
+ .description = gRattataPokedexText,
+ .pokemonScale = 481,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Raticate
+ .categoryName = _("MOUSE"),
+ .height = 7,
+ .weight = 185,
+ .description = gRaticatePokedexText,
+ .pokemonScale = 459,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Spearow
+ .categoryName = _("TINY BIRD"),
+ .height = 3,
+ .weight = 20,
+ .description = gSpearowPokedexText,
+ .pokemonScale = 571,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Fearow
+ .categoryName = _("BEAK"),
+ .height = 12,
+ .weight = 380,
+ .description = gFearowPokedexText,
+ .pokemonScale = 278,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ekans
+ .categoryName = _("SNAKE"),
+ .height = 20,
+ .weight = 69,
+ .description = gEkansPokedexText,
+ .pokemonScale = 298,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Arbok
+ .categoryName = _("COBRA"),
+ .height = 35,
+ .weight = 650,
+ .description = gArbokPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ { //Pikachu
+ .categoryName = _("MOUSE"),
+ .height = 4,
+ .weight = 60,
+ .description = gPikachuPokedexText,
+ .pokemonScale = 479,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Raichu
+ .categoryName = _("MOUSE"),
+ .height = 8,
+ .weight = 300,
+ .description = gRaichuPokedexText,
+ .pokemonScale = 426,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sandshrew
+ .categoryName = _("MOUSE"),
+ .height = 6,
+ .weight = 120,
+ .description = gSandshrewPokedexText,
+ .pokemonScale = 365,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sandslash
+ .categoryName = _("MOUSE"),
+ .height = 10,
+ .weight = 295,
+ .description = gSandslashPokedexText,
+ .pokemonScale = 341,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //NidoranF
+ .categoryName = _("POISON PIN"),
+ .height = 4,
+ .weight = 70,
+ .description = gNidoranFPokedexText,
+ .pokemonScale = 488,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nidorina
+ .categoryName = _("POISON PIN"),
+ .height = 8,
+ .weight = 200,
+ .description = gNidorinaPokedexText,
+ .pokemonScale = 381,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nidoqueen
+ .categoryName = _("DRILL"),
+ .height = 13,
+ .weight = 600,
+ .description = gNidoqueenPokedexText,
+ .pokemonScale = 293,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //NidoranM
+ .categoryName = _("POISON PIN"),
+ .height = 5,
+ .weight = 90,
+ .description = gNidoranMPokedexText,
+ .pokemonScale = 511,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nidorino
+ .categoryName = _("POISON PIN"),
+ .height = 9,
+ .weight = 195,
+ .description = gNidorinoPokedexText,
+ .pokemonScale = 408,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nidoking
+ .categoryName = _("DRILL"),
+ .height = 14,
+ .weight = 620,
+ .description = gNidokingPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Clefairy
+ .categoryName = _("FAIRY"),
+ .height = 6,
+ .weight = 75,
+ .description = gClefairyPokedexText,
+ .pokemonScale = 441,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Clefable
+ .categoryName = _("FAIRY"),
+ .height = 13,
+ .weight = 400,
+ .description = gClefablePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Vulpix
+ .categoryName = _("FOX"),
+ .height = 6,
+ .weight = 99,
+ .description = gVulpixPokedexText,
+ .pokemonScale = 542,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ninetales
+ .categoryName = _("FOX"),
+ .height = 11,
+ .weight = 199,
+ .description = gNinetalesPokedexText,
+ .pokemonScale = 339,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Jigglypuff
+ .categoryName = _("BALLOON"),
+ .height = 5,
+ .weight = 55,
+ .description = gJigglypuffPokedexText,
+ .pokemonScale = 433,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wigglytuff
+ .categoryName = _("BALLOON"),
+ .height = 10,
+ .weight = 120,
+ .description = gWigglytuffPokedexText,
+ .pokemonScale = 328,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Zubat
+ .categoryName = _("BAT"),
+ .height = 8,
+ .weight = 75,
+ .description = gZubatPokedexText,
+ .pokemonScale = 362,
+ .pokemonOffset = -5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Golbat
+ .categoryName = _("BAT"),
+ .height = 16,
+ .weight = 550,
+ .description = gGolbatPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Oddish
+ .categoryName = _("WEED"),
+ .height = 5,
+ .weight = 54,
+ .description = gOddishPokedexText,
+ .pokemonScale = 423,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gloom
+ .categoryName = _("WEED"),
+ .height = 8,
+ .weight = 86,
+ .description = gGloomPokedexText,
+ .pokemonScale = 329,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Vileplume
+ .categoryName = _("FLOWER"),
+ .height = 12,
+ .weight = 186,
+ .description = gVileplumePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Paras
+ .categoryName = _("MUSHROOM"),
+ .height = 3,
+ .weight = 54,
+ .description = gParasPokedexText,
+ .pokemonScale = 593,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Parasect
+ .categoryName = _("MUSHROOM"),
+ .height = 10,
+ .weight = 295,
+ .description = gParasectPokedexText,
+ .pokemonScale = 307,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Venonat
+ .categoryName = _("INSECT"),
+ .height = 10,
+ .weight = 300,
+ .description = gVenonatPokedexText,
+ .pokemonScale = 360,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = -1,
+ },
+ { //Venomoth
+ .categoryName = _("POISON MOTH"),
+ .height = 15,
+ .weight = 125,
+ .description = gVenomothPokedexText,
+ .pokemonScale = 285,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 1,
+ },
+ { //Diglett
+ .categoryName = _("MOLE"),
+ .height = 2,
+ .weight = 8,
+ .description = gDiglettPokedexText,
+ .pokemonScale = 833,
+ .pokemonOffset = 25,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Dugtrio
+ .categoryName = _("MOLE"),
+ .height = 7,
+ .weight = 333,
+ .description = gDugtrioPokedexText,
+ .pokemonScale = 406,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Meowth
+ .categoryName = _("SCRATCH CAT"),
+ .height = 4,
+ .weight = 42,
+ .description = gMeowthPokedexText,
+ .pokemonScale = 480,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Persian
+ .categoryName = _("CLASSY CAT"),
+ .height = 10,
+ .weight = 320,
+ .description = gPersianPokedexText,
+ .pokemonScale = 320,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Psyduck
+ .categoryName = _("DUCK"),
+ .height = 8,
+ .weight = 196,
+ .description = gPsyduckPokedexText,
+ .pokemonScale = 369,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Golduck
+ .categoryName = _("DUCK"),
+ .height = 17,
+ .weight = 766,
+ .description = gGolduckPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 273,
+ .trainerOffset = 1,
+ },
+ { //Mankey
+ .categoryName = _("PIG MONKEY"),
+ .height = 5,
+ .weight = 280,
+ .description = gMankeyPokedexText,
+ .pokemonScale = 404,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Primeape
+ .categoryName = _("PIG MONKEY"),
+ .height = 10,
+ .weight = 320,
+ .description = gPrimeapePokedexText,
+ .pokemonScale = 326,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Growlithe
+ .categoryName = _("PUPPY"),
+ .height = 7,
+ .weight = 190,
+ .description = gGrowlithePokedexText,
+ .pokemonScale = 346,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Arcanine
+ .categoryName = _("LEGENDARY"),
+ .height = 19,
+ .weight = 1550,
+ .description = gArcaninePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 312,
+ .trainerOffset = 4,
+ },
+ { //Poliwag
+ .categoryName = _("TADPOLE"),
+ .height = 6,
+ .weight = 124,
+ .description = gPoliwagPokedexText,
+ .pokemonScale = 369,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Poliwhirl
+ .categoryName = _("TADPOLE"),
+ .height = 10,
+ .weight = 200,
+ .description = gPoliwhirlPokedexText,
+ .pokemonScale = 288,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Poliwrath
+ .categoryName = _("TADPOLE"),
+ .height = 13,
+ .weight = 540,
+ .description = gPoliwrathPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Abra
+ .categoryName = _("PSI"),
+ .height = 9,
+ .weight = 195,
+ .description = gAbraPokedexText,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kadabra
+ .categoryName = _("PSI"),
+ .height = 13,
+ .weight = 565,
+ .description = gKadabraPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Alakazam
+ .categoryName = _("PSI"),
+ .height = 15,
+ .weight = 480,
+ .description = gAlakazamPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Machop
+ .categoryName = _("SUPERPOWER"),
+ .height = 8,
+ .weight = 195,
+ .description = gMachopPokedexText,
+ .pokemonScale = 342,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Machoke
+ .categoryName = _("SUPERPOWER"),
+ .height = 15,
+ .weight = 705,
+ .description = gMachokePokedexText,
+ .pokemonScale = 323,
+ .pokemonOffset = 9,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ { //Machamp
+ .categoryName = _("SUPERPOWER"),
+ .height = 16,
+ .weight = 1300,
+ .description = gMachampPokedexText,
+ .pokemonScale = 280,
+ .pokemonOffset = 1,
+ .trainerScale = 269,
+ .trainerOffset = -1,
+ },
+ { //Bellsprout
+ .categoryName = _("FLOWER"),
+ .height = 7,
+ .weight = 40,
+ .description = gBellsproutPokedexText,
+ .pokemonScale = 354,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Weepinbell
+ .categoryName = _("FLYCATCHER"),
+ .height = 10,
+ .weight = 64,
+ .description = gWeepinbellPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Victreebel
+ .categoryName = _("FLYCATCHER"),
+ .height = 17,
+ .weight = 155,
+ .description = gVictreebelPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 312,
+ .trainerOffset = 3,
+ },
+ { //Tentacool
+ .categoryName = _("JELLYFISH"),
+ .height = 9,
+ .weight = 455,
+ .description = gTentacoolPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Tentacruel
+ .categoryName = _("JELLYFISH"),
+ .height = 16,
+ .weight = 550,
+ .description = gTentacruelPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 312,
+ .trainerOffset = 1,
+ },
+ { //Geodude
+ .categoryName = _("ROCK"),
+ .height = 4,
+ .weight = 200,
+ .description = gGeodudePokedexText,
+ .pokemonScale = 347,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Graveler
+ .categoryName = _("ROCK"),
+ .height = 10,
+ .weight = 1050,
+ .description = gGravelerPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Golem
+ .categoryName = _("MEGATON"),
+ .height = 14,
+ .weight = 3000,
+ .description = gGolemPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ { //Ponyta
+ .categoryName = _("FIRE HORSE"),
+ .height = 10,
+ .weight = 300,
+ .description = gPonytaPokedexText,
+ .pokemonScale = 283,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Rapidash
+ .categoryName = _("FIRE HORSE"),
+ .height = 17,
+ .weight = 950,
+ .description = gRapidashPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 289,
+ .trainerOffset = 1,
+ },
+ { //Slowpoke
+ .categoryName = _("DOPEY"),
+ .height = 12,
+ .weight = 360,
+ .description = gSlowpokePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Slowbro
+ .categoryName = _("HERMIT CRAB"),
+ .height = 16,
+ .weight = 785,
+ .description = gSlowbroPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ { //Magnemite
+ .categoryName = _("MAGNET"),
+ .height = 3,
+ .weight = 60,
+ .description = gMagnemitePokedexText,
+ .pokemonScale = 288,
+ .pokemonOffset = -9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Magneton
+ .categoryName = _("MAGNET"),
+ .height = 10,
+ .weight = 600,
+ .description = gMagnetonPokedexText,
+ .pokemonScale = 292,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Farfetchd
+ .categoryName = _("WILD DUCK"),
+ .height = 8,
+ .weight = 150,
+ .description = gFarfetchdPokedexText,
+ .pokemonScale = 330,
+ .pokemonOffset = 2,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ { //Doduo
+ .categoryName = _("TWIN BIRD"),
+ .height = 14,
+ .weight = 392,
+ .description = gDoduoPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = -1,
+ },
+ { //Dodrio
+ .categoryName = _("TRIPLE BIRD"),
+ .height = 18,
+ .weight = 852,
+ .description = gDodrioPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 0,
+ },
+ { //Seel
+ .categoryName = _("SEA LION"),
+ .height = 11,
+ .weight = 900,
+ .description = gSeelPokedexText,
+ .pokemonScale = 297,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Dewgong
+ .categoryName = _("SEA LION"),
+ .height = 17,
+ .weight = 1200,
+ .description = gDewgongPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 275,
+ .trainerOffset = 0,
+ },
+ { //Grimer
+ .categoryName = _("SLUDGE"),
+ .height = 9,
+ .weight = 300,
+ .description = gGrimerPokedexText,
+ .pokemonScale = 258,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Muk
+ .categoryName = _("SLUDGE"),
+ .height = 12,
+ .weight = 300,
+ .description = gMukPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shellder
+ .categoryName = _("BIVALVE"),
+ .height = 3,
+ .weight = 40,
+ .description = gShellderPokedexText,
+ .pokemonScale = 675,
+ .pokemonOffset = 24,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Cloyster
+ .categoryName = _("BIVALVE"),
+ .height = 15,
+ .weight = 1325,
+ .description = gCloysterPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 269,
+ .trainerOffset = 1,
+ },
+ { //Gastly
+ .categoryName = _("GAS"),
+ .height = 13,
+ .weight = 1,
+ .description = gGastlyPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Haunter
+ .categoryName = _("GAS"),
+ .height = 16,
+ .weight = 1,
+ .description = gHaunterPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ { //Gengar
+ .categoryName = _("SHADOW"),
+ .height = 15,
+ .weight = 405,
+ .description = gGengarPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 302,
+ .trainerOffset = 2,
+ },
+ { //Onix
+ .categoryName = _("ROCK SNAKE"),
+ .height = 88,
+ .weight = 2100,
+ .description = gOnixPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 515,
+ .trainerOffset = 14,
+ },
+ { //Drowzee
+ .categoryName = _("HYPNOSIS"),
+ .height = 10,
+ .weight = 324,
+ .description = gDrowzeePokedexText,
+ .pokemonScale = 274,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hypno
+ .categoryName = _("HYPNOSIS"),
+ .height = 16,
+ .weight = 756,
+ .description = gHypnoPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ { //Krabby
+ .categoryName = _("RIVER CRAB"),
+ .height = 4,
+ .weight = 65,
+ .description = gKrabbyPokedexText,
+ .pokemonScale = 469,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kingler
+ .categoryName = _("PINCER"),
+ .height = 13,
+ .weight = 600,
+ .description = gKinglerPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Voltorb
+ .categoryName = _("BALL"),
+ .height = 5,
+ .weight = 104,
+ .description = gVoltorbPokedexText,
+ .pokemonScale = 364,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Electrode
+ .categoryName = _("BALL"),
+ .height = 12,
+ .weight = 666,
+ .description = gElectrodePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Exeggcute
+ .categoryName = _("EGG"),
+ .height = 4,
+ .weight = 25,
+ .description = gExeggcutePokedexText,
+ .pokemonScale = 489,
+ .pokemonOffset = -4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Exeggutor
+ .categoryName = _("COCONUT"),
+ .height = 20,
+ .weight = 1200,
+ .description = gExeggutorPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 5,
+ },
+ { //Cubone
+ .categoryName = _("LONELY"),
+ .height = 4,
+ .weight = 65,
+ .description = gCubonePokedexText,
+ .pokemonScale = 545,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Marowak
+ .categoryName = _("BONE KEEPER"),
+ .height = 10,
+ .weight = 450,
+ .description = gMarowakPokedexText,
+ .pokemonScale = 293,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hitmonlee
+ .categoryName = _("KICKING"),
+ .height = 15,
+ .weight = 498,
+ .description = gHitmonleePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 259,
+ .trainerOffset = 1,
+ },
+ { //Hitmonchan
+ .categoryName = _("PUNCHING"),
+ .height = 14,
+ .weight = 502,
+ .description = gHitmonchanPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 277,
+ .trainerOffset = 2,
+ },
+ { //Lickitung
+ .categoryName = _("LICKING"),
+ .height = 12,
+ .weight = 655,
+ .description = gLickitungPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Koffing
+ .categoryName = _("POISON GAS"),
+ .height = 6,
+ .weight = 10,
+ .description = gKoffingPokedexText,
+ .pokemonScale = 369,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Weezing
+ .categoryName = _("POISON GAS"),
+ .height = 12,
+ .weight = 95,
+ .description = gWeezingPokedexText,
+ .pokemonScale = 305,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Rhyhorn
+ .categoryName = _("SPIKES"),
+ .height = 10,
+ .weight = 1150,
+ .description = gRhyhornPokedexText,
+ .pokemonScale = 267,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Rhydon
+ .categoryName = _("DRILL"),
+ .height = 19,
+ .weight = 1200,
+ .description = gRhydonPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 299,
+ .trainerOffset = 2,
+ },
+ { //Chansey
+ .categoryName = _("EGG"),
+ .height = 11,
+ .weight = 346,
+ .description = gChanseyPokedexText,
+ .pokemonScale = 257,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Tangela
+ .categoryName = _("VINE"),
+ .height = 10,
+ .weight = 350,
+ .description = gTangelaPokedexText,
+ .pokemonScale = 304,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kangaskhan
+ .categoryName = _("PARENT"),
+ .height = 22,
+ .weight = 800,
+ .description = gKangaskhanPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 387,
+ .trainerOffset = 8,
+ },
+ { //Horsea
+ .categoryName = _("DRAGON"),
+ .height = 4,
+ .weight = 80,
+ .description = gHorseaPokedexText,
+ .pokemonScale = 399,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Seadra
+ .categoryName = _("DRAGON"),
+ .height = 12,
+ .weight = 250,
+ .description = gSeadraPokedexText,
+ .pokemonScale = 299,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Goldeen
+ .categoryName = _("GOLDFISH"),
+ .height = 6,
+ .weight = 150,
+ .description = gGoldeenPokedexText,
+ .pokemonScale = 379,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Seaking
+ .categoryName = _("GOLDFISH"),
+ .height = 13,
+ .weight = 390,
+ .description = gSeakingPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Staryu
+ .categoryName = _("STAR SHAPE"),
+ .height = 8,
+ .weight = 345,
+ .description = gStaryuPokedexText,
+ .pokemonScale = 326,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Starmie
+ .categoryName = _("MYSTERIOUS"),
+ .height = 11,
+ .weight = 800,
+ .description = gStarmiePokedexText,
+ .pokemonScale = 301,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Mrmime
+ .categoryName = _("BARRIER"),
+ .height = 13,
+ .weight = 545,
+ .description = gMrmimePokedexText,
+ .pokemonScale = 258,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Scyther
+ .categoryName = _("MANTIS"),
+ .height = 15,
+ .weight = 560,
+ .description = gScytherPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ { //Jynx
+ .categoryName = _("HUMAN SHAPE"),
+ .height = 14,
+ .weight = 406,
+ .description = gJynxPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 300,
+ .trainerOffset = 1,
+ },
+ { //Electabuzz
+ .categoryName = _("ELECTRIC"),
+ .height = 11,
+ .weight = 300,
+ .description = gElectabuzzPokedexText,
+ .pokemonScale = 351,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Magmar
+ .categoryName = _("SPITFIRE"),
+ .height = 13,
+ .weight = 445,
+ .description = gMagmarPokedexText,
+ .pokemonScale = 277,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pinsir
+ .categoryName = _("STAG BEETLE"),
+ .height = 15,
+ .weight = 550,
+ .description = gPinsirPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ { //Tauros
+ .categoryName = _("WILD BULL"),
+ .height = 14,
+ .weight = 884,
+ .description = gTaurosPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Magikarp
+ .categoryName = _("FISH"),
+ .height = 9,
+ .weight = 100,
+ .description = gMagikarpPokedexText,
+ .pokemonScale = 310,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gyarados
+ .categoryName = _("ATROCIOUS"),
+ .height = 65,
+ .weight = 2350,
+ .description = gGyaradosPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 481,
+ .trainerOffset = 13,
+ },
+ { //Lapras
+ .categoryName = _("TRANSPORT"),
+ .height = 25,
+ .weight = 2200,
+ .description = gLaprasPokedexText,
+ .pokemonScale = 257,
+ .pokemonOffset = 10,
+ .trainerScale = 423,
+ .trainerOffset = 8,
+ },
+ { //Ditto
+ .categoryName = _("TRANSFORM"),
+ .height = 3,
+ .weight = 40,
+ .description = gDittoPokedexText,
+ .pokemonScale = 633,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Eevee
+ .categoryName = _("EVOLUTION"),
+ .height = 3,
+ .weight = 65,
+ .description = gEeveePokedexText,
+ .pokemonScale = 476,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Vaporeon
+ .categoryName = _("BUBBLE JET"),
+ .height = 10,
+ .weight = 290,
+ .description = gVaporeonPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Jolteon
+ .categoryName = _("LIGHTNING"),
+ .height = 8,
+ .weight = 245,
+ .description = gJolteonPokedexText,
+ .pokemonScale = 283,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Flareon
+ .categoryName = _("FLAME"),
+ .height = 9,
+ .weight = 250,
+ .description = gFlareonPokedexText,
+ .pokemonScale = 306,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Porygon
+ .categoryName = _("VIRTUAL"),
+ .height = 8,
+ .weight = 365,
+ .description = gPorygonPokedexText,
+ .pokemonScale = 328,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Omanyte
+ .categoryName = _("SPIRAL"),
+ .height = 4,
+ .weight = 75,
+ .description = gOmanytePokedexText,
+ .pokemonScale = 521,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Omastar
+ .categoryName = _("SPIRAL"),
+ .height = 10,
+ .weight = 350,
+ .description = gOmastarPokedexText,
+ .pokemonScale = 307,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kabuto
+ .categoryName = _("SHELLFISH"),
+ .height = 5,
+ .weight = 115,
+ .description = gKabutoPokedexText,
+ .pokemonScale = 454,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kabutops
+ .categoryName = _("SHELLFISH"),
+ .height = 13,
+ .weight = 405,
+ .description = gKabutopsPokedexText,
+ .pokemonScale = 271,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Aerodactyl
+ .categoryName = _("FOSSIL"),
+ .height = 18,
+ .weight = 590,
+ .description = gAerodactylPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 302,
+ .trainerOffset = 4,
+ },
+ { //Snorlax
+ .categoryName = _("SLEEPING"),
+ .height = 21,
+ .weight = 4600,
+ .description = gSnorlaxPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 423,
+ .trainerOffset = 11,
+ },
+ { //Articuno
+ .categoryName = _("FREEZE"),
+ .height = 17,
+ .weight = 554,
+ .description = gArticunoPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 2,
+ },
+ { //Zapdos
+ .categoryName = _("ELECTRIC"),
+ .height = 16,
+ .weight = 526,
+ .description = gZapdosPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 318,
+ .trainerOffset = 3,
+ },
+ { //Moltres
+ .categoryName = _("FLAME"),
+ .height = 20,
+ .weight = 600,
+ .description = gMoltresPokedexText,
+ .pokemonScale = 270,
+ .pokemonOffset = 0,
+ .trainerScale = 387,
+ .trainerOffset = 8,
+ },
+ { //Dratini
+ .categoryName = _("DRAGON"),
+ .height = 18,
+ .weight = 33,
+ .description = gDratiniPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 8,
+ .trainerScale = 386,
+ .trainerOffset = 6,
+ },
+ { //Dragonair
+ .categoryName = _("DRAGON"),
+ .height = 40,
+ .weight = 165,
+ .description = gDragonairPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 411,
+ .trainerOffset = 5,
+ },
+ { //Dragonite
+ .categoryName = _("DRAGON"),
+ .height = 22,
+ .weight = 2100,
+ .description = gDragonitePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 4,
+ },
+ { //Mewtwo
+ .categoryName = _("GENETIC"),
+ .height = 20,
+ .weight = 1220,
+ .description = gMewtwoPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 4,
+ },
+ { //Mew
+ .categoryName = _("NEW SPECIES"),
+ .height = 4,
+ .weight = 40,
+ .description = gMewPokedexText,
+ .pokemonScale = 457,
+ .pokemonOffset = -2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Chikorita
+ .categoryName = _("LEAF"),
+ .height = 9,
+ .weight = 64,
+ .description = gChikoritaPokedexText,
+ .pokemonScale = 512,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Bayleef
+ .categoryName = _("LEAF"),
+ .height = 12,
+ .weight = 158,
+ .description = gBayleefPokedexText,
+ .pokemonScale = 296,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Meganium
+ .categoryName = _("HERB"),
+ .height = 18,
+ .weight = 1005,
+ .description = gMeganiumPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 277,
+ .trainerOffset = 1,
+ },
+ { //Cyndaquil
+ .categoryName = _("FIRE MOUSE"),
+ .height = 5,
+ .weight = 79,
+ .description = gCyndaquilPokedexText,
+ .pokemonScale = 539,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Quilava
+ .categoryName = _("VOLCANO"),
+ .height = 9,
+ .weight = 190,
+ .description = gQuilavaPokedexText,
+ .pokemonScale = 329,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Typhlosion
+ .categoryName = _("VOLCANO"),
+ .height = 17,
+ .weight = 795,
+ .description = gTyphlosionPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 1,
+ },
+ { //Totodile
+ .categoryName = _("BIG JAW"),
+ .height = 6,
+ .weight = 95,
+ .description = gTotodilePokedexText,
+ .pokemonScale = 487,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Croconaw
+ .categoryName = _("BIG JAW"),
+ .height = 11,
+ .weight = 250,
+ .description = gCroconawPokedexText,
+ .pokemonScale = 378,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Feraligatr
+ .categoryName = _("BIG JAW"),
+ .height = 23,
+ .weight = 888,
+ .description = gFeraligatrPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 342,
+ .trainerOffset = 7,
+ },
+ { //Sentret
+ .categoryName = _("SCOUT"),
+ .height = 8,
+ .weight = 60,
+ .description = gSentretPokedexText,
+ .pokemonScale = 439,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Furret
+ .categoryName = _("LONG BODY"),
+ .height = 18,
+ .weight = 325,
+ .description = gFurretPokedexText,
+ .pokemonScale = 346,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hoothoot
+ .categoryName = _("OWL"),
+ .height = 7,
+ .weight = 212,
+ .description = gHoothootPokedexText,
+ .pokemonScale = 380,
+ .pokemonOffset = -2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Noctowl
+ .categoryName = _("OWL"),
+ .height = 16,
+ .weight = 408,
+ .description = gNoctowlPokedexText,
+ .pokemonScale = 278,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ledyba
+ .categoryName = _("FIVE STAR"),
+ .height = 10,
+ .weight = 108,
+ .description = gLedybaPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ledian
+ .categoryName = _("FIVE STAR"),
+ .height = 14,
+ .weight = 356,
+ .description = gLedianPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Spinarak
+ .categoryName = _("STRING SPIT"),
+ .height = 5,
+ .weight = 85,
+ .description = gSpinarakPokedexText,
+ .pokemonScale = 414,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ariados
+ .categoryName = _("LONG LEG"),
+ .height = 11,
+ .weight = 335,
+ .description = gAriadosPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Crobat
+ .categoryName = _("BAT"),
+ .height = 18,
+ .weight = 750,
+ .description = gCrobatPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 281,
+ .trainerOffset = 1,
+ },
+ { //Chinchou
+ .categoryName = _("ANGLER"),
+ .height = 5,
+ .weight = 120,
+ .description = gChinchouPokedexText,
+ .pokemonScale = 424,
+ .pokemonOffset = -2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Lanturn
+ .categoryName = _("LIGHT"),
+ .height = 12,
+ .weight = 225,
+ .description = gLanturnPokedexText,
+ .pokemonScale = 269,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pichu
+ .categoryName = _("TINY MOUSE"),
+ .height = 3,
+ .weight = 20,
+ .description = gPichuPokedexText,
+ .pokemonScale = 508,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Cleffa
+ .categoryName = _("STAR SHAPE"),
+ .height = 3,
+ .weight = 30,
+ .description = gCleffaPokedexText,
+ .pokemonScale = 462,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Igglybuff
+ .categoryName = _("BALLOON"),
+ .height = 3,
+ .weight = 10,
+ .description = gIgglybuffPokedexText,
+ .pokemonScale = 457,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Togepi
+ .categoryName = _("SPIKE BALL"),
+ .height = 3,
+ .weight = 15,
+ .description = gTogepiPokedexText,
+ .pokemonScale = 507,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Togetic
+ .categoryName = _("HAPPINESS"),
+ .height = 6,
+ .weight = 32,
+ .description = gTogeticPokedexText,
+ .pokemonScale = 424,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Natu
+ .categoryName = _("TINY BIRD"),
+ .height = 2,
+ .weight = 20,
+ .description = gNatuPokedexText,
+ .pokemonScale = 610,
+ .pokemonOffset = 25,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Xatu
+ .categoryName = _("MYSTIC"),
+ .height = 15,
+ .weight = 150,
+ .description = gXatuPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 318,
+ .trainerOffset = 4,
+ },
+ { //Mareep
+ .categoryName = _("WOOL"),
+ .height = 6,
+ .weight = 78,
+ .description = gMareepPokedexText,
+ .pokemonScale = 379,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Flaaffy
+ .categoryName = _("WOOL"),
+ .height = 8,
+ .weight = 133,
+ .description = gFlaaffyPokedexText,
+ .pokemonScale = 372,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ampharos
+ .categoryName = _("LIGHT"),
+ .height = 14,
+ .weight = 615,
+ .description = gAmpharosPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Bellossom
+ .categoryName = _("FLOWER"),
+ .height = 4,
+ .weight = 58,
+ .description = gBellossomPokedexText,
+ .pokemonScale = 472,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Marill
+ .categoryName = _("AQUA MOUSE"),
+ .height = 4,
+ .weight = 85,
+ .description = gMarillPokedexText,
+ .pokemonScale = 476,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Azumarill
+ .categoryName = _("AQUA RABBIT"),
+ .height = 8,
+ .weight = 285,
+ .description = gAzumarillPokedexText,
+ .pokemonScale = 448,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sudowoodo
+ .categoryName = _("IMITATION"),
+ .height = 12,
+ .weight = 380,
+ .description = gSudowoodoPokedexText,
+ .pokemonScale = 305,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Politoed
+ .categoryName = _("FROG"),
+ .height = 11,
+ .weight = 339,
+ .description = gPolitoedPokedexText,
+ .pokemonScale = 289,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hoppip
+ .categoryName = _("COTTONWEED"),
+ .height = 4,
+ .weight = 5,
+ .description = gHoppipPokedexText,
+ .pokemonScale = 562,
+ .pokemonOffset = -7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Skiploom
+ .categoryName = _("COTTONWEED"),
+ .height = 6,
+ .weight = 10,
+ .description = gSkiploomPokedexText,
+ .pokemonScale = 387,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Jumpluff
+ .categoryName = _("COTTONWEED"),
+ .height = 8,
+ .weight = 30,
+ .description = gJumpluffPokedexText,
+ .pokemonScale = 418,
+ .pokemonOffset = -4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Aipom
+ .categoryName = _("LONG TAIL"),
+ .height = 8,
+ .weight = 115,
+ .description = gAipomPokedexText,
+ .pokemonScale = 363,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sunkern
+ .categoryName = _("SEED"),
+ .height = 3,
+ .weight = 18,
+ .description = gSunkernPokedexText,
+ .pokemonScale = 541,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sunflora
+ .categoryName = _("SUN"),
+ .height = 8,
+ .weight = 85,
+ .description = gSunfloraPokedexText,
+ .pokemonScale = 444,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Yanma
+ .categoryName = _("CLEAR WING"),
+ .height = 12,
+ .weight = 380,
+ .description = gYanmaPokedexText,
+ .pokemonScale = 274,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wooper
+ .categoryName = _("WATER FISH"),
+ .height = 4,
+ .weight = 85,
+ .description = gWooperPokedexText,
+ .pokemonScale = 479,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Quagsire
+ .categoryName = _("WATER FISH"),
+ .height = 14,
+ .weight = 750,
+ .description = gQuagsirePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Espeon
+ .categoryName = _("SUN"),
+ .height = 9,
+ .weight = 265,
+ .description = gEspeonPokedexText,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Umbreon
+ .categoryName = _("MOONLIGHT"),
+ .height = 10,
+ .weight = 270,
+ .description = gUmbreonPokedexText,
+ .pokemonScale = 317,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Murkrow
+ .categoryName = _("DARKNESS"),
+ .height = 5,
+ .weight = 21,
+ .description = gMurkrowPokedexText,
+ .pokemonScale = 401,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 1,
+ },
+ { //Slowking
+ .categoryName = _("ROYAL"),
+ .height = 20,
+ .weight = 795,
+ .description = gSlowkingPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 5,
+ },
+ { //Misdreavus
+ .categoryName = _("SCREECH"),
+ .height = 7,
+ .weight = 10,
+ .description = gMisdreavusPokedexText,
+ .pokemonScale = 407,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Unown
+ .categoryName = _("SYMBOL"),
+ .height = 5,
+ .weight = 50,
+ .description = gUnownPokedexText,
+ .pokemonScale = 411,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wobbuffet
+ .categoryName = _("PATIENT"),
+ .height = 13,
+ .weight = 285,
+ .description = gWobbuffetPokedexText,
+ .pokemonScale = 274,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Girafarig
+ .categoryName = _("LONG NECK"),
+ .height = 15,
+ .weight = 415,
+ .description = gGirafarigPokedexText,
+ .pokemonScale = 281,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pineco
+ .categoryName = _("BAGWORM"),
+ .height = 6,
+ .weight = 72,
+ .description = gPinecoPokedexText,
+ .pokemonScale = 445,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Forretress
+ .categoryName = _("BAGWORM"),
+ .height = 12,
+ .weight = 1258,
+ .description = gForretressPokedexText,
+ .pokemonScale = 293,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Dunsparce
+ .categoryName = _("LAND SNAKE"),
+ .height = 15,
+ .weight = 140,
+ .description = gDunsparcePokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gligar
+ .categoryName = _("FLYSCORPION"),
+ .height = 11,
+ .weight = 648,
+ .description = gGligarPokedexText,
+ .pokemonScale = 350,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Steelix
+ .categoryName = _("IRON SNAKE"),
+ .height = 92,
+ .weight = 4000,
+ .description = gSteelixPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 516,
+ .trainerOffset = 13,
+ },
+ { //Snubbull
+ .categoryName = _("FAIRY"),
+ .height = 6,
+ .weight = 78,
+ .description = gSnubbullPokedexText,
+ .pokemonScale = 465,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Granbull
+ .categoryName = _("FAIRY"),
+ .height = 14,
+ .weight = 487,
+ .description = gGranbullPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Qwilfish
+ .categoryName = _("BALLOON"),
+ .height = 5,
+ .weight = 39,
+ .description = gQwilfishPokedexText,
+ .pokemonScale = 430,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Scizor
+ .categoryName = _("PINCER"),
+ .height = 18,
+ .weight = 1180,
+ .description = gScizorPokedexText,
+ .pokemonScale = 278,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shuckle
+ .categoryName = _("MOLD"),
+ .height = 6,
+ .weight = 205,
+ .description = gShucklePokedexText,
+ .pokemonScale = 485,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Heracross
+ .categoryName = _("SINGLE HORN"),
+ .height = 15,
+ .weight = 540,
+ .description = gHeracrossPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sneasel
+ .categoryName = _("SHARP CLAW"),
+ .height = 9,
+ .weight = 280,
+ .description = gSneaselPokedexText,
+ .pokemonScale = 413,
+ .pokemonOffset = -3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Teddiursa
+ .categoryName = _("LITTLE BEAR"),
+ .height = 6,
+ .weight = 88,
+ .description = gTeddiursaPokedexText,
+ .pokemonScale = 455,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ursaring
+ .categoryName = _("HIBERNATOR"),
+ .height = 18,
+ .weight = 1258,
+ .description = gUrsaringPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Slugma
+ .categoryName = _("LAVA"),
+ .height = 7,
+ .weight = 350,
+ .description = gSlugmaPokedexText,
+ .pokemonScale = 329,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Magcargo
+ .categoryName = _("LAVA"),
+ .height = 8,
+ .weight = 550,
+ .description = gMagcargoPokedexText,
+ .pokemonScale = 332,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Swinub
+ .categoryName = _("PIG"),
+ .height = 4,
+ .weight = 65,
+ .description = gSwinubPokedexText,
+ .pokemonScale = 324,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Piloswine
+ .categoryName = _("SWINE"),
+ .height = 11,
+ .weight = 558,
+ .description = gPiloswinePokedexText,
+ .pokemonScale = 306,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Corsola
+ .categoryName = _("CORAL"),
+ .height = 6,
+ .weight = 50,
+ .description = gCorsolaPokedexText,
+ .pokemonScale = 410,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Remoraid
+ .categoryName = _("JET"),
+ .height = 6,
+ .weight = 120,
+ .description = gRemoraidPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Octillery
+ .categoryName = _("JET"),
+ .height = 9,
+ .weight = 285,
+ .description = gOctilleryPokedexText,
+ .pokemonScale = 296,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Delibird
+ .categoryName = _("DELIVERY"),
+ .height = 9,
+ .weight = 160,
+ .description = gDelibirdPokedexText,
+ .pokemonScale = 293,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Mantine
+ .categoryName = _("KITE"),
+ .height = 21,
+ .weight = 2200,
+ .description = gMantinePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 342,
+ .trainerOffset = 7,
+ },
+ { //Skarmory
+ .categoryName = _("ARMOR BIRD"),
+ .height = 17,
+ .weight = 505,
+ .description = gSkarmoryPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 271,
+ .trainerOffset = 1,
+ },
+ { //Houndour
+ .categoryName = _("DARK"),
+ .height = 6,
+ .weight = 108,
+ .description = gHoundourPokedexText,
+ .pokemonScale = 393,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Houndoom
+ .categoryName = _("DARK"),
+ .height = 14,
+ .weight = 350,
+ .description = gHoundoomPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kingdra
+ .categoryName = _("DRAGON"),
+ .height = 18,
+ .weight = 1520,
+ .description = gKingdraPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 287,
+ .trainerOffset = 0,
+ },
+ { //Phanpy
+ .categoryName = _("LONG NOSE"),
+ .height = 5,
+ .weight = 335,
+ .description = gPhanpyPokedexText,
+ .pokemonScale = 465,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Donphan
+ .categoryName = _("ARMOR"),
+ .height = 11,
+ .weight = 1200,
+ .description = gDonphanPokedexText,
+ .pokemonScale = 313,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Porygon2
+ .categoryName = _("VIRTUAL"),
+ .height = 6,
+ .weight = 325,
+ .description = gPorygon2PokedexText,
+ .pokemonScale = 320,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Stantler
+ .categoryName = _("BIG HORN"),
+ .height = 14,
+ .weight = 712,
+ .description = gStantlerPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Smeargle
+ .categoryName = _("PAINTER"),
+ .height = 12,
+ .weight = 580,
+ .description = gSmearglePokedexText,
+ .pokemonScale = 287,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Tyrogue
+ .categoryName = _("SCUFFLE"),
+ .height = 7,
+ .weight = 210,
+ .description = gTyroguePokedexText,
+ .pokemonScale = 292,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hitmontop
+ .categoryName = _("HANDSTAND"),
+ .height = 14,
+ .weight = 480,
+ .description = gHitmontopPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ { //Smoochum
+ .categoryName = _("KISS"),
+ .height = 4,
+ .weight = 60,
+ .description = gSmoochumPokedexText,
+ .pokemonScale = 440,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Elekid
+ .categoryName = _("ELECTRIC"),
+ .height = 6,
+ .weight = 235,
+ .description = gElekidPokedexText,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Magby
+ .categoryName = _("LIVE COAL"),
+ .height = 7,
+ .weight = 214,
+ .description = gMagbyPokedexText,
+ .pokemonScale = 284,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Miltank
+ .categoryName = _("MILK COW"),
+ .height = 12,
+ .weight = 755,
+ .description = gMiltankPokedexText,
+ .pokemonScale = 280,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Blissey
+ .categoryName = _("HAPPINESS"),
+ .height = 15,
+ .weight = 468,
+ .description = gBlisseyPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 310,
+ .trainerOffset = 3,
+ },
+ { //Raikou
+ .categoryName = _("THUNDER"),
+ .height = 19,
+ .weight = 1780,
+ .description = gRaikouPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ { //Entei
+ .categoryName = _("VOLCANO"),
+ .height = 21,
+ .weight = 1980,
+ .description = gEnteiPokedexText,
+ .pokemonScale = 259,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ { //Suicune
+ .categoryName = _("AURORA"),
+ .height = 20,
+ .weight = 1870,
+ .description = gSuicunePokedexText,
+ .pokemonScale = 269,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ { //Larvitar
+ .categoryName = _("ROCK SKIN"),
+ .height = 6,
+ .weight = 720,
+ .description = gLarvitarPokedexText,
+ .pokemonScale = 472,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pupitar
+ .categoryName = _("HARD SHELL"),
+ .height = 12,
+ .weight = 1520,
+ .description = gPupitarPokedexText,
+ .pokemonScale = 292,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Tyranitar
+ .categoryName = _("ARMOR"),
+ .height = 20,
+ .weight = 2020,
+ .description = gTyranitarPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ { //Lugia
+ .categoryName = _("DIVING"),
+ .height = 52,
+ .weight = 2160,
+ .description = gLugiaPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 721,
+ .trainerOffset = 19,
+ },
+ { //HoOh
+ .categoryName = _("RAINBOW"),
+ .height = 38,
+ .weight = 1990,
+ .description = gHoOhPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 610,
+ .trainerOffset = 17,
+ },
+ { //Celebi
+ .categoryName = _("TIME TRAVEL"),
+ .height = 6,
+ .weight = 50,
+ .description = gCelebiPokedexText,
+ .pokemonScale = 393,
+ .pokemonOffset = -10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Treecko
+ .categoryName = _("WOOD GECKO"),
+ .height = 5,
+ .weight = 50,
+ .description = gTreeckoPokedexText,
+ .pokemonScale = 541,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Grovyle
+ .categoryName = _("WOOD GECKO"),
+ .height = 9,
+ .weight = 216,
+ .description = gGrovylePokedexText,
+ .pokemonScale = 360,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sceptile
+ .categoryName = _("FOREST"),
+ .height = 17,
+ .weight = 522,
+ .description = gSceptilePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = -1,
+ .trainerScale = 275,
+ .trainerOffset = 2,
+ },
+ { //Torchic
+ .categoryName = _("CHICK"),
+ .height = 4,
+ .weight = 25,
+ .description = gTorchicPokedexText,
+ .pokemonScale = 566,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Combusken
+ .categoryName = _("YOUNG FOWL"),
+ .height = 9,
+ .weight = 195,
+ .description = gCombuskenPokedexText,
+ .pokemonScale = 343,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Blaziken
+ .categoryName = _("BLAZE"),
+ .height = 19,
+ .weight = 520,
+ .description = gBlazikenPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 301,
+ .trainerOffset = 4,
+ },
+ { //Mudkip
+ .categoryName = _("MUD FISH"),
+ .height = 4,
+ .weight = 76,
+ .description = gMudkipPokedexText,
+ .pokemonScale = 535,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Marshtomp
+ .categoryName = _("MUD FISH"),
+ .height = 7,
+ .weight = 280,
+ .description = gMarshtompPokedexText,
+ .pokemonScale = 340,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Swampert
+ .categoryName = _("MUD FISH"),
+ .height = 15,
+ .weight = 819,
+ .description = gSwampertPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Poochyena
+ .categoryName = _("BITE"),
+ .height = 5,
+ .weight = 136,
+ .description = gPoochyenaPokedexText,
+ .pokemonScale = 481,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Mightyena
+ .categoryName = _("BITE"),
+ .height = 10,
+ .weight = 370,
+ .description = gMightyenaPokedexText,
+ .pokemonScale = 362,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Zigzagoon
+ .categoryName = _("TINYRACCOON"),
+ .height = 4,
+ .weight = 175,
+ .description = gZigzagoonPokedexText,
+ .pokemonScale = 560,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Linoone
+ .categoryName = _("RUSHING"),
+ .height = 5,
+ .weight = 325,
+ .description = gLinoonePokedexText,
+ .pokemonScale = 321,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wurmple
+ .categoryName = _("WORM"),
+ .height = 3,
+ .weight = 36,
+ .description = gWurmplePokedexText,
+ .pokemonScale = 711,
+ .pokemonOffset = 24,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Silcoon
+ .categoryName = _("COCOON"),
+ .height = 6,
+ .weight = 100,
+ .description = gSilcoonPokedexText,
+ .pokemonScale = 431,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Beautifly
+ .categoryName = _("BUTTERFLY"),
+ .height = 10,
+ .weight = 284,
+ .description = gBeautiflyPokedexText,
+ .pokemonScale = 298,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Cascoon
+ .categoryName = _("COCOON"),
+ .height = 7,
+ .weight = 115,
+ .description = gCascoonPokedexText,
+ .pokemonScale = 391,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Dustox
+ .categoryName = _("POISON MOTH"),
+ .height = 12,
+ .weight = 316,
+ .description = gDustoxPokedexText,
+ .pokemonScale = 269,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Lotad
+ .categoryName = _("WATER WEED"),
+ .height = 5,
+ .weight = 26,
+ .description = gLotadPokedexText,
+ .pokemonScale = 406,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Lombre
+ .categoryName = _("JOLLY"),
+ .height = 12,
+ .weight = 325,
+ .description = gLombrePokedexText,
+ .pokemonScale = 277,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ludicolo
+ .categoryName = _("CAREFREE"),
+ .height = 15,
+ .weight = 550,
+ .description = gLudicoloPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = -1,
+ },
+ { //Seedot
+ .categoryName = _("ACORN"),
+ .height = 5,
+ .weight = 40,
+ .description = gSeedotPokedexText,
+ .pokemonScale = 472,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nuzleaf
+ .categoryName = _("WILY"),
+ .height = 10,
+ .weight = 280,
+ .description = gNuzleafPokedexText,
+ .pokemonScale = 299,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shiftry
+ .categoryName = _("WICKED"),
+ .height = 13,
+ .weight = 596,
+ .description = gShiftryPokedexText,
+ .pokemonScale = 290,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Taillow
+ .categoryName = _("TINYSWALLOW"),
+ .height = 3,
+ .weight = 23,
+ .description = gTaillowPokedexText,
+ .pokemonScale = 465,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Swellow
+ .categoryName = _("SWALLOW"),
+ .height = 7,
+ .weight = 198,
+ .description = gSwellowPokedexText,
+ .pokemonScale = 428,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wingull
+ .categoryName = _("SEAGULL"),
+ .height = 6,
+ .weight = 95,
+ .description = gWingullPokedexText,
+ .pokemonScale = 295,
+ .pokemonOffset = -2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Pelipper
+ .categoryName = _("WATER BIRD"),
+ .height = 12,
+ .weight = 280,
+ .description = gPelipperPokedexText,
+ .pokemonScale = 288,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ralts
+ .categoryName = _("FEELING"),
+ .height = 4,
+ .weight = 66,
+ .description = gRaltsPokedexText,
+ .pokemonScale = 457,
+ .pokemonOffset = -3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kirlia
+ .categoryName = _("EMOTION"),
+ .height = 8,
+ .weight = 202,
+ .description = gKirliaPokedexText,
+ .pokemonScale = 354,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gardevoir
+ .categoryName = _("EMBRACE"),
+ .height = 16,
+ .weight = 484,
+ .description = gGardevoirPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Surskit
+ .categoryName = _("POND SKATER"),
+ .height = 5,
+ .weight = 17,
+ .description = gSurskitPokedexText,
+ .pokemonScale = 375,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Masquerain
+ .categoryName = _("EYEBALL"),
+ .height = 8,
+ .weight = 36,
+ .description = gMasquerainPokedexText,
+ .pokemonScale = 378,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shroomish
+ .categoryName = _("MUSHROOM"),
+ .height = 4,
+ .weight = 45,
+ .description = gShroomishPokedexText,
+ .pokemonScale = 513,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Breloom
+ .categoryName = _("MUSHROOM"),
+ .height = 12,
+ .weight = 392,
+ .description = gBreloomPokedexText,
+ .pokemonScale = 324,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Slakoth
+ .categoryName = _("SLACKER"),
+ .height = 8,
+ .weight = 240,
+ .description = gSlakothPokedexText,
+ .pokemonScale = 291,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Vigoroth
+ .categoryName = _("WILD MONKEY"),
+ .height = 14,
+ .weight = 465,
+ .description = gVigorothPokedexText,
+ .pokemonScale = 301,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Slaking
+ .categoryName = _("LAZY"),
+ .height = 20,
+ .weight = 1305,
+ .description = gSlakingPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 300,
+ .trainerOffset = 1,
+ },
+ { //Nincada
+ .categoryName = _("TRAINEE"),
+ .height = 5,
+ .weight = 55,
+ .description = gNincadaPokedexText,
+ .pokemonScale = 405,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Ninjask
+ .categoryName = _("NINJA"),
+ .height = 8,
+ .weight = 120,
+ .description = gNinjaskPokedexText,
+ .pokemonScale = 383,
+ .pokemonOffset = -9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shedinja
+ .categoryName = _("SHED"),
+ .height = 8,
+ .weight = 12,
+ .description = gShedinjaPokedexText,
+ .pokemonScale = 372,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Whismur
+ .categoryName = _("WHISPER"),
+ .height = 6,
+ .weight = 163,
+ .description = gWhismurPokedexText,
+ .pokemonScale = 373,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Loudred
+ .categoryName = _("BIG VOICE"),
+ .height = 10,
+ .weight = 405,
+ .description = gLoudredPokedexText,
+ .pokemonScale = 356,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Exploud
+ .categoryName = _("LOUD NOISE"),
+ .height = 15,
+ .weight = 840,
+ .description = gExploudPokedexText,
+ .pokemonScale = 284,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Makuhita
+ .categoryName = _("GUTS"),
+ .height = 10,
+ .weight = 864,
+ .description = gMakuhitaPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Hariyama
+ .categoryName = _("ARM THRUST"),
+ .height = 23,
+ .weight = 2538,
+ .description = gHariyamaPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 343,
+ .trainerOffset = 7,
+ },
+ { //Azurill
+ .categoryName = _("POLKA DOT"),
+ .height = 2,
+ .weight = 20,
+ .description = gAzurillPokedexText,
+ .pokemonScale = 603,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Nosepass
+ .categoryName = _("COMPASS"),
+ .height = 10,
+ .weight = 970,
+ .description = gNosepassPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 9,
+ .trainerScale = 289,
+ .trainerOffset = 3,
+ },
+ { //Skitty
+ .categoryName = _("KITTEN"),
+ .height = 6,
+ .weight = 110,
+ .description = gSkittyPokedexText,
+ .pokemonScale = 492,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Delcatty
+ .categoryName = _("PRIM"),
+ .height = 11,
+ .weight = 326,
+ .description = gDelcattyPokedexText,
+ .pokemonScale = 322,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sableye
+ .categoryName = _("DARKNESS"),
+ .height = 5,
+ .weight = 110,
+ .description = gSableyePokedexText,
+ .pokemonScale = 451,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Mawile
+ .categoryName = _("DECEIVER"),
+ .height = 6,
+ .weight = 115,
+ .description = gMawilePokedexText,
+ .pokemonScale = 466,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Aron
+ .categoryName = _("IRON ARMOR"),
+ .height = 4,
+ .weight = 600,
+ .description = gAronPokedexText,
+ .pokemonScale = 419,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Lairon
+ .categoryName = _("IRON ARMOR"),
+ .height = 9,
+ .weight = 1200,
+ .description = gLaironPokedexText,
+ .pokemonScale = 275,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Aggron
+ .categoryName = _("IRON ARMOR"),
+ .height = 21,
+ .weight = 3600,
+ .description = gAggronPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = -1,
+ .trainerScale = 350,
+ .trainerOffset = 6,
+ },
+ { //Meditite
+ .categoryName = _("MEDITATE"),
+ .height = 6,
+ .weight = 112,
+ .description = gMedititePokedexText,
+ .pokemonScale = 465,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Medicham
+ .categoryName = _("MEDITATE"),
+ .height = 13,
+ .weight = 315,
+ .description = gMedichamPokedexText,
+ .pokemonScale = 298,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Electrike
+ .categoryName = _("LIGHTNING"),
+ .height = 6,
+ .weight = 152,
+ .description = gElectrikePokedexText,
+ .pokemonScale = 290,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Manectric
+ .categoryName = _("DISCHARGE"),
+ .height = 15,
+ .weight = 402,
+ .description = gManectricPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ { //Plusle
+ .categoryName = _("CHEERING"),
+ .height = 4,
+ .weight = 42,
+ .description = gPluslePokedexText,
+ .pokemonScale = 515,
+ .pokemonOffset = -9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Minun
+ .categoryName = _("CHEERING"),
+ .height = 4,
+ .weight = 42,
+ .description = gMinunPokedexText,
+ .pokemonScale = 512,
+ .pokemonOffset = -7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Volbeat
+ .categoryName = _("FIREFLY"),
+ .height = 7,
+ .weight = 177,
+ .description = gVolbeatPokedexText,
+ .pokemonScale = 442,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Illumise
+ .categoryName = _("FIREFLY"),
+ .height = 6,
+ .weight = 177,
+ .description = gIllumisePokedexText,
+ .pokemonScale = 572,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Roselia
+ .categoryName = _("THORN"),
+ .height = 3,
+ .weight = 20,
+ .description = gRoseliaPokedexText,
+ .pokemonScale = 677,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gulpin
+ .categoryName = _("STOMACH"),
+ .height = 4,
+ .weight = 103,
+ .description = gGulpinPokedexText,
+ .pokemonScale = 593,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Swalot
+ .categoryName = _("POISON BAG"),
+ .height = 17,
+ .weight = 800,
+ .description = gSwalotPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 345,
+ .trainerOffset = 3,
+ },
+ { //Carvanha
+ .categoryName = _("SAVAGE"),
+ .height = 8,
+ .weight = 208,
+ .description = gCarvanhaPokedexText,
+ .pokemonScale = 362,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sharpedo
+ .categoryName = _("BRUTAL"),
+ .height = 18,
+ .weight = 888,
+ .description = gSharpedoPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 317,
+ .trainerOffset = 3,
+ },
+ { //Wailmer
+ .categoryName = _("BALL WHALE"),
+ .height = 20,
+ .weight = 1300,
+ .description = gWailmerPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 493,
+ .trainerOffset = 0,
+ },
+ { //Wailord
+ .categoryName = _("FLOAT WHALE"),
+ .height = 145,
+ .weight = 3980,
+ .description = gWailordPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 1352,
+ .trainerOffset = 18,
+ },
+ { //Numel
+ .categoryName = _("NUMB"),
+ .height = 7,
+ .weight = 240,
+ .description = gNumelPokedexText,
+ .pokemonScale = 342,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Camerupt
+ .categoryName = _("ERUPTION"),
+ .height = 19,
+ .weight = 2200,
+ .description = gCameruptPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 7,
+ .trainerScale = 345,
+ .trainerOffset = 6,
+ },
+ { //Torkoal
+ .categoryName = _("COAL"),
+ .height = 5,
+ .weight = 804,
+ .description = gTorkoalPokedexText,
+ .pokemonScale = 390,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Spoink
+ .categoryName = _("BOUNCE"),
+ .height = 7,
+ .weight = 306,
+ .description = gSpoinkPokedexText,
+ .pokemonScale = 423,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Grumpig
+ .categoryName = _("MANIPULATE"),
+ .height = 9,
+ .weight = 715,
+ .description = gGrumpigPokedexText,
+ .pokemonScale = 358,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Spinda
+ .categoryName = _("SPOT PANDA"),
+ .height = 11,
+ .weight = 50,
+ .description = gSpindaPokedexText,
+ .pokemonScale = 321,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Trapinch
+ .categoryName = _("ANT PIT"),
+ .height = 7,
+ .weight = 150,
+ .description = gTrapinchPokedexText,
+ .pokemonScale = 298,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Vibrava
+ .categoryName = _("VIBRATION"),
+ .height = 11,
+ .weight = 153,
+ .description = gVibravaPokedexText,
+ .pokemonScale = 370,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Flygon
+ .categoryName = _("MYSTIC"),
+ .height = 20,
+ .weight = 820,
+ .description = gFlygonPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 1,
+ },
+ { //Cacnea
+ .categoryName = _("CACTUS"),
+ .height = 4,
+ .weight = 513,
+ .description = gCacneaPokedexText,
+ .pokemonScale = 455,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Cacturne
+ .categoryName = _("SCARECROW"),
+ .height = 13,
+ .weight = 774,
+ .description = gCacturnePokedexText,
+ .pokemonScale = 327,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Swablu
+ .categoryName = _("COTTON BIRD"),
+ .height = 4,
+ .weight = 12,
+ .description = gSwabluPokedexText,
+ .pokemonScale = 422,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Altaria
+ .categoryName = _("HUMMING"),
+ .height = 11,
+ .weight = 206,
+ .description = gAltariaPokedexText,
+ .pokemonScale = 327,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Zangoose
+ .categoryName = _("CAT FERRET"),
+ .height = 13,
+ .weight = 403,
+ .description = gZangoosePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Seviper
+ .categoryName = _("FANG SNAKE"),
+ .height = 27,
+ .weight = 525,
+ .description = gSeviperPokedexText,
+ .pokemonScale = 275,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Lunatone
+ .categoryName = _("METEORITE"),
+ .height = 10,
+ .weight = 1680,
+ .description = gLunatonePokedexText,
+ .pokemonScale = 300,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Solrock
+ .categoryName = _("METEORITE"),
+ .height = 12,
+ .weight = 1540,
+ .description = gSolrockPokedexText,
+ .pokemonScale = 328,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Barboach
+ .categoryName = _("WHISKERS"),
+ .height = 4,
+ .weight = 19,
+ .description = gBarboachPokedexText,
+ .pokemonScale = 581,
+ .pokemonOffset = -3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Whiscash
+ .categoryName = _("WHISKERS"),
+ .height = 9,
+ .weight = 236,
+ .description = gWhiscashPokedexText,
+ .pokemonScale = 317,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Corphish
+ .categoryName = _("RUFFIAN"),
+ .height = 6,
+ .weight = 115,
+ .description = gCorphishPokedexText,
+ .pokemonScale = 484,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Crawdaunt
+ .categoryName = _("ROGUE"),
+ .height = 11,
+ .weight = 328,
+ .description = gCrawdauntPokedexText,
+ .pokemonScale = 365,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Baltoy
+ .categoryName = _("CLAY DOLL"),
+ .height = 5,
+ .weight = 215,
+ .description = gBaltoyPokedexText,
+ .pokemonScale = 457,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Claydol
+ .categoryName = _("CLAY DOLL"),
+ .height = 15,
+ .weight = 1080,
+ .description = gClaydolPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 280,
+ .trainerOffset = 1,
+ },
+ { //Lileep
+ .categoryName = _("SEA LILY"),
+ .height = 10,
+ .weight = 238,
+ .description = gLileepPokedexText,
+ .pokemonScale = 305,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Cradily
+ .categoryName = _("BARNACLE"),
+ .height = 15,
+ .weight = 604,
+ .description = gCradilyPokedexText,
+ .pokemonScale = 267,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Anorith
+ .categoryName = _("OLD SHRIMP"),
+ .height = 7,
+ .weight = 125,
+ .description = gAnorithPokedexText,
+ .pokemonScale = 296,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Armaldo
+ .categoryName = _("PLATE"),
+ .height = 15,
+ .weight = 682,
+ .description = gArmaldoPokedexText,
+ .pokemonScale = 312,
+ .pokemonOffset = 3,
+ .trainerScale = 271,
+ .trainerOffset = 0,
+ },
+ { //Feebas
+ .categoryName = _("FISH"),
+ .height = 6,
+ .weight = 74,
+ .description = gFeebasPokedexText,
+ .pokemonScale = 423,
+ .pokemonOffset = -4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Milotic
+ .categoryName = _("TENDER"),
+ .height = 62,
+ .weight = 1620,
+ .description = gMiloticPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 360,
+ .trainerOffset = 7,
+ },
+ { //Castform
+ .categoryName = _("WEATHER"),
+ .height = 3,
+ .weight = 8,
+ .description = gCastformPokedexText,
+ .pokemonScale = 435,
+ .pokemonOffset = -5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Kecleon
+ .categoryName = _("COLOR SWAP"),
+ .height = 10,
+ .weight = 220,
+ .description = gKecleonPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shuppet
+ .categoryName = _("PUPPET"),
+ .height = 6,
+ .weight = 23,
+ .description = gShuppetPokedexText,
+ .pokemonScale = 440,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Banette
+ .categoryName = _("MARIONETTE"),
+ .height = 11,
+ .weight = 125,
+ .description = gBanettePokedexText,
+ .pokemonScale = 262,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Duskull
+ .categoryName = _("REQUIEM"),
+ .height = 8,
+ .weight = 150,
+ .description = gDuskullPokedexText,
+ .pokemonScale = 406,
+ .pokemonOffset = -4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Dusclops
+ .categoryName = _("BECKON"),
+ .height = 16,
+ .weight = 306,
+ .description = gDusclopsPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 299,
+ .trainerOffset = 1,
+ },
+ { //Tropius
+ .categoryName = _("FRUIT"),
+ .height = 20,
+ .weight = 1000,
+ .description = gTropiusPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 344,
+ .trainerOffset = 7,
+ },
+ { //Chimecho
+ .categoryName = _("WIND CHIME"),
+ .height = 6,
+ .weight = 10,
+ .description = gChimechoPokedexText,
+ .pokemonScale = 505,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Absol
+ .categoryName = _("DISASTER"),
+ .height = 12,
+ .weight = 470,
+ .description = gAbsolPokedexText,
+ .pokemonScale = 301,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Wynaut
+ .categoryName = _("BRIGHT"),
+ .height = 6,
+ .weight = 140,
+ .description = gWynautPokedexText,
+ .pokemonScale = 484,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Snorunt
+ .categoryName = _("SNOW HAT"),
+ .height = 7,
+ .weight = 168,
+ .description = gSnoruntPokedexText,
+ .pokemonScale = 380,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Glalie
+ .categoryName = _("FACE"),
+ .height = 15,
+ .weight = 2565,
+ .description = gGlaliePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 344,
+ .trainerOffset = 0,
+ },
+ { //Spheal
+ .categoryName = _("CLAP"),
+ .height = 8,
+ .weight = 395,
+ .description = gSphealPokedexText,
+ .pokemonScale = 315,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Sealeo
+ .categoryName = _("BALL ROLL"),
+ .height = 11,
+ .weight = 876,
+ .description = gSealeoPokedexText,
+ .pokemonScale = 338,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Walrein
+ .categoryName = _("ICE BREAK"),
+ .height = 14,
+ .weight = 1506,
+ .description = gWalreinPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Clamperl
+ .categoryName = _("BIVALVE"),
+ .height = 4,
+ .weight = 525,
+ .description = gClamperlPokedexText,
+ .pokemonScale = 691,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Huntail
+ .categoryName = _("DEEP SEA"),
+ .height = 17,
+ .weight = 270,
+ .description = gHuntailPokedexText,
+ .pokemonScale = 307,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Gorebyss
+ .categoryName = _("SOUTH SEA"),
+ .height = 18,
+ .weight = 226,
+ .description = gGorebyssPokedexText,
+ .pokemonScale = 278,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Relicanth
+ .categoryName = _("LONGEVITY"),
+ .height = 10,
+ .weight = 234,
+ .description = gRelicanthPokedexText,
+ .pokemonScale = 316,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Luvdisc
+ .categoryName = _("RENDEZVOUS"),
+ .height = 6,
+ .weight = 87,
+ .description = gLuvdiscPokedexText,
+ .pokemonScale = 371,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Bagon
+ .categoryName = _("ROCK HEAD"),
+ .height = 6,
+ .weight = 421,
+ .description = gBagonPokedexText,
+ .pokemonScale = 448,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Shelgon
+ .categoryName = _("ENDURANCE"),
+ .height = 11,
+ .weight = 1105,
+ .description = gShelgonPokedexText,
+ .pokemonScale = 311,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Salamence
+ .categoryName = _("DRAGON"),
+ .height = 15,
+ .weight = 1026,
+ .description = gSalamencePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Beldum
+ .categoryName = _("IRON BALL"),
+ .height = 6,
+ .weight = 952,
+ .description = gBeldumPokedexText,
+ .pokemonScale = 414,
+ .pokemonOffset = -1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Metang
+ .categoryName = _("IRON CLAW"),
+ .height = 12,
+ .weight = 2025,
+ .description = gMetangPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Metagross
+ .categoryName = _("IRON LEG"),
+ .height = 16,
+ .weight = 5500,
+ .description = gMetagrossPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 447,
+ .trainerOffset = 9,
+ },
+ { //Regirock
+ .categoryName = _("ROCK PEAK"),
+ .height = 17,
+ .weight = 2300,
+ .description = gRegirockPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 309,
+ .trainerOffset = 1,
+ },
+ { //Regice
+ .categoryName = _("ICEBERG"),
+ .height = 18,
+ .weight = 1750,
+ .description = gRegicePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 301,
+ .trainerOffset = 2,
+ },
+ { //Registeel
+ .categoryName = _("IRON"),
+ .height = 19,
+ .weight = 2050,
+ .description = gRegisteelPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 359,
+ .trainerOffset = 6,
+ },
+ { //Latias
+ .categoryName = _("EON"),
+ .height = 14,
+ .weight = 400,
+ .description = gLatiasPokedexText,
+ .pokemonScale = 304,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Latios
+ .categoryName = _("EON"),
+ .height = 20,
+ .weight = 600,
+ .description = gLatiosPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 294,
+ .trainerOffset = 3,
+ },
+ { //Kyogre
+ .categoryName = _("SEA BASIN"),
+ .height = 45,
+ .weight = 3520,
+ .description = gKyogrePokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 614,
+ .trainerOffset = 13,
+ },
+ { //Groudon
+ .categoryName = _("CONTINENT"),
+ .height = 35,
+ .weight = 9500,
+ .description = gGroudonPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 515,
+ .trainerOffset = 14,
+ },
+ { //Rayquaza
+ .categoryName = _("SKY HIGH"),
+ .height = 70,
+ .weight = 2065,
+ .description = gRayquazaPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 448,
+ .trainerOffset = 12,
+ },
+ { //Jirachi
+ .categoryName = _("WISH"),
+ .height = 3,
+ .weight = 11,
+ .description = gJirachiPokedexText,
+ .pokemonScale = 608,
+ .pokemonOffset = -8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ { //Deoxys
+ .categoryName = _("DNA"),
+ .height = 17,
+ .weight = 608,
+ .description = gDeoxysPokedexText,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 290,
+ .trainerOffset = 2,
+ },
+};
diff --git a/src/data/pokemon/pokedex_text.h b/src/data/pokemon/pokedex_text.h
new file mode 100644
index 000000000..565c1acaf
--- /dev/null
+++ b/src/data/pokemon/pokedex_text.h
@@ -0,0 +1,2321 @@
+const u8 gDummyPokedexText[] = _(
+ "This is a newly discovered POKéMON.\n"
+ "It is currently under investigation.\n"
+ "No detailed information is available\n"
+ "at this time.");
+
+const u8 gBulbasaurPokedexText[] = _(
+ "BULBASAUR can be seen napping in bright\n"
+ "sunlight. There is a seed on its back.\n"
+ "By soaking up the sun’s rays, the seed\n"
+ "grows progressively larger.");
+
+const u8 gIvysaurPokedexText[] = _(
+ "To support its bulb, IVYSAUR’s legs\n"
+ "grow sturdy. If it spends more time lying in\n"
+ "the sunlight, the bud will soon bloom into\n"
+ "a large flower.");
+
+const u8 gVenusaurPokedexText[] = _(
+ "VENUSAUR’s flower is said to take on vivid\n"
+ "colors if it gets plenty of nutrition and\n"
+ "sunlight. The flower’s aroma soothes the\n"
+ "emotions of people.");
+
+const u8 gCharmanderPokedexText[] = _(
+ "The flame that burns at the tip of its\n"
+ "tail is an indication of its emotions.\n"
+ "The flame wavers when CHARMANDER is\n"
+ "happy, and blazes when it is enraged.");
+
+const u8 gCharmeleonPokedexText[] = _(
+ "Without pity, its sharp claws destroy foes.\n"
+ "If it encounters a strong enemy, it\n"
+ "becomes agitated, and the flame on its\n"
+ "tail flares with a bluish white color.");
+
+const u8 gCharizardPokedexText[] = _(
+ "A CHARIZARD flies about in search of\n"
+ "strong opponents. It breathes intense\n"
+ "flames that can melt any material. However,\n"
+ "it will never torch a weaker foe.");
+
+const u8 gSquirtlePokedexText[] = _(
+ "Its shell is not just for protection.\n"
+ "Its rounded shape and the grooves on its\n"
+ "surface minimize resistance in water,\n"
+ "enabling SQUIRTLE to swim at high speeds.");
+
+const u8 gWartortlePokedexText[] = _(
+ "Its large tail is covered with rich, thick\n"
+ "fur that deepens in color with age.\n"
+ "The scratches on its shell are evidence\n"
+ "of this POKéMON’s toughness in battle.");
+
+const u8 gBlastoisePokedexText[] = _(
+ "The waterspouts that protrude from its\n"
+ "shell are highly accurate. Their bullets of\n"
+ "water can precisely nail tin cans from\n"
+ "a distance of over 160 feet.");
+
+const u8 gCaterpiePokedexText[] = _(
+ "Its voracious appetite compels it to\n"
+ "devour leaves bigger than itself without\n"
+ "hesitation. It releases a terribly strong\n"
+ "odor from its antennae.");
+
+const u8 gMetapodPokedexText[] = _(
+ "Its shell is as hard as an iron slab.\n"
+ "A METAPOD does not move very much\n"
+ "because it is preparing its soft innards\n"
+ "for evolution inside the shell.");
+
+const u8 gButterfreePokedexText[] = _(
+ "It has a superior ability to search for\n"
+ "delicious honey from flowers. It can seek,\n"
+ "extract, and carry honey from flowers\n"
+ "blooming over six miles away.");
+
+const u8 gWeedlePokedexText[] = _(
+ "A WEEDLE has an extremely acute sense\n"
+ "of smell. It distinguishes its favorite\n"
+ "kinds of leaves from those it dislikes by\n"
+ "sniffing with its big red proboscis (nose).");
+
+const u8 gKakunaPokedexText[] = _(
+ "It remains virtually immobile while it\n"
+ "clings to a tree. However, on the inside,\n"
+ "it busily prepares for evolution. This is\n"
+ "evident from how hot its shell becomes.");
+
+const u8 gBeedrillPokedexText[] = _(
+ "A BEEDRILL is extremely territorial.\n"
+ "For safety reasons, no one should \n"
+ "ever approach its nest. If angered,\n"
+ "they will attack in a swarm.");
+
+const u8 gPidgeyPokedexText[] = _(
+ "It has an extremely sharp sense of\n"
+ "direction. It can unerringly return home to\n"
+ "its nest, however far it may be removed\n"
+ "from its familiar surroundings.");
+
+const u8 gPidgeottoPokedexText[] = _(
+ "This POKéMON flies around, patrolling its\n"
+ "large territory. If its living space is\n"
+ "violated, it shows no mercy in thoroughly\n"
+ "punishing the foe with its sharp claws.");
+
+const u8 gPidgeotPokedexText[] = _(
+ "This POKéMON has gorgeous, glossy\n"
+ "feathers. Many TRAINERS are so captivated\n"
+ "by the beautiful feathers on its head that\n"
+ "they choose PIDGEOT as their POKéMON.");
+
+const u8 gRattataPokedexText[] = _(
+ "A RATTATA is cautious in the extreme.\n"
+ "Even while it is asleep, it constantly\n"
+ "moves its ears and listens for danger.\n"
+ "It will make its nest anywhere.");
+
+const u8 gRaticatePokedexText[] = _(
+ "A RATICATE’s sturdy fangs grow steadily.\n"
+ "To keep them ground down, it gnaws on\n"
+ "rocks and logs. It may even chew on the\n"
+ "walls of houses.");
+
+const u8 gSpearowPokedexText[] = _(
+ "Its loud cry can be heard over half a mile\n"
+ "away. If its high, keening cry is heard\n"
+ "echoing all around, it is a sign that they\n"
+ "are warning each other of danger.");
+
+const u8 gFearowPokedexText[] = _(
+ "Its long neck and elongated beak are\n"
+ "ideal for catching prey in soil or water.\n"
+ "It deftly moves this extended and skinny\n"
+ "beak to pluck prey.");
+
+const u8 gEkansPokedexText[] = _(
+ "An EKANS curls itself up in a spiral while\n"
+ "it rests. This position allows it to quickly\n"
+ "respond to an enemy from any direction\n"
+ "with a threat from its upraised head.");
+
+const u8 gArbokPokedexText[] = _(
+ "This POKéMON has a terrifically strong\n"
+ "constricting power. It can even flatten\n"
+ "steel oil drums. Once it wraps its body\n"
+ "around its foe, escaping is impossible.");
+
+const u8 gPikachuPokedexText[] = _(
+ "It stores electricity in the electric sacs\n"
+ "on its cheeks. When it releases pent-up\n"
+ "energy in a burst, the electric power is\n"
+ "equal to a lightning bolt.");
+
+const u8 gRaichuPokedexText[] = _(
+ "If it stores too much electricity, its\n"
+ "behavior turns aggressive. To avoid this,\n"
+ "it occasionally discharges excess energy\n"
+ "and calms itself down.");
+
+const u8 gSandshrewPokedexText[] = _(
+ "When it curls up in a ball, it can make any\n"
+ "attack bounce off harmlessly. Its hide has\n"
+ "turned tough and solid as a result of\n"
+ "living in the desert.");
+
+const u8 gSandslashPokedexText[] = _(
+ "It curls up in a ball to protect itself from\n"
+ "enemy attacks. It also curls up to prevent\n"
+ "heatstroke during the daytime when\n"
+ "temperatures rise sharply.");
+
+const u8 gNidoranFPokedexText[] = _(
+ "Its highly toxic barbs are thought to have\n"
+ "developed as protection for this small-\n"
+ "bodied POKéMON. When enraged, it releases\n"
+ "a horrible toxin from its horn.");
+
+const u8 gNidorinaPokedexText[] = _(
+ "When it is with its friends or\n"
+ "family, its barbs are tucked away to\n"
+ "prevent injury. It appears to become\n"
+ "nervous if separated from the others.");
+
+const u8 gNidoqueenPokedexText[] = _(
+ "It is adept at sending foes flying with\n"
+ "harsh tackles using its tough, scaly body.\n"
+ "This POKéMON is at its strongest when\n"
+ "it is defending its young.");
+
+const u8 gNidoranMPokedexText[] = _(
+ "The male NIDORAN has developed muscles\n"
+ "that freely move its ears in any direction.\n"
+ "Even the slightest sound does not escape\n"
+ "this POKéMON’s notice.");
+
+const u8 gNidorinoPokedexText[] = _(
+ "Its horn is harder than a diamond.\n"
+ "If it senses a hostile presence, all the\n"
+ "barbs on its back bristle up at once, and it\n"
+ "challenges the foe with all its might.");
+
+const u8 gNidokingPokedexText[] = _(
+ "A NIDOKING’s thick tail packs enormously\n"
+ "destructive power capable of toppling\n"
+ "a metal transmission tower. Once it goes\n"
+ "on a rampage, there is no stopping it.");
+
+const u8 gClefairyPokedexText[] = _(
+ "On every night of a full moon, they come\n"
+ "out to play. When dawn arrives, the tired\n"
+ "CLEFAIRY go to sleep nestled up against\n"
+ "each other in deep and quiet mountains.");
+
+const u8 gClefablePokedexText[] = _(
+ "A CLEFABLE uses its wings to skip lightly \n"
+ "as if it were flying. Its bouncy step\n"
+ "lets it even walk on water. On quiet,\n"
+ "moonlit nights, it strolls on lakes.");
+
+const u8 gVulpixPokedexText[] = _(
+ "It can freely control fire, making fiery\n"
+ "orbs fly like will-o’-the-wisps. Just\n"
+ "before evolution, its six tails grow hot \n"
+ "as if on fire.");
+
+const u8 gNinetalesPokedexText[] = _(
+ "It has long been said that each of the\n"
+ "nine tails embody an enchanted power.\n"
+ "A long-lived NINETALES will have fur that\n"
+ "shines like gold.");
+
+const u8 gJigglypuffPokedexText[] = _(
+ "Nothing can avoid falling asleep hearing a\n"
+ "JIGGLYPUFF’s song. The sound waves of its\n"
+ "singing voice match the brain waves of\n"
+ "someone in a deep sleep.");
+
+const u8 gWigglytuffPokedexText[] = _(
+ "Its fur is the ultimate in luxuriousness.\n"
+ "Sleeping alongside a WIGGLYTUFF is simply\n"
+ "divine. Its body expands seemingly without\n"
+ "end when it inhales.");
+
+const u8 gZubatPokedexText[] = _(
+ "While living in pitch-black caverns, their\n"
+ "eyes gradually grew shut and deprived\n"
+ "them of vision. They use ultrasonic waves\n"
+ "to detect obstacles.");
+
+const u8 gGolbatPokedexText[] = _(
+ "Its fangs easily puncture even thick\n"
+ "animal hide. It loves to feast on the blood\n"
+ "of people and POKéMON. It flits about in\n"
+ "darkness and strikes from behind.");
+
+const u8 gOddishPokedexText[] = _(
+ "This POKéMON grows by absorbing moonlight.\n"
+ "During the daytime, it buries itself in the\n"
+ "ground, leaving only its leaves exposed to\n"
+ "avoid detection by its enemies.");
+
+const u8 gGloomPokedexText[] = _(
+ "A horribly noxious honey drools from its\n"
+ "mouth. One whiff of the honey can result\n"
+ "in memory loss. Some fans are said to\n"
+ "enjoy this overwhelming stink, however.");
+
+const u8 gVileplumePokedexText[] = _(
+ "In seasons when it produces more pollen,\n"
+ "the air around a VILEPLUME turns yellow\n"
+ "with the powder as it walks. The pollen is\n"
+ "highly toxic and causes paralysis.");
+
+const u8 gParasPokedexText[] = _(
+ "A PARAS has parasitic tochukaso\n"
+ "mushrooms growing on its back. They grow\n"
+ "by drawing nutrients from the host. They\n"
+ "are valued as a medicine for long life.");
+
+const u8 gParasectPokedexText[] = _(
+ "PARASECT are known to infest the roots of\n"
+ "large trees en masse and drain nutrients.\n"
+ "When an infested tree dies, they move\n"
+ "onto another tree all at once.");
+
+const u8 gVenonatPokedexText[] = _(
+ "Its coat of thin, stiff hair that covers\n"
+ "its entire body is said to have evolved\n"
+ "for protection. Its large eyes never fail\n"
+ "to spot even miniscule prey.");
+
+const u8 gVenomothPokedexText[] = _(
+ "VENOMOTH are nocturnal--they only are\n"
+ "active at night. Their favorite prey are\n"
+ "insects that gather around streetlights,\n"
+ "attracted by the light in the darkness.");
+
+const u8 gDiglettPokedexText[] = _(
+ "DIGLETT are raised in most farms.\n"
+ "The reason is simple--wherever they\n"
+ "burrow, the soil is left perfectly tilled\n"
+ "for growing delicious crops.");
+
+const u8 gDugtrioPokedexText[] = _(
+ "Because the triplets originally split from\n"
+ "one body, they think exactly alike.\n"
+ "They work cooperatively to burrow\n"
+ "endlessly through the ground.");
+
+const u8 gMeowthPokedexText[] = _(
+ "MEOWTH withdraw their sharp claws into\n"
+ "their paws to silently sneak about.\n"
+ "For some reason, this POKéMON loves\n"
+ "shiny coins that glitter with light.");
+
+const u8 gPersianPokedexText[] = _(
+ "A PERSIAN’s six bold whiskers sense air\n"
+ "movements to determine what is in its\n"
+ "vicinity. It becomes docile if grabbed\n"
+ "by the whiskers.");
+
+const u8 gPsyduckPokedexText[] = _(
+ "When its headache intensifies, it starts\n"
+ "using strange powers. However, it has no\n"
+ "recollection of its powers, so it always\n"
+ "looks befuddled and bewildered.");
+
+const u8 gGolduckPokedexText[] = _(
+ "A GOLDUCK is an adept swimmer.\n"
+ "It sometimes joins competitive swimmers\n"
+ "in training. It uses psychic powers when\n"
+ "its forehead shimmers with light.");
+
+const u8 gMankeyPokedexText[] = _(
+ "When it starts shaking and its nasal\n"
+ "breathing turns rough, it’s a sure sign\n"
+ "of anger. However, since this happens\n"
+ "instantly, there is no time to flee.");
+
+const u8 gPrimeapePokedexText[] = _(
+ "When it becomes furious, its blood\n"
+ "circulation becomes more robust, and\n"
+ "its muscles are made stronger. But it\n"
+ "also becomes much less intelligent.");
+
+const u8 gGrowlithePokedexText[] = _(
+ "Its superb sense of smell ensures that\n"
+ "this POKéMON won’t forget any scent,\n"
+ "no matter what. It uses its sense of smell\n"
+ "to detect the emotions of others.");
+
+const u8 gArcaninePokedexText[] = _(
+ "This fleet-footed POKéMON is said to run\n"
+ "over 6,200 miles in a single day and night.\n"
+ "The fire that blazes wildly within its body\n"
+ "is its source of power.");
+
+const u8 gPoliwagPokedexText[] = _(
+ "It is possible to see this POKéMON’s spiral\n"
+ "innards right through its thin skin.\n"
+ "However, the skin is also very flexible.\n"
+ "Even sharp fangs bounce right off it.");
+
+const u8 gPoliwhirlPokedexText[] = _(
+ "Its body surface is always wet and slick\n"
+ "with an oily fluid. Because of this greasy\n"
+ "covering, it can easily slip and slide out\n"
+ "of the clutches of any enemy in battle.");
+
+const u8 gPoliwrathPokedexText[] = _(
+ "Its highly developed muscles never grow\n"
+ "fatigued, however much it exercises.\n"
+ "This POKéMON can swim back and forth\n"
+ "across the Pacific Ocean without effort.");
+
+const u8 gAbraPokedexText[] = _(
+ "A POKéMON that sleeps 18 hours a day.\n"
+ "Observation revealed that it uses\n"
+ "TELEPORT to change its location once\n"
+ "every hour.");
+
+const u8 gKadabraPokedexText[] = _(
+ "It is rumored that a boy with psychic\n"
+ "abilities suddenly transformed into\n"
+ "KADABRA while he was assisting research\n"
+ "into extrasensory powers.");
+
+const u8 gAlakazamPokedexText[] = _(
+ "While it has strong psychic abilities and\n"
+ "high intelligence, an ALAKAZAM’s muscles\n"
+ "are very weak. It uses psychic power to\n"
+ "move its body.");
+
+const u8 gMachopPokedexText[] = _(
+ "It continually undertakes strenuous\n"
+ "training to master all forms of martial\n"
+ "arts. Its strength lets it easily hoist\n"
+ "a sumo wrestler onto its shoulders.");
+
+const u8 gMachokePokedexText[] = _(
+ "A belt is worn by a MACHOKE to keep its\n"
+ "overwhelming power under control.\n"
+ "Because it is so dangerous, no one has\n"
+ "ever removed the belt.");
+
+const u8 gMachampPokedexText[] = _(
+ "It is impossible to defend against punches\n"
+ "and chops doled out by its four arms.\n"
+ "Its fighting spirit flares up when it faces\n"
+ "a tough opponent.");
+
+const u8 gBellsproutPokedexText[] = _(
+ "A BELLSPROUT’s thin and flexible body lets\n"
+ "it bend and sway to avoid any attack,\n"
+ "however strong it may be. From its mouth,\n"
+ "it leaks a fluid that melts even iron.");
+
+const u8 gWeepinbellPokedexText[] = _(
+ "At night, a WEEPINBELL hangs on to a tree\n"
+ "branch with its hooked rear and sleeps.\n"
+ "If it moves around in its sleep, it may\n"
+ "wake up to find itself on the ground.");
+
+const u8 gVictreebelPokedexText[] = _(
+ "The long vine extending from its head is\n"
+ "waved about as if it were a living thing to\n"
+ "attract prey. When an unsuspecting victim\n"
+ "approaches, it is swallowed whole.");
+
+const u8 gTentacoolPokedexText[] = _(
+ "Its body is almost entirely composed of\n"
+ "water. It ensnares its foe with its two\n"
+ "long tentacles, then stabs with the poison\n"
+ "stingers at their tips.");
+
+const u8 gTentacruelPokedexText[] = _(
+ "It lives in complex rock formations on\n"
+ "the ocean floor and traps prey using its\n"
+ "80 tentacles. Its red orbs glow when it\n"
+ "grows excited or agitated.");
+
+const u8 gGeodudePokedexText[] = _(
+ "It climbs mountain paths using only the\n"
+ "power of its arms. Because they look just\n"
+ "like boulders lining paths, hikers may step\n"
+ "on them without noticing.");
+
+const u8 gGravelerPokedexText[] = _(
+ "They descend from mountains by tumbling\n"
+ "down steep slopes. They are so brutal,\n"
+ "they smash aside obstructing trees and\n"
+ "massive boulders with thunderous tackles.");
+
+const u8 gGolemPokedexText[] = _(
+ "It is said to live in volcanic craters\n"
+ "on mountain peaks. Once a year, it sheds\n"
+ "its hide and grows larger. The shed hide\n"
+ "crumbles and returns to the soil.");
+
+const u8 gPonytaPokedexText[] = _(
+ "A PONYTA is very weak at birth. It can\n"
+ "barely stand up. Its legs become stronger\n"
+ "as it stumbles and falls while trying to\n"
+ "keep up with its parent.");
+
+const u8 gRapidashPokedexText[] = _(
+ "It usually canters casually in the fields\n"
+ "and plains. But once a RAPIDASH turns\n"
+ "serious, its fiery manes flare and blaze\n"
+ "as it gallops its way up to 150 mph.");
+
+const u8 gSlowpokePokedexText[] = _(
+ "It catches prey by dipping its tail in\n"
+ "water at the side of a river. But it often\n"
+ "forgets what it is doing and spends entire\n"
+ "days just loafing at water’s edge.");
+
+const u8 gSlowbroPokedexText[] = _(
+ "Its tail has a SHELLDER firmly attached\n"
+ "with a bite. As a result, the tail can’t be\n"
+ "used for fishing anymore. This forces it\n"
+ "to reluctantly swim and catch prey.");
+
+const u8 gMagnemitePokedexText[] = _(
+ "The units at its sides are extremely\n"
+ "powerful magnets. They generate enough\n"
+ "magnetism to draw in iron objects from\n"
+ "over 300 feet away.");
+
+const u8 gMagnetonPokedexText[] = _(
+ "It is actually three MAGNEMITE linked\n"
+ "by magnetism. It generates powerful radio\n"
+ "waves that raise temperatures by 3.6\n"
+ "degrees F within a 3,300-foot radius.");
+
+const u8 gFarfetchdPokedexText[] = _(
+ "It is always seen with a stick from a plant.\n"
+ "Apparently, there are good sticks and bad\n"
+ "sticks. This POKéMON occasionally fights\n"
+ "with others over choice sticks.");
+
+const u8 gDoduoPokedexText[] = _(
+ "Even while eating or sleeping, one of the\n"
+ "heads remains always vigilant for any sign\n"
+ "of danger. When threatened, it flees at\n"
+ "over 60 miles per hour.");
+
+const u8 gDodrioPokedexText[] = _(
+ "A peculiar POKéMON species with three\n"
+ "heads. It vigorously races across grassy\n"
+ "plains even in arid seasons with little\n"
+ "rainfall.");
+
+const u8 gSeelPokedexText[] = _(
+ "SEEL hunt for prey in frigid, ice-covered\n"
+ "seas. When it needs to breathe, it punches\n"
+ "a hole through the ice with the sharply\n"
+ "protruding section of its head.");
+
+const u8 gDewgongPokedexText[] = _(
+ "It loves to snooze on bitterly cold ice.\n"
+ "The sight of this POKéMON sleeping on\n"
+ "a glacier was mistakenly thought to be\n"
+ "a mermaid by a mariner long ago.");
+
+const u8 gGrimerPokedexText[] = _(
+ "Born from polluted sludge in the sea,\n"
+ "GRIMER’s favorite food is anything filthy.\n"
+ "They feed on wastewater pumped out from\n"
+ "factories.");
+
+const u8 gMukPokedexText[] = _(
+ "It prefers warm and humid habitats.\n"
+ "In the summertime, the toxic substances\n"
+ "in its body intensify, making MUK reek like\n"
+ "putrid kitchen garbage.");
+
+const u8 gShellderPokedexText[] = _(
+ "At night, it burrows a hole in the seafloor\n"
+ "with its broad tongue to make a place to\n"
+ "sleep. While asleep, it closes its shell,\n"
+ "but leaves its tongue hanging out.");
+
+const u8 gCloysterPokedexText[] = _(
+ "It swims in the sea by swallowing water,\n"
+ "then jetting it out toward the rear.\n"
+ "The CLOYSTER shoots spikes from its\n"
+ "shell using the same system.");
+
+const u8 gGastlyPokedexText[] = _(
+ "When exposed to a strong wind, a GASTLY’s\n"
+ "gaseous body quickly dwindles away.\n"
+ "They cluster under the eaves of houses\n"
+ "to escape the ravages of wind.");
+
+const u8 gHaunterPokedexText[] = _(
+ "If a HAUNTER beckons you while it is\n"
+ "floating in darkness, don’t approach it.\n"
+ "This POKéMON will try to lick you with its\n"
+ "tongue and steal your life away.");
+
+const u8 gGengarPokedexText[] = _(
+ "Deep in the night, your shadow cast by\n"
+ "a streetlight may suddenly overtake you.\n"
+ "It is actually a GENGAR running past\n"
+ "you, pretending to be your shadow.");
+
+const u8 gOnixPokedexText[] = _(
+ "There is a magnet in its brain that\n"
+ "prevents an ONIX from losing direction\n"
+ "while tunneling. As it grows older, its body\n"
+ "becomes steadily rounder and smoother.");
+
+const u8 gDrowzeePokedexText[] = _(
+ "If your nose becomes itchy while you are\n"
+ "sleeping, it’s a sure sign that a DROWZEE is\n"
+ "standing above your pillow and trying to\n"
+ "eat your dream through your nostrils.");
+
+const u8 gHypnoPokedexText[] = _(
+ "The arcing movement and glitter of the\n"
+ "pendulum in a HYPNO’s hand lull the foe\n"
+ "into deep hypnosis. While searching for\n"
+ "prey, it polishes the pendulum.");
+
+const u8 gKrabbyPokedexText[] = _(
+ "KRABBY live in holes dug into beaches.\n"
+ "On sandy shores with little in the way\n"
+ "of food, they can be seen squabbling with\n"
+ "each other over territory.");
+
+const u8 gKinglerPokedexText[] = _(
+ "It waves its huge, oversized claw in the\n"
+ "air to communicate with others.\n"
+ "But since the claw is so heavy, this\n"
+ "POKéMON quickly tires.");
+
+const u8 gVoltorbPokedexText[] = _(
+ "It bears an uncanny and unexplained\n"
+ "resemblance to a POKé BALL. Because it\n"
+ "explodes at the slightest shock, even\n"
+ "veteran TRAINERS treat it with caution.");
+
+const u8 gElectrodePokedexText[] = _(
+ "They appear in great numbers at electric\n"
+ "power plants. Because they feed on\n"
+ "electricity, they cause massive and\n"
+ "chaotic blackouts in nearby cities.");
+
+const u8 gExeggcutePokedexText[] = _(
+ "It consists of six eggs that care for each\n"
+ "other. The eggs attract each other and\n"
+ "spin around. When cracks increasingly\n"
+ "appear, it is close to evolution.");
+
+const u8 gExeggutorPokedexText[] = _(
+ "Originally from the tropics, EXEGGUTOR’s\n"
+ "heads grow larger from exposure to strong\n"
+ "sunlight. It is said that when the heads\n"
+ "fall, they group to form an EXEGGCUTE.");
+
+const u8 gCubonePokedexText[] = _(
+ "It pines for the mother it will never see\n"
+ "again. Seeing a likeness of its mother in\n"
+ "the full moon, it cries. The stains on the\n"
+ "skull it wears are from its tears.");
+
+const u8 gMarowakPokedexText[] = _(
+ "A MAROWAK is the evolved form of a CUBONE\n"
+ "that has grown tough by overcoming the\n"
+ "grief of losing its mother. Its tempered\n"
+ "and hardened spirit is not easily broken.");
+
+const u8 gHitmonleePokedexText[] = _(
+ "Its legs freely stretch and contract.\n"
+ "Using these springlike limbs, it bowls over\n"
+ "foes with devastating kicks. After battle,\n"
+ "it rubs down its tired legs.");
+
+const u8 gHitmonchanPokedexText[] = _(
+ "A HITMONCHAN is said to possess the\n"
+ "spirit of a boxer who aimed to become the\n"
+ "world champion. Having an indomitable\n"
+ "spirit means that it will never give up.");
+
+const u8 gLickitungPokedexText[] = _(
+ "Whenever it sees something unfamiliar,\n"
+ "it always licks the object because it\n"
+ "memorizes things by texture and taste.\n"
+ "It is somewhat put off by sour things.");
+
+const u8 gKoffingPokedexText[] = _(
+ "Getting up close to a KOFFING will give\n"
+ "you a chance to observe, through its thin\n"
+ "skin, the toxic gases swirling inside. It\n"
+ "blows up at the slightest stimulation.");
+
+const u8 gWeezingPokedexText[] = _(
+ "By diluting its toxic gases with a special\n"
+ "process, the highest grade of perfume can\n"
+ "be extracted. To WEEZING, gases emanating\n"
+ "from garbage are the ultimate feast.");
+
+const u8 gRhyhornPokedexText[] = _(
+ "Once it starts running, it doesn’t stop.\n"
+ "Its tiny brain makes it so stupid that it\n"
+ "can’t remember why it started running in\n"
+ "the first place.");
+
+const u8 gRhydonPokedexText[] = _(
+ "Its horn, which rotates like a drill,\n"
+ "destroys tall buildings with one strike.\n"
+ "It stands on its hind legs, and its brain\n"
+ "is well developed.");
+
+const u8 gChanseyPokedexText[] = _(
+ "CHANSEY lay nutritionally excellent eggs\n"
+ "every day. The eggs are so delicious, they\n"
+ "are eagerly devoured by even those people\n"
+ "who have lost their appetite.");
+
+const u8 gTangelaPokedexText[] = _(
+ "Its vines snap off easily and painlessly\n"
+ "if they are grabbed, allowing it to make a\n"
+ "quick getaway. The lost vines are replaced\n"
+ "by new growth the very next day.");
+
+const u8 gKangaskhanPokedexText[] = _(
+ "If you come across a young KANGASKHAN\n"
+ "playing by itself, never try to catch it.\n"
+ "The baby’s parent is sure to be in the area,\n"
+ "and it will become violently enraged.");
+
+const u8 gHorseaPokedexText[] = _(
+ "By cleverly flicking the fins on its back\n"
+ "side to side, it moves in any direction\n"
+ "while facing forward. It spits ink to\n"
+ "escape if it senses danger.");
+
+const u8 gSeadraPokedexText[] = _(
+ "The poisonous barbs all over its body are\n"
+ "highly valued as ingredients for making\n"
+ "traditional herbal medicine. It shows no\n"
+ "mercy to anything approaching its nest.");
+
+const u8 gGoldeenPokedexText[] = _(
+ "In the springtime, schools of GOLDEEN\n"
+ "can be seen swimming up falls and rivers.\n"
+ "It metes out staggering damage with its\n"
+ "single horn.");
+
+const u8 gSeakingPokedexText[] = _(
+ "It punches holes in boulders on stream-\n"
+ "beds. This is a clever innovation that\n"
+ "prevents its eggs from being attacked or\n"
+ "washed away by the current.");
+
+const u8 gStaryuPokedexText[] = _(
+ "It gathers with others in the night and\n"
+ "makes its red core glow on and off with\n"
+ "the twinkling stars. It can regenerate\n"
+ "limbs if they are severed from its body.");
+
+const u8 gStarmiePokedexText[] = _(
+ "People in ancient times imagined that\n"
+ "STARMIE were transformed from the\n"
+ "reflections of stars that twinkled on\n"
+ "gentle waves at night.");
+
+const u8 gMrmimePokedexText[] = _(
+ "A MR. MIME is a master of pantomime. It can\n"
+ "convince others that something unseeable\n"
+ "actually exists. Once believed, the\n"
+ "imaginary object does become real.");
+
+const u8 gScytherPokedexText[] = _(
+ "Its blindingly fast speed adds to the\n"
+ "sharpness of its twin forearm scythes.\n"
+ "The scythes can slice through thick logs\n"
+ "in one wicked stroke.");
+
+const u8 gJynxPokedexText[] = _(
+ "A JYNX sashays rhythmically as if it were\n"
+ "dancing. Its motions are so bouncingly\n"
+ "alluring, people seeing it are compelled to\n"
+ "shake their hips without noticing.");
+
+const u8 gElectabuzzPokedexText[] = _(
+ "When a storm approaches, it competes with\n"
+ "others to scale heights that are likely to\n"
+ "be stricken by lightning. Some towns use\n"
+ "ELECTABUZZ in place of lightning rods.");
+
+const u8 gMagmarPokedexText[] = _(
+ "In battle, it blows out intense flames from\n"
+ "all over its body to intimidate its foe.\n"
+ "These fiery bursts create heat waves that\n"
+ "ignite grass and trees in the area.");
+
+const u8 gPinsirPokedexText[] = _(
+ "Their pincers are strong enough to\n"
+ "shatter thick logs. Because they dislike\n"
+ "cold, PINSIR burrow and sleep under\n"
+ "the ground on chilly nights.");
+
+const u8 gTaurosPokedexText[] = _(
+ "It is not satisfied unless it is rampaging\n"
+ "at all times. If there is no opponent for\n"
+ "TAUROS to battle, it will charge at thick\n"
+ "trees and knock them down to calm itself.");
+
+const u8 gMagikarpPokedexText[] = _(
+ "Its swimming muscles are weak, so it is\n"
+ "easily washed away by currents. In places\n"
+ "where water pools, you can see many\n"
+ "MAGIKARP deposited there by the flow.");
+
+const u8 gGyaradosPokedexText[] = _(
+ "It is an extremely vicious and violent\n"
+ "POKéMON. When humans begin to fight,\n"
+ "it will appear and burn everything to the\n"
+ "ground with intensely hot flames.");
+
+const u8 gLaprasPokedexText[] = _(
+ "People have driven LAPRAS almost to the\n"
+ "point of extinction. In the evenings,\n"
+ "it is said to sing plaintively as it seeks\n"
+ "what few others of its kind still remain.");
+
+const u8 gDittoPokedexText[] = _(
+ "A DITTO rearranges its cell structure to\n"
+ "transform itself. However, if it tries to\n"
+ "change based on its memory, it will get\n"
+ "details wrong.");
+
+const u8 gEeveePokedexText[] = _(
+ "An EEVEE has an unstable genetic makeup\n"
+ "that suddenly mutates due to its\n"
+ "environment. Radiation from various\n"
+ "STONES causes this POKéMON to evolve.");
+
+const u8 gVaporeonPokedexText[] = _(
+ "VAPOREON underwent a spontaneous\n"
+ "mutation and grew fins and gills that\n"
+ "allow them to live underwater. They have\n"
+ "the ability to freely control water.");
+
+const u8 gJolteonPokedexText[] = _(
+ "Its cells generate weak power that is\n"
+ "amplified by its fur’s static electricity\n"
+ "to drop thunderbolts. The bristling fur is\n"
+ "made of electrically charged needles.");
+
+const u8 gFlareonPokedexText[] = _(
+ "FLAREON’s fluffy fur releases heat into\n"
+ "the air so that its body does not get\n"
+ "excessively hot. Its body temperature can\n"
+ "rise to a maximum of 1,650 degrees F.");
+
+const u8 gPorygonPokedexText[] = _(
+ "It is capable of reverting itself entirely\n"
+ "back to program data in order to enter\n"
+ "cyberspace. A PORYGON is copy-\n"
+ "protected so it cannot be duplicated.");
+
+const u8 gOmanytePokedexText[] = _(
+ "One of the ancient and long-since-extinct\n"
+ "POKéMON that have been regenerated\n"
+ "from fossils by humans. If attacked,\n"
+ "it withdraws into its hard shell.");
+
+const u8 gOmastarPokedexText[] = _(
+ "An OMASTAR uses its tentacles to capture\n"
+ "its prey. It is believed to have become\n"
+ "extinct because its shell grew too large,\n"
+ "making its movements slow and ponderous.");
+
+const u8 gKabutoPokedexText[] = _(
+ "It is a POKéMON that has been regenerated\n"
+ "from a fossil. However, in rare cases, living\n"
+ "examples have been discovered. KABUTO\n"
+ "have not changed for 300 million years.");
+
+const u8 gKabutopsPokedexText[] = _(
+ "KABUTOPS once swam underwater to hunt \n"
+ "for prey. It was apparently evolving from\n"
+ "being a water dweller to living on land as\n"
+ "evident from changes in its gills and legs.");
+
+const u8 gAerodactylPokedexText[] = _(
+ "AERODACTYL is a POKéMON from the age\n"
+ "of dinosaurs. It was regenerated from DNA\n"
+ "extracted from amber. It is imagined to\n"
+ "have been the king of the skies.");
+
+const u8 gSnorlaxPokedexText[] = _(
+ "SNORLAX’s typical day consists of nothing\n"
+ "more than eating and sleeping. It is such\n"
+ "a docile POKéMON that there are children\n"
+ "who use its big belly as a place to play.");
+
+const u8 gArticunoPokedexText[] = _(
+ "ARTICUNO is a legendary bird POKéMON that\n"
+ "can control ice. The flapping of its wings\n"
+ "chills the air. As a result, it is said that\n"
+ "when this POKéMON flies, snow will fall.");
+
+const u8 gZapdosPokedexText[] = _(
+ "ZAPDOS is a legendary bird POKéMON that\n"
+ "has the ability to control electricity.\n"
+ "It usually lives in thunderclouds. It gains\n"
+ "power if it is stricken by lightning bolts.");
+
+const u8 gMoltresPokedexText[] = _(
+ "MOLTRES is a legendary bird POKéMON\n"
+ "that can control fire. If injured, it is said\n"
+ "to dip its body in the molten magma of\n"
+ "a volcano to burn and heal itself.");
+
+const u8 gDratiniPokedexText[] = _(
+ "A DRATINI continually molts and sloughs\n"
+ "off its old skin. It does so because the\n"
+ "life energy within its body steadily builds\n"
+ "to reach uncontrollable levels.");
+
+const u8 gDragonairPokedexText[] = _(
+ "A DRAGONAIR stores an enormous amount of\n"
+ "energy inside its body. It is said to alter\n"
+ "the weather around it by loosing energy\n"
+ "from the crystals on its neck and tail.");
+
+const u8 gDragonitePokedexText[] = _(
+ "It can circle the globe in just 16 hours.\n"
+ "It is a kindhearted POKéMON that leads\n"
+ "lost and foundering ships in a storm\n"
+ "to the safety of land.");
+
+const u8 gMewtwoPokedexText[] = _(
+ "A POKéMON that was created by genetic\n"
+ "manipulation. However, even though the\n"
+ "scientific power of humans made its body,\n"
+ "they failed to give it a warm heart.");
+
+const u8 gMewPokedexText[] = _(
+ "A MEW is said to possess the genes of all\n"
+ "POKéMON. It is capable of making itself\n"
+ "invisible at will, so it entirely avoids\n"
+ "notice even if it approaches people.");
+
+const u8 gChikoritaPokedexText[] = _(
+ "It waves its leaf around to keep foes\n"
+ "at bay. However, a sweet fragrance also\n"
+ "wafts from the leaf, creating a friendly\n"
+ "atmosphere that becalms the battlers.");
+
+const u8 gBayleefPokedexText[] = _(
+ "A BAYLEEF’s neck is ringed by curled-up\n"
+ "leaves. Inside each leaf is a small tree\n"
+ "shoot. The fragrance of this shoot\n"
+ "makes people peppy.");
+
+const u8 gMeganiumPokedexText[] = _(
+ "The fragrance of a MEGANIUM’s flower\n"
+ "soothes and calms emotions. In battle,\n"
+ "it gives off more of its becalming scent\n"
+ "to blunt the foe’s fighting spirit.");
+
+const u8 gCyndaquilPokedexText[] = _(
+ "It flares flames from its back to protect\n"
+ "itself. The fire burns vigorously if the\n"
+ "POKéMON is angry. When it is tired,\n"
+ "it sputters with incomplete combustion.");
+
+const u8 gQuilavaPokedexText[] = _(
+ "It intimidates foes with intense gusts of\n"
+ "flames and superheated air. Its quick\n"
+ "nimbleness lets it dodge attacks even\n"
+ "while scorching an enemy.");
+
+const u8 gTyphlosionPokedexText[] = _(
+ "It can hide behind a shimmering heat haze\n"
+ "that it creates using its intense flames.\n"
+ "TYPHLOSION create blazing explosive\n"
+ "blasts that burn everything to cinders.");
+
+const u8 gTotodilePokedexText[] = _(
+ "Despite its small body, TOTODILE’s jaws\n"
+ "are very powerful. While it may think it is\n"
+ "just playfully nipping, its bite has enough\n"
+ "strength to cause serious injury.");
+
+const u8 gCroconawPokedexText[] = _(
+ "Once its jaws clamp down on its foe, it will\n"
+ "absolutely not let go. Because the tips of\n"
+ "its fangs are forked back like fishhooks,\n"
+ "they become irremovably embedded.");
+
+const u8 gFeraligatrPokedexText[] = _(
+ "It opens its huge mouth to intimidate\n"
+ "enemies. In battle, it runs using its thick\n"
+ "and powerful hind legs to charge the\n"
+ "foe with incredible speed.");
+
+const u8 gSentretPokedexText[] = _(
+ "They take turns standing guard when it\n"
+ "is time to sleep. The sentry awakens the\n"
+ "others if it senses danger. If one becomes\n"
+ "separated, it turns sleepless with fear.");
+
+const u8 gFurretPokedexText[] = _(
+ "A FURRET has a very slim build. When under\n"
+ "attack, it can squirm through narrow\n"
+ "spaces and get away. In spite of its short\n"
+ "limbs, it is very nimble and fleet.");
+
+const u8 gHoothootPokedexText[] = _(
+ "It has an internal organ that senses\n"
+ "the earth’s rotation. Using this special\n"
+ "organ, a HOOTHOOT begins hooting at\n"
+ "precisely the same time every day.");
+
+const u8 gNoctowlPokedexText[] = _(
+ "It unfailingly catches prey in darkness.\n"
+ "NOCTOWL owe their success to superior\n"
+ "vision that allows them to see in minimal\n"
+ "light, and to their supple and silent wings.");
+
+const u8 gLedybaPokedexText[] = _(
+ "LEDYBA communicate using a fluid that\n"
+ "they secrete from where the legs join the\n"
+ "body. They are said to convey feelings to\n"
+ "others by altering the fluid’s scent.");
+
+const u8 gLedianPokedexText[] = _(
+ "It is said that in lands with clean air,\n"
+ "where the stars fill the sky, there live\n"
+ "many LEDIAN. For good reason, they use\n"
+ "the light of the stars as energy.");
+
+const u8 gSpinarakPokedexText[] = _(
+ "The web it spins can be considered its\n"
+ "second nervous system. It is said that a\n"
+ "SPINARAK determines its prey by the tiny\n"
+ "vibrations it feels through the web.");
+
+const u8 gAriadosPokedexText[] = _(
+ "Its feet are tipped with tiny hooked claws\n"
+ "that enable it to scuttle on ceilings and\n"
+ "vertical walls. It constricts its foe with\n"
+ "thin and strong silk webbing.");
+
+const u8 gCrobatPokedexText[] = _(
+ "Over the course of evolution, its hind legs\n"
+ "turned into wings. By alternately resting\n"
+ "its front and rear wings, it can fly all day\n"
+ "without having to stop.");
+
+const u8 gChinchouPokedexText[] = _(
+ "When it senses danger, it discharges\n"
+ "positive and negative electricity from its\n"
+ "two antennae. It lives in depths beyond\n"
+ "sunlight’s reach.");
+
+const u8 gLanturnPokedexText[] = _(
+ "The light-emitting orbs on its back are\n"
+ "very bright. They are formed from a part of\n"
+ "its dorsal fin. This POKéMON illuminates\n"
+ "the inky darkness of deep seas.");
+
+const u8 gPichuPokedexText[] = _(
+ "It is still inept at retaining electricity.\n"
+ "When it is startled, it discharges power\n"
+ "accidentally. It gets better at holding\n"
+ "power as it grows older.");
+
+const u8 gCleffaPokedexText[] = _(
+ "On nights with many shooting stars,\n"
+ "CLEFFA can be seen dancing in a ring.\n"
+ "They dance until daybreak, when they\n"
+ "quench their thirst with the morning dew.");
+
+const u8 gIgglybuffPokedexText[] = _(
+ "Its soft and pliable body is very bouncy.\n"
+ "When it sings continuously with all its\n"
+ "might, its body steadily turns a deepening\n"
+ "pink color.");
+
+const u8 gTogepiPokedexText[] = _(
+ "As its energy, it uses the feelings of\n"
+ "compassion and pleasure exuded by\n"
+ "people and POKéMON. It stores up happy\n"
+ "feelings in its shell, then shares them out.");
+
+const u8 gTogeticPokedexText[] = _(
+ "It is said to be a POKéMON that brings good\n"
+ "fortune. When it spots someone who is pure\n"
+ "of heart, a TOGETIC appears and shares its\n"
+ "happiness with that person.");
+
+const u8 gNatuPokedexText[] = _(
+ "It runs up short trees that grow on the\n"
+ "savanna to peck at new shoots.\n"
+ "A NATU’s eyes look as if they are\n"
+ "always observing something.");
+
+const u8 gXatuPokedexText[] = _(
+ "It has the enigmatic power of foreseeing\n"
+ "the future. Some people in different lands\n"
+ "have long believed that XATU are\n"
+ "emissaries from another world.");
+
+const u8 gMareepPokedexText[] = _(
+ "Its fluffy wool rubs together and builds\n"
+ "a static charge. The more energy is\n"
+ "charged, the more brightly the lightbulb\n"
+ "at the tip of its tail glows.");
+
+const u8 gFlaaffyPokedexText[] = _(
+ "Its fleece quality changes to generate\n"
+ "strong static electricity with a small\n"
+ "amount of wool. The bare, slick parts of its\n"
+ "hide are shielded against electricity.");
+
+const u8 gAmpharosPokedexText[] = _(
+ "It gives off so much light that it can be\n"
+ "seen even from space. People in the old\n"
+ "days used its light to send signals back\n"
+ "and forth with others far away.");
+
+const u8 gBellossomPokedexText[] = _(
+ "Its flower petals deepen in color through\n"
+ "exposure to sunlight. When cloudy weather\n"
+ "persists, it does a dance that is thought\n"
+ "to be a ritual for summoning the sun.");
+
+const u8 gMarillPokedexText[] = _(
+ "Its body is covered with water-repellent\n"
+ "fur. Because of the fur, it can swim\n"
+ "through water at high speed without being\n"
+ "slowed by the water’s resistance.");
+
+const u8 gAzumarillPokedexText[] = _(
+ "It lives in water virtually all day long.\n"
+ "Its body color and pattern act as\n"
+ "camouflage that makes it tough for\n"
+ "enemies to spot in water.");
+
+const u8 gSudowoodoPokedexText[] = _(
+ "It mimics a tree to avoid being attacked\n"
+ "by enemies. But since its forelegs\n"
+ "remain green throughout the year, it is\n"
+ "easily identified as a fake in the winter.");
+
+const u8 gPolitoedPokedexText[] = _(
+ "The curled hair on its head proves its\n"
+ "status as a king. It is said that the\n"
+ "longer and curlier the hair, the more\n"
+ "respect it earns from its peers.");
+
+const u8 gHoppipPokedexText[] = _(
+ "This POKéMON drifts and floats with the\n"
+ "wind. If it senses the approach of strong\n"
+ "winds, a HOPPIP links leaves with others\n"
+ "to prepare against being blown away.");
+
+const u8 gSkiploomPokedexText[] = _(
+ "It blossoms when the temperature rises\n"
+ "above 64 degrees F. Because its flower’s\n"
+ "blooming changes with the temperature,\n"
+ "it is sometimes used as a thermometer.");
+
+const u8 gJumpluffPokedexText[] = _(
+ "JUMPLUFF ride warm southern winds to\n"
+ "cross the sea and fly to foreign lands.\n"
+ "This POKéMON lands when it encounters\n"
+ "cold air while it is floating.");
+
+const u8 gAipomPokedexText[] = _(
+ "Its tail ends with a dexterous, handlike\n"
+ "appendage. However, because it uses the\n"
+ "tail so much, AIPOM’s real hands have\n"
+ "become rather clumsy.");
+
+const u8 gSunkernPokedexText[] = _(
+ "SUNKERN try to minimize movement to\n"
+ "conserve the nutrients they have stored\n"
+ "in their bodies for evolution. They will\n"
+ "not eat, subsisting only on morning dew.");
+
+const u8 gSunfloraPokedexText[] = _(
+ "SUNFLORA convert solar energy into\n"
+ "nutrition. They are highly active in the\n"
+ "warm daytime but suddenly stop moving as\n"
+ "soon as the sun sets.");
+
+const u8 gYanmaPokedexText[] = _(
+ "It can see 360 degrees without moving\n"
+ "its eyes. It is a great flier capable of\n"
+ "making sudden stops and turning midair to\n"
+ "quickly chase down targeted prey.");
+
+const u8 gWooperPokedexText[] = _(
+ "WOOPER usually live in water but come\n"
+ "out onto land seeking food occasionally.\n"
+ "On land, they coat their bodies with a\n"
+ "gooey, toxic film.");
+
+const u8 gQuagsirePokedexText[] = _(
+ "A QUAGSIRE hunts by leaving its mouth wide\n"
+ "open in water and waiting for its prey to\n"
+ "blunder in. Because it doesn’t move, it\n"
+ "does not get very hungry.");
+
+const u8 gEspeonPokedexText[] = _(
+ "An ESPEON is extremely loyal to any\n"
+ "TRAINER it considers to be worthy. It is\n"
+ "said to have developed precognitive\n"
+ "powers to protect its TRAINER from harm.");
+
+const u8 gUmbreonPokedexText[] = _(
+ "UMBREON evolved from exposure to the\n"
+ "moon’s energy pulses. It lurks in darkness\n"
+ "and waits for its foes to move. The rings\n"
+ "on its body glow when it leaps to attack.");
+
+const u8 gMurkrowPokedexText[] = _(
+ "MURKROW were feared as the alleged\n"
+ "bearers of ill fortune. It shows strong\n"
+ "interest in anything that sparkles. It will\n"
+ "even try to steal rings from women.");
+
+const u8 gSlowkingPokedexText[] = _(
+ "It undertakes research every day to\n"
+ "solve the mysteries of the world.\n"
+ "However, it apparently forgets everything\n"
+ "if the SHELLDER on its head comes off.");
+
+const u8 gMisdreavusPokedexText[] = _(
+ "A MISDREAVUS frightens people with a\n"
+ "creepy, sobbing cry. It apparently uses\n"
+ "its red spheres to absorb the fear of foes\n"
+ "as its nutrition.");
+
+const u8 gUnownPokedexText[] = _(
+ "This POKéMON is shaped like ancient text\n"
+ "characters. Although research is ongoing,\n"
+ "it is a mystery as to which came first,\n"
+ "the ancient writings or the various UNOWN.");
+
+const u8 gWobbuffetPokedexText[] = _(
+ "Usually docile, a WOBBUFFET strikes back\n"
+ "ferociously if its black tail is attacked.\n"
+ "It makes its lair in caves where it waits\n"
+ "for nightfall.");
+
+const u8 gGirafarigPokedexText[] = _(
+ "A GIRAFARIG is an herbivore--it eats\n"
+ "grass and tree shoots. While it is eating,\n"
+ "its tail makes chewing and swallowing\n"
+ "motions as if it were also eating.");
+
+const u8 gPinecoPokedexText[] = _(
+ "A PINECO hangs from a tree branch and\n"
+ "waits for prey. While eating, if it is\n"
+ "disturbed by someone shaking its tree, it\n"
+ "falls on the ground and suddenly explodes.");
+
+const u8 gForretressPokedexText[] = _(
+ "It keeps itself inside its steel shell.\n"
+ "The shell is opened when it is catching\n"
+ "prey, but it is so quick that the shell’s\n"
+ "inside cannot be seen.");
+
+const u8 gDunsparcePokedexText[] = _(
+ "Its drill-tipped tail is used to burrow into\n"
+ "the ground backwards. This POKéMON is\n"
+ "known to make its nest in complex shapes\n"
+ "deep under the ground.");
+
+const u8 gGligarPokedexText[] = _(
+ "It glides without making a single sound.\n"
+ "It grasps the face of its foe using its\n"
+ "hind and large front claws, then stabs\n"
+ "with its poison barb.");
+
+const u8 gSteelixPokedexText[] = _(
+ "STEELIX live even further underground\n"
+ "than ONIX. This POKéMON is known to dig\n"
+ "toward the earth’s core, reaching a depth\n"
+ "of over six-tenths of a mile underground.");
+
+const u8 gSnubbullPokedexText[] = _(
+ "By baring its fangs and making a scary\n"
+ "face, it sends smaller POKéMON scurrying\n"
+ "in terror. The SNUBBULL does seem a\n"
+ "little sad at making its foes flee.");
+
+const u8 gGranbullPokedexText[] = _(
+ "It has a particularly well-developed lower\n"
+ "jaw. The huge fangs are heavy, causing\n"
+ "it to tilt its head. Unless it is startled, it\n"
+ "will not try to bite.");
+
+const u8 gQwilfishPokedexText[] = _(
+ "A QWILFISH uses the pressure of water\n"
+ "it swallows to shoot toxic quills all at\n"
+ "once from all over its body. It finds\n"
+ "swimming to be somewhat challenging.");
+
+const u8 gScizorPokedexText[] = _(
+ "A SCIZOR has a body with the hardness of\n"
+ "steel. It is not easily fazed by ordinary\n"
+ "sorts of attacks. It flaps its wings to\n"
+ "regulate its body temperature.");
+
+const u8 gShucklePokedexText[] = _(
+ "A SHUCKLE hides under rocks, keeping its\n"
+ "body concealed inside its shell while\n"
+ "eating stored berries. The berries mix with\n"
+ "its body fluids to become a juice.");
+
+const u8 gHeracrossPokedexText[] = _(
+ "They gather in forests seeking the sweet\n"
+ "sap of trees. It is completely clad in a\n"
+ "steel-hard shell. It is proud of its horn,\n"
+ "which it uses to fling foes.");
+
+const u8 gSneaselPokedexText[] = _(
+ "A SNEASEL scales trees by punching its\n"
+ "hooked claws into the bark. It seeks out\n"
+ "unguarded nests and steals eggs for food\n"
+ "while the parents are away.");
+
+const u8 gTeddiursaPokedexText[] = _(
+ "It licks its palms that are sweetened by\n"
+ "being soaked in honey. A TEDDIURSA makes\n"
+ "its own honey by blending fruits and pollen\n"
+ "collected by BEEDRILL.");
+
+const u8 gUrsaringPokedexText[] = _(
+ "In forests, it is said that there are many\n"
+ "streams and towering trees where an\n"
+ "URSARING gathers food. It walks through\n"
+ "its forest collecting food every day.");
+
+const u8 gSlugmaPokedexText[] = _(
+ "It is a species of POKéMON that lives in\n"
+ "volcanic areas. If its body cools, its skin\n"
+ "hardens and immobilizes it. To avoid that,\n"
+ "it sleeps near magma.");
+
+const u8 gMagcargoPokedexText[] = _(
+ "The shell on its back is made of hardened\n"
+ "magma. Tens of thousands of years spent\n"
+ "living in volcanic craters have turned\n"
+ "MAGCARGO’s bodies into magma.");
+
+const u8 gSwinubPokedexText[] = _(
+ "It roots for food by rubbing its snout\n"
+ "against the ground. Its favorite food is a\n"
+ "mushroom that grows under dried grass.\n"
+ "It occasionally roots out hot springs.");
+
+const u8 gPiloswinePokedexText[] = _(
+ "A PILOSWINE is covered by a thick coat\n"
+ "of long hair for enduring freezing cold.\n"
+ "It uses its tusks to dig up food that has\n"
+ "been buried under ice.");
+
+const u8 gCorsolaPokedexText[] = _(
+ "CORSOLA live in warm southern seas.\n"
+ "If the sea becomes polluted, the beautiful\n"
+ "coral stalks become discolored and crumble\n"
+ "away in tatters.");
+
+const u8 gRemoraidPokedexText[] = _(
+ "A REMORAID uses its abdominal muscles\n"
+ "to forcefully expel swallowed water, then\n"
+ "shoot down flying prey. When evolution\n"
+ "approaches, it travels down rivers.");
+
+const u8 gOctilleryPokedexText[] = _(
+ "It ensnares its foe with its suction-\n"
+ "cupped tentacles before delivering the\n"
+ "finishing blow. If the foe turns out to be\n"
+ "too strong, it spews ink to escape.");
+
+const u8 gDelibirdPokedexText[] = _(
+ "It carries food bundled up in its tail.\n"
+ "There was a famous explorer who\n"
+ "managed to scale Mt. Everest thanks\n"
+ "to a DELIBIRD sharing its food.");
+
+const u8 gMantinePokedexText[] = _(
+ "On sunny days, schools of MANTINE can be\n"
+ "seen elegantly leaping over the waves.\n"
+ "It is not bothered by the REMORAID that\n"
+ "hitches rides.");
+
+const u8 gSkarmoryPokedexText[] = _(
+ "A POKéMON that has a body and wings of\n"
+ "steel. People in the past used feathers\n"
+ "fallen from SKARMORY to make swords and\n"
+ "knives.");
+
+const u8 gHoundourPokedexText[] = _(
+ "HOUNDOUR communicate with each other\n"
+ "using a variety of cries to corner their\n"
+ "prey. This POKéMON’s remarkable teamwork\n"
+ "is simply unparalleled.");
+
+const u8 gHoundoomPokedexText[] = _(
+ "In a HOUNDOOM pack, the one with its horns\n"
+ "raked sharply back serves a leadership\n"
+ "role. They choose their leader by fighting\n"
+ "among themselves.");
+
+const u8 gKingdraPokedexText[] = _(
+ "It sleeps quietly, deep on the seafloor.\n"
+ "When it comes up to the surface, it\n"
+ "creates a huge whirlpool that can swallow\n"
+ "even ships.");
+
+const u8 gPhanpyPokedexText[] = _(
+ "PHANPY’s big ears serve as broad fans.\n"
+ "When it becomes hot, it flaps the ears\n"
+ "busily to cool down. Even the young are\n"
+ "very strong.");
+
+const u8 gDonphanPokedexText[] = _(
+ "A DONPHAN is so strong it can easily haul\n"
+ "a dump truck. Its hide has toughened to a\n"
+ "rock-hard state. An ordinary sort of\n"
+ "attack won’t even leave a scratch.");
+
+const u8 gPorygon2PokedexText[] = _(
+ "It was created by humans using the power\n"
+ "of science. It has been given artificial\n"
+ "intelligence that enables it to learn new\n"
+ "gestures and emotions on its own.");
+
+const u8 gStantlerPokedexText[] = _(
+ "STANTLER’s magnificent antlers were\n"
+ "once traded at high prices as works of art.\n"
+ "As a result, this POKéMON was hunted\n"
+ "close to extinction.");
+
+const u8 gSmearglePokedexText[] = _(
+ "A SMEARGLE marks its territory using a\n"
+ "fluid that leaks out from the tip of its\n"
+ "tail. About 5,000 different marks left by\n"
+ "this POKéMON have been found.");
+
+const u8 gTyroguePokedexText[] = _(
+ "TYROGUE become stressed out if they do\n"
+ "not get to train every day. When raising\n"
+ "this POKéMON, the TRAINER must establish\n"
+ "a regular training schedule.");
+
+const u8 gHitmontopPokedexText[] = _(
+ "Its technique of kicking while spinning is\n"
+ "a remarkable mix of both offense and\n"
+ "defense. HITMONTOP travel faster\n"
+ "spinning than they do walking.");
+
+const u8 gSmoochumPokedexText[] = _(
+ "It actively runs about, but also falls\n"
+ "often. Whenever it falls, it will check its\n"
+ "reflection on a lake’s surface to make\n"
+ "sure its face hasn’t become dirty.");
+
+const u8 gElekidPokedexText[] = _(
+ "If it touches metal and discharges the\n"
+ "electricity it has stored in its body, an\n"
+ "ELEKID begins swinging its arms in circles\n"
+ "to recharge itself.");
+
+const u8 gMagbyPokedexText[] = _(
+ "If a MAGBY is spouting yellow flames from\n"
+ "its mouth, it is in good health. When it is\n"
+ "fatigued, black smoke will be mixed in with\n"
+ "the flames.");
+
+const u8 gMiltankPokedexText[] = _(
+ "It gives over five gallons of milk daily.\n"
+ "Its sweet milk is enjoyed by children and\n"
+ "grown-ups alike. People who can’t drink\n"
+ "milk turn it into yogurt and eat it instead.");
+
+const u8 gBlisseyPokedexText[] = _(
+ "If it senses sadness with its fluffy fur,\n"
+ "a BLISSEY will rush over to the sad person,\n"
+ "however far away, to share an egg of\n"
+ "happiness that brings a smile to any face.");
+
+const u8 gRaikouPokedexText[] = _(
+ "RAIKOU embodies the speed of lightning.\n"
+ "Its roars send shock waves shuddering\n"
+ "through the air and ground as if\n"
+ "lightning bolts were crashing down.");
+
+const u8 gEnteiPokedexText[] = _(
+ "ENTEI embodies the passion of magma.\n"
+ "It is thought to have been born in the\n"
+ "eruption of a volcano. It blasts fire that\n"
+ "consumes all that it touches.");
+
+const u8 gSuicunePokedexText[] = _(
+ "SUICUNE embodies the compassion of\n"
+ "a pure spring of water. It runs across\n"
+ "the land with gliding elegance. It has the\n"
+ "power to purify dirty water.");
+
+const u8 gLarvitarPokedexText[] = _(
+ "A LARVITAR is born deep under the ground.\n"
+ "It must eat its way through the soil above\n"
+ "and reach the surface for it to see its\n"
+ "parents’ faces.");
+
+const u8 gPupitarPokedexText[] = _(
+ "A PUPITAR creates a gas inside its body\n"
+ "that it ejects under compression to propel\n"
+ "itself like a jet. Its body can withstand\n"
+ "a collision with solid steel.");
+
+const u8 gTyranitarPokedexText[] = _(
+ "A TYRANITAR is so overwhelmingly powerful,\n"
+ "it can bring down a whole mountain to make\n"
+ "its nest. It roams in mountains seeking\n"
+ "new opponents to fight.");
+
+const u8 gLugiaPokedexText[] = _(
+ "LUGIA is so powerful even a light\n"
+ "fluttering of its wings can blow apart\n"
+ "houses. As a result, it chooses to live out\n"
+ "of sight deep under the sea.");
+
+const u8 gHoOhPokedexText[] = _(
+ "Its feathers--which glow in seven colors\n"
+ "depending on the angle at which they are\n"
+ "struck by light--are thought to bring joy.\n"
+ "It is said to live at the foot of a rainbow.");
+
+const u8 gCelebiPokedexText[] = _(
+ "This POKéMON came from the future by\n"
+ "crossing over time. It is thought that so\n"
+ "long as CELEBI appears, a bright and\n"
+ "shining future awaits us.");
+
+const u8 gTreeckoPokedexText[] = _(
+ "It makes its nest in a giant tree in the\n"
+ "forest. It ferociously guards against\n"
+ "anything nearing its territory. It is said\n"
+ "to be the protector of the forest’s trees.");
+
+const u8 gGrovylePokedexText[] = _(
+ "Leaves grow out of this POKéMON’s body.\n"
+ "They help obscure a GROVYLE from the eyes\n"
+ "of its enemies while it is in a thickly\n"
+ "overgrown forest.");
+
+const u8 gSceptilePokedexText[] = _(
+ "In the jungle, its power is without equal.\n"
+ "This POKéMON carefully grows trees and\n"
+ "plants. It regulates its body temperature\n"
+ "by basking in sunlight.");
+
+const u8 gTorchicPokedexText[] = _(
+ "If attacked, it strikes back by spitting\n"
+ "balls of fire it forms in its stomach.\n"
+ "A TORCHIC dislikes darkness because it\n"
+ "can’t see its surroundings.");
+
+const u8 gCombuskenPokedexText[] = _(
+ "It lashes out with 10 kicks per second.\n"
+ "Its strong fighting instinct compels it\n"
+ "to keep up its offensive until the\n"
+ "opponent gives up.");
+
+const u8 gBlazikenPokedexText[] = _(
+ "It learns martial arts that use punches\n"
+ "and kicks. Every several years, its old\n"
+ "feathers burn off, and new, supple\n"
+ "feathers grow back in their place.");
+
+const u8 gMudkipPokedexText[] = _(
+ "On land, it can powerfully lift large\n"
+ "boulders by planting its four feet and\n"
+ "heaving. It sleeps by burying itself in soil\n"
+ "at the water’s edge.");
+
+const u8 gMarshtompPokedexText[] = _(
+ "Its toughened hind legs enable it to stand\n"
+ "upright. Because it weakens if its skin\n"
+ "dries out, it replenishes fluids by playing\n"
+ "in mud.");
+
+const u8 gSwampertPokedexText[] = _(
+ "If it senses the approach of a storm and\n"
+ "a tidal wave, it protects its seaside nest\n"
+ "by piling up boulders. It swims as fast as\n"
+ "a jet ski.");
+
+const u8 gPoochyenaPokedexText[] = _(
+ "It savagely threatens foes with bared\n"
+ "fangs. It chases after fleeing targets\n"
+ "tenaciously. It turns tail and runs,\n"
+ "however, if the foe strikes back.");
+
+const u8 gMightyenaPokedexText[] = _(
+ "In the wild, MIGHTYENA live in a pack.\n"
+ "They never defy their leader’s orders.\n"
+ "They defeat foes with perfectly\n"
+ "coordinated teamwork.");
+
+const u8 gZigzagoonPokedexText[] = _(
+ "Rubbing its nose against the ground, it\n"
+ "always wanders about back and forth in\n"
+ "search of something. It is distinguished\n"
+ "by the zigzag footprints it leaves.");
+
+const u8 gLinoonePokedexText[] = _(
+ "It is exceedingly fast if it only has to run\n"
+ "in a straight line. When it spots pond-\n"
+ "dwelling prey underwater, it quickly leaps\n"
+ "in and catches it with its sharp claws.");
+
+const u8 gWurmplePokedexText[] = _(
+ "It sticks to tree branches and eats\n"
+ "leaves. The thread it spits from its mouth,\n"
+ "which becomes gooey when it touches\n"
+ "air, slows the movement of its foes.");
+
+const u8 gSilcoonPokedexText[] = _(
+ "It prepares for evolution using the\n"
+ "energy it stored while it was a WURMPLE.\n"
+ "It keeps watch over the surroundings with\n"
+ "its two eyes.");
+
+const u8 gBeautiflyPokedexText[] = _(
+ "Its colorfully patterned wings are its\n"
+ "most prominent feature. It flies through\n"
+ "flower-covered fields collecting pollen.\n"
+ "It attacks ferociously when angered.");
+
+const u8 gCascoonPokedexText[] = _(
+ "To avoid detection by its enemies, it hides\n"
+ "motionlessly beneath large leaves and in\n"
+ "the gaps of branches. It also attaches\n"
+ "dead leaves to its body for camouflage.");
+
+const u8 gDustoxPokedexText[] = _(
+ "It is a nocturnal POKéMON that flies from\n"
+ "fields and mountains to the attraction of\n"
+ "streetlights at night. It looses highly\n"
+ "toxic powder from its wings.");
+
+const u8 gLotadPokedexText[] = _(
+ "This POKéMON lives in ponds with clean\n"
+ "water. It is known to ferry small POKéMON\n"
+ "across ponds by carrying them on the\n"
+ "broad leaf on its head.");
+
+const u8 gLombrePokedexText[] = _(
+ "In the evening, it takes great delight in\n"
+ "popping out of rivers and startling people.\n"
+ "It feeds on aquatic moss that grows on\n"
+ "rocks in the riverbed.");
+
+const u8 gLudicoloPokedexText[] = _(
+ "When it hears festive music, all the cells\n"
+ "in its body become stimulated, and it\n"
+ "begins moving in rhythm. It does not\n"
+ "quail even when it faces a tough opponent.");
+
+const u8 gSeedotPokedexText[] = _(
+ "It hangs off branches and absorbs\n"
+ "nutrients. When it finishes eating, its\n"
+ "body becomes so heavy that it drops to\n"
+ "the ground with a thump.");
+
+const u8 gNuzleafPokedexText[] = _(
+ "A forest-dwelling POKéMON that is skilled\n"
+ "at climbing trees. Its long and pointed\n"
+ "nose is its weak point. It loses power if\n"
+ "the nose is gripped.");
+
+const u8 gShiftryPokedexText[] = _(
+ "It is said to arrive on chilly, wintry winds.\n"
+ "Feared from long ago as the guardian of\n"
+ "forests, this POKéMON lives in a deep\n"
+ "forest where people do not venture.");
+
+const u8 gTaillowPokedexText[] = _(
+ "Although it is small, it is very courageous.\n"
+ "It will take on a larger SKARMORY on an\n"
+ "equal footing. However, its will weakens if\n"
+ "it becomes hungry.");
+
+const u8 gSwellowPokedexText[] = _(
+ "A SWELLOW dives upon prey from far above.\n"
+ "It never misses its targets. It takes to\n"
+ "the skies in search of lands with a warm\n"
+ "climate.");
+
+const u8 gWingullPokedexText[] = _(
+ "It makes its nest on a sheer cliff at the\n"
+ "edge of the sea. It has trouble keeping\n"
+ "its wings flapping in flight. Instead, it\n"
+ "soars on updrafts.");
+
+const u8 gPelipperPokedexText[] = _(
+ "It skims the tops of waves as it flies.\n"
+ "When it spots prey, it uses its large beak\n"
+ "to scoop up the victim with water.\n"
+ "It protects its eggs in its beak.");
+
+const u8 gRaltsPokedexText[] = _(
+ "A RALTS has the power to sense the\n"
+ "emotions of people and POKéMON with the\n"
+ "horns on its head. It takes cover if it\n"
+ "senses any hostility.");
+
+const u8 gKirliaPokedexText[] = _(
+ "A KIRLIA has the psychic power to create \n"
+ "a rip in the dimensions and see into the\n"
+ "future. It is said to dance with pleasure\n"
+ "on sunny mornings.");
+
+const u8 gGardevoirPokedexText[] = _(
+ "It apparently does not feel the pull of\n"
+ "gravity because it supports itself with\n"
+ "psychic power. It will give its life to\n"
+ "protect its TRAINER.");
+
+const u8 gSurskitPokedexText[] = _(
+ "They gather on puddles after evening\n"
+ "downpours, gliding across the surface\n"
+ "of water as if sliding. It secretes honey\n"
+ "with a sweet aroma from its head.");
+
+const u8 gMasquerainPokedexText[] = _(
+ "It intimidates foes with the large eyelike\n"
+ "patterns on its antennae. Because it can’t\n"
+ "fly if its wings get wet, it shelters itself\n"
+ "from rain under large trees and eaves.");
+
+const u8 gShroomishPokedexText[] = _(
+ "It loves to eat damp, composted soil in\n"
+ "forests. If you enter a forest after a\n"
+ "long rain, you can see many SHROOMISH\n"
+ "feasting on composted soil.");
+
+const u8 gBreloomPokedexText[] = _(
+ "It scatters spores from holes in the cap\n"
+ "on its head. It loves warm and humid\n"
+ "climates. It feeds on trees and plants in\n"
+ "fields and forests.");
+
+const u8 gSlakothPokedexText[] = _(
+ "It sleeps virtually all day and night long.\n"
+ "It doesn’t change its nest its entire life,\n"
+ "but it sometimes travels great distances\n"
+ "by swimming in rivers.");
+
+const u8 gVigorothPokedexText[] = _(
+ "It can’t keep still because its blood boils\n"
+ "with energy. It runs through the fields\n"
+ "and mountains all day to calm itself. If it\n"
+ "doesn’t, it can’t sleep at night.");
+
+const u8 gSlakingPokedexText[] = _(
+ "Hordes of SLAKING gather around trees\n"
+ "when fruits come into season. They wait\n"
+ "around patiently for ripened fruits to fall\n"
+ "out of the trees.");
+
+const u8 gNincadaPokedexText[] = _(
+ "It makes its nest at the roots of a mighty\n"
+ "tree. Using its whiskerlike antennae, it\n"
+ "probes its surroundings in the\n"
+ "pitch-black darkness of soil.");
+
+const u8 gNinjaskPokedexText[] = _(
+ "Because it darts about vigorously at high\n"
+ "speed, it is very difficult to see. Hearing\n"
+ "its distinctive cries for too long induces\n"
+ "a headache.");
+
+const u8 gShedinjaPokedexText[] = _(
+ "A peculiar POKéMON that floats in air even\n"
+ "though its wings remain completely still.\n"
+ "The inside of its body is hollow and\n"
+ "utterly dark.");
+
+const u8 gWhismurPokedexText[] = _(
+ "Its cries equal a jet plane in volume.\n"
+ "It inhales through its ear canals. Because\n"
+ "of this system, it can cry continually\n"
+ "without having to catch its breath.");
+
+const u8 gLoudredPokedexText[] = _(
+ "It positions the round speakers on its\n"
+ "head to assail foes with ultrasonic waves\n"
+ "at massive volume. It builds power by\n"
+ "stomping the ground.");
+
+const u8 gExploudPokedexText[] = _(
+ "It has sound-generating organs all over\n"
+ "its body. It communicates with others by\n"
+ "adjusting the tone and volume of the cries\n"
+ "it emits.");
+
+const u8 gMakuhitaPokedexText[] = _(
+ "It loves to toughen up its body above all\n"
+ "else. If you hear quaking rumbles in a cave,\n"
+ "it is the sound of MAKUHITA undertaking\n"
+ "strenuous training.");
+
+const u8 gHariyamaPokedexText[] = _(
+ "It has the habit of challenging others\n"
+ "without hesitation to tests of strength.\n"
+ "It’s been known to stand on train tracks\n"
+ "and stop trains using forearm thrusts.");
+
+const u8 gAzurillPokedexText[] = _(
+ "Its tail, which is packed with nutrition,\n"
+ "is very bouncy like a rubber ball. On sunny\n"
+ "days they gather at the edge of water and\n"
+ "splash about for fun.");
+
+const u8 gNosepassPokedexText[] = _(
+ "Its body emits a powerful magnetism.\n"
+ "It feeds on prey that is pulled in by the\n"
+ "force. Its magnetism is stronger in cold\n"
+ "seasons.");
+
+const u8 gSkittyPokedexText[] = _(
+ "A SKITTY’s adorably cute behavior makes it\n"
+ "highly popular. In battle, it makes its tail\n"
+ "puff out. It threatens foes with a sharp\n"
+ "growl.");
+
+const u8 gDelcattyPokedexText[] = _(
+ "Rather than keeping a permanent lair,\n"
+ "it habitually seeks comfortable spots and\n"
+ "sleeps there. It is nocturnal and becomes\n"
+ "active at dusk.");
+
+const u8 gSableyePokedexText[] = _(
+ "It digs branching holes in caves using its\n"
+ "sharp claws in search of food--raw gems.\n"
+ "A SABLEYE lurks in darkness and is seen\n"
+ "only rarely.");
+
+const u8 gMawilePokedexText[] = _(
+ "Its giant jaws are actually steel horns\n"
+ "that transformed. It fools foes into\n"
+ "complacency with its adorable gestures,\n"
+ "then chomps them with its huge jaws.");
+
+const u8 gAronPokedexText[] = _(
+ "A POKéMON that is clad in steel armor.\n"
+ "A new suit of armor is made when it evolves.\n"
+ "The old, discarded armor is salvaged as\n"
+ "metal for making iron products.");
+
+const u8 gLaironPokedexText[] = _(
+ "When two LAIRON meet in the wild, they\n"
+ "fight for territory by bashing into each\n"
+ "other with their steel bodies. The sound\n"
+ "of their collision carries for miles.");
+
+const u8 gAggronPokedexText[] = _(
+ "Its iron horns grow longer a little at\n"
+ "a time. They are used to determine the\n"
+ "AGGRON’s age. The gouges in its armor are\n"
+ "worn with pride as mementos from battles.");
+
+const u8 gMedititePokedexText[] = _(
+ "It continually meditates for hours every\n"
+ "day. As a result of rigorous and dedicated\n"
+ "yoga training, it has tempered its\n"
+ "spiritual power so much it can fly.");
+
+const u8 gMedichamPokedexText[] = _(
+ "Through crushingly harsh yoga training, it\n"
+ "gained the power to foretell its foe’s\n"
+ "actions. It battles with elegant, dance-\n"
+ "like movement.");
+
+const u8 gElectrikePokedexText[] = _(
+ "It generates electricity using friction\n"
+ "from the atmosphere. In seasons with\n"
+ "especially arid air, its entire body blazes\n"
+ "with violent showers of sparks.");
+
+const u8 gManectricPokedexText[] = _(
+ "Because lightning falls in their vicinities,\n"
+ "MANECTRIC were thought to have been born\n"
+ "from lightning. In battle, they create\n"
+ "thunderclouds.");
+
+const u8 gPluslePokedexText[] = _(
+ "It has the trait of cheering on its fellow\n"
+ "POKéMON. By shorting out the electricity\n"
+ "it releases from its paws, it creates\n"
+ "pom-poms for cheering.");
+
+const u8 gMinunPokedexText[] = _(
+ "At a meeting of POKéMON academics, it was\n"
+ "announced that simultaneous exposure to\n"
+ "electricity from a PLUSLE and MINUN will\n"
+ "promote circulation and boost vitality.");
+
+const u8 gVolbeatPokedexText[] = _(
+ "With their taillights lit, VOLBEAT fly in\n"
+ "a swarm, drawing geometric designs in the\n"
+ "night sky. They move their nests if their\n"
+ "pond water becomes dirty.");
+
+const u8 gIllumisePokedexText[] = _(
+ "A nocturnal POKéMON that becomes active\n"
+ "upon nightfall. It leads a VOLBEAT swarm\n"
+ "to draw patterns in the night sky. Over 200\n"
+ "different patterns have been confirmed.");
+
+const u8 gRoseliaPokedexText[] = _(
+ "A ROSELIA that drinks nutritionally rich\n"
+ "springwater blooms with lovely flowers.\n"
+ "The fragrance of its flowers has the\n"
+ "effect of making its foes careless.");
+
+const u8 gGulpinPokedexText[] = _(
+ "This POKéMON’s stomach fluid can even\n"
+ "digest scrap iron. In one gulp, it can\n"
+ "swallow something that is as large as\n"
+ "itself.");
+
+const u8 gSwalotPokedexText[] = _(
+ "Its powerful stomach acid is capable of\n"
+ "digesting almost anything. The one thing\n"
+ "in the whole world a SWALOT can’t digest is\n"
+ "its own stomach.");
+
+const u8 gCarvanhaPokedexText[] = _(
+ "CARVANHA attack ships in swarms, making\n"
+ "them sink. Although it is said to be a very\n"
+ "vicious POKéMON, it timidly flees as soon\n"
+ "as it finds itself alone.");
+
+const u8 gSharpedoPokedexText[] = _(
+ "The vicious and sly gangster of the sea.\n"
+ "Its skin is specially textured to minimize\n"
+ "drag in water. Its speed tops out at over\n"
+ "75 miles per hour.");
+
+const u8 gWailmerPokedexText[] = _(
+ "While this POKéMON usually lives in the sea,\n"
+ "it can survive on land, although not too\n"
+ "long. It loses vitality if its body becomes\n"
+ "dried out.");
+
+const u8 gWailordPokedexText[] = _(
+ "It breathes through nostrils that it\n"
+ "raises above the sea. By inhaling to its\n"
+ "maximum capacity, a WAILORD can dive close\n"
+ "to 10,000 feet beneath the waves.");
+
+const u8 gNumelPokedexText[] = _(
+ "A NUMEL stores boiling magma in the hump\n"
+ "on its back. It is a hardy POKéMON that can\n"
+ "transport a 220-pound load. It has served\n"
+ "humans at work since long ago.");
+
+const u8 gCameruptPokedexText[] = _(
+ "A POKéMON that lives in the crater of\n"
+ "a volcano. Every 10 years, the volcanoes\n"
+ "on its back erupt violently. Research is\n"
+ "under way on the cause of eruption.");
+
+const u8 gTorkoalPokedexText[] = _(
+ "It battles using energy it gets from\n"
+ "burning coal. When loosing smoke from its\n"
+ "nostrils, it lets off a sound that is\n"
+ "similar to a locomotive’s horn.");
+
+const u8 gSpoinkPokedexText[] = _(
+ "A POKéMON that manipulates psychic power\n"
+ "at will. It doesn’t stop bouncing even when\n"
+ "it is asleep. It loves eating mushrooms\n"
+ "that grow underground.");
+
+const u8 gGrumpigPokedexText[] = _(
+ "It stores power in the black pearls on its\n"
+ "forehead. When it uses psychic power, it\n"
+ "performs an odd dance step. Its style of\n"
+ "dancing became hugely popular overseas.");
+
+const u8 gSpindaPokedexText[] = _(
+ "It is distinguished by a pattern of\n"
+ "spots that is always different. Its\n"
+ "unsteady, tottering walk has the\n"
+ "effect of fouling its foe’s aim.");
+
+const u8 gTrapinchPokedexText[] = _(
+ "Its big jaws crunch through boulders.\n"
+ "Because its head is so big, it has a hard\n"
+ "time getting back upright if it tips over\n"
+ "onto its back.");
+
+const u8 gVibravaPokedexText[] = _(
+ "It looses ultrasonic waves by rubbing its\n"
+ "wings together. Since a VIBRAVA’s wings\n"
+ "are still in the process of growing, it can\n"
+ "only fly short distances.");
+
+const u8 gFlygonPokedexText[] = _(
+ "The flapping of its wings sounds like\n"
+ "singing. To prevent detection by enemies,\n"
+ "it hides itself by flapping up a cloud of\n"
+ "desert sand.");
+
+const u8 gCacneaPokedexText[] = _(
+ "CACNEA live in deserts with virtually no\n"
+ "rainfall. It battles by swinging its thick,\n"
+ "spiked arms. Once a year, a yellow flower\n"
+ "blooms.");
+
+const u8 gCacturnePokedexText[] = _(
+ "After spending thousands of years in\n"
+ "harsh deserts, its blood transformed into\n"
+ "the same substances as sand. It is\n"
+ "nocturnal, so it hunts at night.");
+
+const u8 gSwabluPokedexText[] = _(
+ "A POKéMON that has wings like cottony\n"
+ "clouds. After enduring winter, in which\n"
+ "little food is available, SWABLU flocks\n"
+ "move closer to towns in the spring.");
+
+const u8 gAltariaPokedexText[] = _(
+ "It hums in a beautiful soprano voice.\n"
+ "It flies among white clouds in the blue\n"
+ "sky. It launches intensely hot fireballs\n"
+ "from its mouth.");
+
+const u8 gZangoosePokedexText[] = _(
+ "When it battles, it stands on its hind legs\n"
+ "and attacks with its sharply clawed\n"
+ "forelegs. Its fur bristles if it encounters\n"
+ "any SEVIPER.");
+
+const u8 gSeviperPokedexText[] = _(
+ "SEVIPER and ZANGOOSE are eternal rivals.\n"
+ "It counters a ZANGOOSE’s dazzling agility\n"
+ "with its swordlike tail, which also oozes\n"
+ "a horrible poison.");
+
+const u8 gLunatonePokedexText[] = _(
+ "It becomes very active on the night of\n"
+ "a full moon. This POKéMON was first\n"
+ "discovered 40 years ago at the site of\n"
+ "a meteor strike.");
+
+const u8 gSolrockPokedexText[] = _(
+ "Solar energy is the source of this \n"
+ "POKéMON’s power. On sunny days, groups of\n"
+ "SOLROCK line up facing the sun and absorb\n"
+ "its light.");
+
+const u8 gBarboachPokedexText[] = _(
+ "Its body is covered with a slimy film.\n"
+ "The film acts as a barrier to prevent germs\n"
+ "in muddy water from entering the\n"
+ "BARBOACH’s body.");
+
+const u8 gWhiscashPokedexText[] = _(
+ "Mysteriously, it can foretell earthquakes.\n"
+ "In the daytime, it sleeps in mud at the\n"
+ "bottom of a pond. When it awakens, it\n"
+ "continually feeds throughout the night.");
+
+const u8 gCorphishPokedexText[] = _(
+ "Once it grips prey with its large pincers,\n"
+ "it will never let go, no matter what.\n"
+ "It is a hardy POKéMON that can thrive\n"
+ "in any environment.");
+
+const u8 gCrawdauntPokedexText[] = _(
+ "A brutish POKéMON that loves to battle.\n"
+ "A veteran CRAWDAUNT that has prevailed in\n"
+ "hundreds of battles has giant pincers\n"
+ "marked with countless scars.");
+
+const u8 gBaltoyPokedexText[] = _(
+ "A BALTOY moves by spinning on its single\n"
+ "foot. It has been depicted in murals \n"
+ "adorning the walls of a once-bustling city\n"
+ "in an ancient age.");
+
+const u8 gClaydolPokedexText[] = _(
+ "A CLAYDOL sleeps while hovering in midair.\n"
+ "Its arms are separate from its body.\n"
+ "They are kept floating by the POKéMON’s\n"
+ "manipulation of psychic power.");
+
+const u8 gLileepPokedexText[] = _(
+ "It disguises itself as seaweed by making\n"
+ "its tentacles sway. Unsuspecting prey\n"
+ "that come too close are swallowed whole.\n"
+ "It became extinct 100 million years ago.");
+
+const u8 gCradilyPokedexText[] = _(
+ "It drags its heavy body along the\n"
+ "seafloor. It makes its nest in the shallows\n"
+ "of warm seas. CRADILY can be seen on\n"
+ "beaches when the tide goes out.");
+
+const u8 gAnorithPokedexText[] = _(
+ "It was resurrected from a fossil using the\n"
+ "power of science. It swims by undulating\n"
+ "the eight wings at its sides. They were\n"
+ "feet that adapted to life in the sea.");
+
+const u8 gArmaldoPokedexText[] = _(
+ "ARMALDO usually lives on land. However,\n"
+ "when it hunts for prey, it dives beneath\n"
+ "the ocean. It swims around using its two\n"
+ "large wings.");
+
+const u8 gFeebasPokedexText[] = _(
+ "FEEBAS live in ponds that are heavily\n"
+ "infested with weeds. Because of its\n"
+ "hopelessly shabby appearance, it\n"
+ "seems as if few TRAINERS raise it.");
+
+const u8 gMiloticPokedexText[] = _(
+ "It is said to live at the bottom of\n"
+ "large lakes. Considered to be the most\n"
+ "beautiful of all POKéMON, it has been\n"
+ "depicted in paintings and statues.");
+
+const u8 gCastformPokedexText[] = _(
+ "It alters its form depending on the\n"
+ "weather. Changes in the climate such as\n"
+ "the temperature and humidity appear to\n"
+ "affect its cellular structure.");
+
+const u8 gKecleonPokedexText[] = _(
+ "A POKéMON that has the ability to alter its\n"
+ "body colors to match its surroundings.\n"
+ "A KECLEON reverts to its original colors if\n"
+ "it is startled.");
+
+const u8 gShuppetPokedexText[] = _(
+ "This POKéMON roams about deep in the\n"
+ "night seeking such negative emotions as\n"
+ "grudges and envy. It retreats to its nest\n"
+ "when the sun begins to rise.");
+
+const u8 gBanettePokedexText[] = _(
+ "An abandoned plush doll became this\n"
+ "POKéMON. They are said to live in garbage\n"
+ "dumps and wander about in search of the\n"
+ "children that threw them away.");
+
+const u8 gDuskullPokedexText[] = _(
+ "A glare from its single scarlet eye makes\n"
+ "even burly grown-ups freeze in utter fear.\n"
+ "It is a nocturnal POKéMON that roams\n"
+ "about under the cloak of darkness.");
+
+const u8 gDusclopsPokedexText[] = _(
+ "It is thought that its body is hollow with\n"
+ "only a spectral ball of fire burning inside.\n"
+ "However, no one has been able to\n"
+ "confirm this theory as fact.");
+
+const u8 gTropiusPokedexText[] = _(
+ "It flies by flapping its broad leaves.\n"
+ "The bunch of fruit that grows around its\n"
+ "neck is deliciously sweet. In the spring,\n"
+ "it scatters pollen from its neck.");
+
+const u8 gChimechoPokedexText[] = _(
+ "They fly about very actively when the hot\n"
+ "season arrives. They communicate among\n"
+ "themselves using seven different and\n"
+ "distinguishing cries.");
+
+const u8 gAbsolPokedexText[] = _(
+ "It sharply senses even subtle changes in\n"
+ "the sky and the land to predict natural\n"
+ "disasters. It is a long-lived POKéMON that\n"
+ "has a life-span of 100 years.");
+
+const u8 gWynautPokedexText[] = _(
+ "A WYNAUT loves to eat sweet fruits.\n"
+ "It cleverly picks fruits using its earlike\n"
+ "arms. They gather in fruit gardens, drawn\n"
+ "by the fragrance.");
+
+const u8 gSnoruntPokedexText[] = _(
+ "They tend to move about in groups of\n"
+ "around five SNORUNT. In snowy regions,\n"
+ "it is said that when they are seen late at\n"
+ "night, snowfall will arrive by morning.");
+
+const u8 gGlaliePokedexText[] = _(
+ "A GLALIE has the power to instantaneously\n"
+ "freeze moisture in the atmosphere.\n"
+ "A dazzling cloud of diamondlike ice\n"
+ "crystals forms around its body.");
+
+const u8 gSphealPokedexText[] = _(
+ "It is completely covered with plushy fur.\n"
+ "As a result, it never feels the cold even\n"
+ "when it is rolling about on ice floes or\n"
+ "diving in the sea.");
+
+const u8 gSealeoPokedexText[] = _(
+ "SEALEO live in herds on ice floes. Using its\n"
+ "powerful flippers, it shatters ice.\n"
+ "It dives into the sea to hunt prey five\n"
+ "times a day.");
+
+const u8 gWalreinPokedexText[] = _(
+ "To protect its herd, the leader battles\n"
+ "anything that invades its territory, even\n"
+ "at the cost of its life. Its tusks may snap\n"
+ "off in battle.");
+
+const u8 gClamperlPokedexText[] = _(
+ "A CLAMPERL slams its shell closed on prey\n"
+ "to prevent escape. The pearl it creates\n"
+ "upon evolution is said to be infused with\n"
+ "a mysterious energy.");
+
+const u8 gHuntailPokedexText[] = _(
+ "To withstand the crushing pressure of\n"
+ "water deep under the sea, its spine is very\n"
+ "thick and sturdy. Its tail, which is shaped\n"
+ "like a small fish, has eyes that light up.");
+
+const u8 gGorebyssPokedexText[] = _(
+ "A GOREBYSS siphons the body fluids of prey\n"
+ "through its thin, tubular mouth. Its light\n"
+ "pink body color turns vivid when it\n"
+ "finishes feeding.");
+
+const u8 gRelicanthPokedexText[] = _(
+ "A POKéMON that was once believed to have\n"
+ "been extinct. The species has not changed\n"
+ "its form for 100 million years. It walks on\n"
+ "the seafloor using its pectoral fins.");
+
+const u8 gLuvdiscPokedexText[] = _(
+ "LUVDISC make the branches of CORSOLA\n"
+ "their nests. There is a custom from long\n"
+ "ago of giving a LUVDISC as a gift to\n"
+ "express one’s feelings of love.");
+
+const u8 gBagonPokedexText[] = _(
+ "Although it is small, this POKéMON is very\n"
+ "powerful because its body is a bundle of\n"
+ "muscles. It launches head-butts with its\n"
+ "ironlike skull.");
+
+const u8 gShelgonPokedexText[] = _(
+ "It hardly eats while it awaits evolution.\n"
+ "It becomes hardier by enduring hunger.\n"
+ "Its shell peels off the instant it begins\n"
+ "to evolve.");
+
+const u8 gSalamencePokedexText[] = _(
+ "After many long years, its cellular\n"
+ "structure underwent a sudden mutation to\n"
+ "grow wings. When angered, it loses all\n"
+ "thought and rampages out of control.");
+
+const u8 gBeldumPokedexText[] = _(
+ "When BELDUM gather in a swarm, they move\n"
+ "in perfect unison as if they were but one\n"
+ "POKéMON. They communicate with each other\n"
+ "using brain waves.");
+
+const u8 gMetangPokedexText[] = _(
+ "The claws tipping its arms pack the\n"
+ "destructive power to tear through thick\n"
+ "iron sheets as if they were silk. It flies\n"
+ "at over 60 miles per hour.");
+
+const u8 gMetagrossPokedexText[] = _(
+ "METAGROSS has four brains that are joined\n"
+ "by a complex neural network. As a result of\n"
+ "integration, this POKéMON is smarter than\n"
+ "a supercomputer.");
+
+const u8 gRegirockPokedexText[] = _(
+ "A POKéMON that is made entirely of rocks\n"
+ "and boulders. If parts of its body chip off\n"
+ "in battle, REGIROCK repairs itself by\n"
+ "adding new rocks.");
+
+const u8 gRegicePokedexText[] = _(
+ "Its entire body is made of Antarctic ice.\n"
+ "After extensive studies, researchers\n"
+ "believe the ice was formed during an\n"
+ "ice age.");
+
+const u8 gRegisteelPokedexText[] = _(
+ "Its body is harder than any other kind of\n"
+ "metal. The body metal is composed of a\n"
+ "mysterious substance. Not only is it hard,\n"
+ "it shrinks and stretches flexibly.");
+
+const u8 gLatiasPokedexText[] = _(
+ "They make a small herd of only several\n"
+ "members. They rarely make contact with\n"
+ "people or other POKéMON. They disappear\n"
+ "if they sense enemies.");
+
+const u8 gLatiosPokedexText[] = _(
+ "Even in hiding, it can detect the locations\n"
+ "of others and sense their emotions since\n"
+ "it has telepathy. Its intelligence allows\n"
+ "it to understand human languages.");
+
+const u8 gKyogrePokedexText[] = _(
+ "KYOGRE has appeared in mythology as the\n"
+ "creator of the sea. After long years of\n"
+ "feuding with GROUDON, it took to sleep at\n"
+ "the bottom of the sea.");
+
+const u8 gGroudonPokedexText[] = _(
+ "GROUDON has appeared in mythology as the\n"
+ "creator of the land. It sleeps in magma\n"
+ "underground and is said to make volcanoes\n"
+ "erupt on awakening.");
+
+const u8 gRayquazaPokedexText[] = _(
+ "A POKéMON that flies endlessly in the\n"
+ "ozone layer. It is said it would descend\n"
+ "to the ground if KYOGRE and GROUDON\n"
+ "were to fight.");
+
+const u8 gJirachiPokedexText[] = _(
+ "JIRACHI is said to make wishes come true.\n"
+ "While it sleeps, a tough crystalline shell\n"
+ "envelops the body to protect it from\n"
+ "enemies.");
+
+const u8 gDeoxysPokedexText[] = _(
+ "A POKéMON that mutated from an\n"
+ "extraterrestrial virus exposed to a laser\n"
+ "beam. Its body is configured for superior\n"
+ "agility and speed.");
diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h
index 877bf3475..29d0ff32e 100644
--- a/src/data/pokemon_graphics/back_pic_coordinates.h
+++ b/src/data/pokemon_graphics/back_pic_coordinates.h
@@ -47,211 +47,212 @@ const struct MonCoords gMonBackPicCoords[] =
{0x66, 0x0a}, // SPECIES_GLOOM
{0x87, 0x07}, // SPECIES_VILEPLUME
{0x63, 0x14}, // SPECIES_PARAS
- {0x87, 0x07}, // SPECIES_VENONAT
- {0x77, 0x06}, // SPECIES_VENOMOTH
- {0x77, 0x04}, // SPECIES_DIGLETT
- {0x54, 0x10}, // SPECIES_DUGTRIO
- {0x66, 0x0b}, // SPECIES_MEOWTH
- {0x65, 0x0c}, // SPECIES_PERSIAN
- {0x87, 0x07}, // SPECIES_PSYDUCK
- {0x67, 0x07}, // SPECIES_GOLDUCK
- {0x77, 0x05}, // SPECIES_MANKEY
- {0x76, 0x0b}, // SPECIES_PRIMEAPE
- {0x77, 0x07}, // SPECIES_GROWLITHE
- {0x66, 0x08}, // SPECIES_ARCANINE
- {0x87, 0x06}, // SPECIES_POLIWAG
- {0x74, 0x10}, // SPECIES_POLIWHIRL
- {0x65, 0x0c}, // SPECIES_POLIWRATH
- {0x86, 0x0b}, // SPECIES_ABRA
- {0x66, 0x0b}, // SPECIES_KADABRA
- {0x76, 0x08}, // SPECIES_ALAKAZAM
- {0x67, 0x05}, // SPECIES_MACHOP
- {0x65, 0x0c}, // SPECIES_MACHOKE
- {0x76, 0x09}, // SPECIES_MACHAMP
- {0x67, 0x04}, // SPECIES_BELLSPROUT
- {0x66, 0x0a}, // SPECIES_WEEPINBELL
- {0x66, 0x09}, // SPECIES_VICTREEBEL
- {0x87, 0x06}, // SPECIES_TENTACOOL
- {0x56, 0x0a}, // SPECIES_TENTACRUEL
- {0x86, 0x0b}, // SPECIES_GEODUDE
- {0x66, 0x0b}, // SPECIES_GRAVELER
- {0x75, 0x0c}, // SPECIES_GOLEM
- {0x84, 0x10}, // SPECIES_PONYTA
- {0x66, 0x09}, // SPECIES_RAPIDASH
- {0x87, 0x05}, // SPECIES_SLOWPOKE
- {0x85, 0x0e}, // SPECIES_SLOWBRO
- {0x86, 0x0a}, // SPECIES_MAGNEMITE
- {0x43, 0x14}, // SPECIES_MAGNETON
+ {0x87, 0x07}, // SPECIES_PARASECT
+ {0x77, 0x06}, // SPECIES_VENONAT
+ {0x77, 0x04}, // SPECIES_VENOMOTH
+ {0x54, 0x10}, // SPECIES_DIGLETT
+ {0x66, 0x0b}, // SPECIES_DUGTRIO
+ {0x65, 0x0c}, // SPECIES_MEOWTH
+ {0x87, 0x07}, // SPECIES_PERSIAN
+ {0x67, 0x07}, // SPECIES_PSYDUCK
+ {0x77, 0x05}, // SPECIES_GOLDUCK
+ {0x76, 0x0b}, // SPECIES_MANKEY
+ {0x77, 0x07}, // SPECIES_PRIMEAPE
+ {0x66, 0x08}, // SPECIES_GROWLITHE
+ {0x87, 0x06}, // SPECIES_ARCANINE
+ {0x74, 0x10}, // SPECIES_POLIWAG
+ {0x65, 0x0c}, // SPECIES_POLIWHIRL
+ {0x86, 0x0b}, // SPECIES_POLIWRATH
+ {0x66, 0x0b}, // SPECIES_ABRA
+ {0x76, 0x08}, // SPECIES_KADABRA
+ {0x67, 0x05}, // SPECIES_ALAKAZAM
+ {0x65, 0x0c}, // SPECIES_MACHOP
+ {0x76, 0x09}, // SPECIES_MACHOKE
+ {0x67, 0x04}, // SPECIES_MACHAMP
+ {0x66, 0x0a}, // SPECIES_BELLSPROUT
+ {0x66, 0x09}, // SPECIES_WEEPINBELL
+ {0x87, 0x06}, // SPECIES_VICTREEBEL
+ {0x56, 0x0a}, // SPECIES_TENTACOOL
+ {0x86, 0x0b}, // SPECIES_TENTACRUEL
+ {0x66, 0x0b}, // SPECIES_GEODUDE
+ {0x75, 0x0c}, // SPECIES_GRAVELER
+ {0x84, 0x10}, // SPECIES_GOLEM
+ {0x66, 0x09}, // SPECIES_PONYTA
+ {0x87, 0x05}, // SPECIES_RAPIDASH
+ {0x85, 0x0e}, // SPECIES_SLOWPOKE
+ {0x86, 0x0a}, // SPECIES_SLOWBRO
+ {0x43, 0x14}, // SPECIES_MAGNEMITE
+ {0x66, 0x0a}, // SPECIES_MAGNETON
{0x66, 0x0a}, // SPECIES_FARFETCHD
- {0x66, 0x0a}, // SPECIES_DODUO
- {0x66, 0x08}, // SPECIES_DODRIO
- {0x88, 0x01}, // SPECIES_SEEL
- {0x66, 0x0a}, // SPECIES_DEWGONG
- {0x77, 0x05}, // SPECIES_GRIMER
- {0x75, 0x0c}, // SPECIES_MUK
- {0x87, 0x05}, // SPECIES_SHELLDER
- {0x76, 0x0b}, // SPECIES_CLOYSTER
- {0x87, 0x06}, // SPECIES_GASTLY
- {0x85, 0x0e}, // SPECIES_HAUNTER
- {0x76, 0x08}, // SPECIES_GENGAR
- {0x76, 0x09}, // SPECIES_ONIX
- {0x78, 0x00}, // SPECIES_DROWZEE
- {0x65, 0x0d}, // SPECIES_HYPNO
- {0x66, 0x09}, // SPECIES_KRABBY
- {0x66, 0x0a}, // SPECIES_KINGLER
- {0x77, 0x04}, // SPECIES_VOLTORB
- {0x55, 0x0e}, // SPECIES_ELECTRODE
+ {0x66, 0x08}, // SPECIES_DODUO
+ {0x88, 0x01}, // SPECIES_DODRIO
+ {0x66, 0x0a}, // SPECIES_SEEL
+ {0x77, 0x05}, // SPECIES_DEWGONG
+ {0x75, 0x0c}, // SPECIES_GRIMER
+ {0x87, 0x05}, // SPECIES_MUK
+ {0x76, 0x0b}, // SPECIES_SHELLDER
+ {0x87, 0x06}, // SPECIES_CLOYSTER
+ {0x85, 0x0e}, // SPECIES_GASTLY
+ {0x76, 0x08}, // SPECIES_HAUNTER
+ {0x76, 0x09}, // SPECIES_GENGAR
+ {0x78, 0x00}, // SPECIES_ONIX
+ {0x65, 0x0d}, // SPECIES_DROWZEE
+ {0x66, 0x09}, // SPECIES_HYPNO
+ {0x66, 0x0a}, // SPECIES_KRABBY
+ {0x77, 0x04}, // SPECIES_KINGLER
+ {0x55, 0x0e}, // SPECIES_VOLTORB
+ {0x65, 0x0d}, // SPECIES_ELECTRODE
{0x65, 0x0d}, // SPECIES_EXEGGCUTE
- {0x65, 0x0d}, // SPECIES_EXEGGUTOR
- {0x87, 0x04}, // SPECIES_CUBONE
- {0x66, 0x0a}, // SPECIES_MAROWAK
- {0x66, 0x08}, // SPECIES_HITMONLEE
+ {0x87, 0x04}, // SPECIES_EXEGGUTOR
+ {0x66, 0x0a}, // SPECIES_CUBONE
+ {0x66, 0x08}, // SPECIES_MAROWAK
+ {0x65, 0x0c}, // SPECIES_HITMONLEE
{0x65, 0x0c}, // SPECIES_HITMONCHAN
- {0x65, 0x0c}, // SPECIES_LICKITUNG
- {0x65, 0x0e}, // SPECIES_KOFFING
- {0x66, 0x09}, // SPECIES_WEEZING
- {0x77, 0x06}, // SPECIES_RHYHORN
- {0x85, 0x0c}, // SPECIES_RHYDON
- {0x88, 0x03}, // SPECIES_CHANSEY
- {0x86, 0x0b}, // SPECIES_TANGELA
- {0x85, 0x0e}, // SPECIES_KANGASKHAN
- {0x77, 0x05}, // SPECIES_HORSEA
- {0x66, 0x09}, // SPECIES_SEADRA
+ {0x65, 0x0e}, // SPECIES_LICKITUNG
+ {0x66, 0x09}, // SPECIES_KOFFING
+ {0x77, 0x06}, // SPECIES_WEEZING
+ {0x85, 0x0c}, // SPECIES_RHYHORN
+ {0x88, 0x03}, // SPECIES_RHYDON
+ {0x86, 0x0b}, // SPECIES_CHANSEY
+ {0x85, 0x0e}, // SPECIES_TANGELA
+ {0x77, 0x05}, // SPECIES_KANGASKHAN
+ {0x66, 0x09}, // SPECIES_HORSEA
+ {0x66, 0x08}, // SPECIES_SEADRA
{0x66, 0x08}, // SPECIES_GOLDEEN
- {0x66, 0x08}, // SPECIES_SEAKING
- {0x76, 0x0b}, // SPECIES_STARYU
- {0x65, 0x0d}, // SPECIES_STARMIE
- {0x85, 0x0e}, // SPECIES_MR_MIME
- {0x85, 0x0d}, // SPECIES_SCYTHER
- {0x77, 0x07}, // SPECIES_JYNX
- {0x86, 0x0a}, // SPECIES_ELECTABUZZ
+ {0x76, 0x0b}, // SPECIES_SEAKING
+ {0x65, 0x0d}, // SPECIES_STARYU
+ {0x85, 0x0e}, // SPECIES_STARMIE
+ {0x85, 0x0d}, // SPECIES_MR_MIME
+ {0x77, 0x07}, // SPECIES_SCYTHER
+ {0x86, 0x0a}, // SPECIES_JYNX
+ {0x66, 0x08}, // SPECIES_ELECTABUZZ
{0x66, 0x08}, // SPECIES_MAGMAR
- {0x66, 0x08}, // SPECIES_PINSIR
- {0x66, 0x09}, // SPECIES_TAUROS
- {0x85, 0x0d}, // SPECIES_MAGIKARP
- {0x76, 0x09}, // SPECIES_GYARADOS
- {0x78, 0x00}, // SPECIES_LAPRAS
- {0x77, 0x04}, // SPECIES_DITTO
- {0x54, 0x11}, // SPECIES_EEVEE
+ {0x66, 0x09}, // SPECIES_PINSIR
+ {0x85, 0x0d}, // SPECIES_TAUROS
+ {0x76, 0x09}, // SPECIES_MAGIKARP
+ {0x78, 0x00}, // SPECIES_GYARADOS
+ {0x77, 0x04}, // SPECIES_LAPRAS
+ {0x54, 0x11}, // SPECIES_DITTO
+ {0x66, 0x0a}, // SPECIES_EEVEE
{0x66, 0x0a}, // SPECIES_VAPOREON
- {0x66, 0x0a}, // SPECIES_JOLTEON
- {0x87, 0x06}, // SPECIES_FLAREON
- {0x67, 0x05}, // SPECIES_PORYGON
- {0x65, 0x0d}, // SPECIES_OMANYTE
- {0x66, 0x0a}, // SPECIES_OMASTAR
- {0x66, 0x08}, // SPECIES_KABUTO
- {0x65, 0x0d}, // SPECIES_KABUTOPS
- {0x77, 0x05}, // SPECIES_AERODACTYL
- {0x86, 0x08}, // SPECIES_SNORLAX
- {0x86, 0x0b}, // SPECIES_ARTICUNO
- {0x65, 0x0c}, // SPECIES_ZAPDOS
- {0x76, 0x0b}, // SPECIES_MOLTRES
- {0x87, 0x04}, // SPECIES_DRATINI
- {0x66, 0x09}, // SPECIES_DRAGONAIR
- {0x78, 0x00}, // SPECIES_DRAGONITE
- {0x87, 0x06}, // SPECIES_MEWTWO
- {0x78, 0x01}, // SPECIES_MEW
- {0x66, 0x08}, // SPECIES_CHIKORITA
- {0x56, 0x0a}, // SPECIES_BAYLEEF
- {0x66, 0x08}, // SPECIES_MEGANIUM
- {0x78, 0x00}, // SPECIES_CYNDAQUIL
- {0x76, 0x09}, // SPECIES_QUILAVA
+ {0x87, 0x06}, // SPECIES_JOLTEON
+ {0x67, 0x05}, // SPECIES_FLAREON
+ {0x65, 0x0d}, // SPECIES_PORYGON
+ {0x66, 0x0a}, // SPECIES_OMANYTE
+ {0x66, 0x08}, // SPECIES_OMASTAR
+ {0x65, 0x0d}, // SPECIES_KABUTO
+ {0x77, 0x05}, // SPECIES_KABUTOPS
+ {0x86, 0x08}, // SPECIES_AERODACTYL
+ {0x86, 0x0b}, // SPECIES_SNORLAX
+ {0x65, 0x0c}, // SPECIES_ARTICUNO
+ {0x76, 0x0b}, // SPECIES_ZAPDOS
+ {0x87, 0x04}, // SPECIES_MOLTRES
+ {0x66, 0x09}, // SPECIES_DRATINI
+ {0x78, 0x00}, // SPECIES_DRAGONAIR
+ {0x87, 0x06}, // SPECIES_DRAGONITE
+ {0x78, 0x01}, // SPECIES_MEWTWO
+ {0x66, 0x08}, // SPECIES_MEW
+ {0x56, 0x0a}, // SPECIES_CHIKORITA
+ {0x66, 0x08}, // SPECIES_BAYLEEF
+ {0x78, 0x00}, // SPECIES_MEGANIUM
+ {0x76, 0x09}, // SPECIES_CYNDAQUIL
+ {0x87, 0x04}, // SPECIES_QUILAVA
{0x87, 0x04}, // SPECIES_TYPHLOSION
- {0x87, 0x04}, // SPECIES_TOTODILE
- {0x66, 0x0b}, // SPECIES_CROCONAW
- {0x67, 0x07}, // SPECIES_FERALIGATR
- {0x88, 0x01}, // SPECIES_SENTRET
- {0x67, 0x05}, // SPECIES_FURRET
+ {0x66, 0x0b}, // SPECIES_TOTODILE
+ {0x67, 0x07}, // SPECIES_CROCONAW
+ {0x88, 0x01}, // SPECIES_FERALIGATR
+ {0x67, 0x05}, // SPECIES_SENTRET
+ {0x66, 0x08}, // SPECIES_FURRET
{0x66, 0x08}, // SPECIES_HOOTHOOT
- {0x66, 0x08}, // SPECIES_NOCTOWL
- {0x68, 0x03}, // SPECIES_LEDYBA
- {0x76, 0x0b}, // SPECIES_LEDIAN
- {0x77, 0x07}, // SPECIES_SPINARAK
- {0x73, 0x15}, // SPECIES_ARIADOS
- {0x86, 0x0b}, // SPECIES_CROBAT
- {0x87, 0x05}, // SPECIES_CHINCHOU
+ {0x68, 0x03}, // SPECIES_NOCTOWL
+ {0x76, 0x0b}, // SPECIES_LEDYBA
+ {0x77, 0x07}, // SPECIES_LEDIAN
+ {0x73, 0x15}, // SPECIES_SPINARAK
+ {0x86, 0x0b}, // SPECIES_ARIADOS
+ {0x87, 0x05}, // SPECIES_CROBAT
+ {0x86, 0x08}, // SPECIES_CHINCHOU
{0x86, 0x08}, // SPECIES_LANTURN
- {0x86, 0x08}, // SPECIES_PICHU
- {0x66, 0x0b}, // SPECIES_CLEFFA
- {0x65, 0x0f}, // SPECIES_IGGLYBUFF
- {0x66, 0x0b}, // SPECIES_TOGEPI
- {0x54, 0x10}, // SPECIES_TOGETIC
- {0x66, 0x08}, // SPECIES_NATU
- {0x54, 0x11}, // SPECIES_XATU
- {0x76, 0x08}, // SPECIES_MAREEP
+ {0x66, 0x0b}, // SPECIES_PICHU
+ {0x65, 0x0f}, // SPECIES_CLEFFA
+ {0x66, 0x0b}, // SPECIES_IGGLYBUFF
+ {0x54, 0x10}, // SPECIES_TOGEPI
+ {0x66, 0x08}, // SPECIES_TOGETIC
+ {0x54, 0x11}, // SPECIES_NATU
+ {0x76, 0x08}, // SPECIES_XATU
+ {0x66, 0x09}, // SPECIES_MAREEP
{0x66, 0x09}, // SPECIES_FLAAFFY
- {0x66, 0x09}, // SPECIES_AMPHAROS
- {0x88, 0x01}, // SPECIES_BELLOSSOM
- {0x66, 0x0b}, // SPECIES_MARILL
- {0x75, 0x0c}, // SPECIES_AZUMARILL
- {0x86, 0x08}, // SPECIES_SUDOWOODO
- {0x66, 0x08}, // SPECIES_POLITOED
- {0x66, 0x09}, // SPECIES_HOPPIP
- {0x66, 0x0b}, // SPECIES_SKIPLOOM
- {0x65, 0x0d}, // SPECIES_JUMPLUFF
- {0x87, 0x04}, // SPECIES_AIPOM
- {0x66, 0x09}, // SPECIES_SUNKERN
- {0x56, 0x0a}, // SPECIES_SUNFLORA
- {0x66, 0x08}, // SPECIES_YANMA
- {0x77, 0x04}, // SPECIES_WOOPER
- {0x85, 0x0f}, // SPECIES_QUAGSIRE
- {0x76, 0x08}, // SPECIES_ESPEON
- {0x76, 0x0b}, // SPECIES_UMBREON
- {0x87, 0x04}, // SPECIES_MURKROW
- {0x66, 0x09}, // SPECIES_SLOWKING
- {0x66, 0x08}, // SPECIES_MISDREAVUS
- {0x66, 0x0a}, // SPECIES_UNOWN
- {0x36, 0x08}, // SPECIES_WOBBUFFET
- {0x75, 0x0c}, // SPECIES_GIRAFARIG
- {0x87, 0x05}, // SPECIES_PINECO
- {0x65, 0x0f}, // SPECIES_FORRETRESS
- {0x84, 0x10}, // SPECIES_DUNSPARCE
- {0x85, 0x0f}, // SPECIES_GLIGAR
- {0x87, 0x05}, // SPECIES_STEELIX
- {0x88, 0x00}, // SPECIES_SNUBBULL
- {0x76, 0x0a}, // SPECIES_GRANBULL
- {0x87, 0x05}, // SPECIES_QWILFISH
- {0x77, 0x07}, // SPECIES_SCIZOR
- {0x77, 0x04}, // SPECIES_SHUCKLE
- {0x56, 0x0b}, // SPECIES_HERACROSS
- {0x77, 0x04}, // SPECIES_SNEASEL
+ {0x88, 0x01}, // SPECIES_AMPHAROS
+ {0x66, 0x0b}, // SPECIES_BELLOSSOM
+ {0x75, 0x0c}, // SPECIES_MARILL
+ {0x86, 0x08}, // SPECIES_AZUMARILL
+ {0x66, 0x08}, // SPECIES_SUDOWOODO
+ {0x66, 0x09}, // SPECIES_POLITOED
+ {0x66, 0x0b}, // SPECIES_HOPPIP
+ {0x65, 0x0d}, // SPECIES_SKIPLOOM
+ {0x87, 0x04}, // SPECIES_JUMPLUFF
+ {0x66, 0x09}, // SPECIES_AIPOM
+ {0x56, 0x0a}, // SPECIES_SUNKERN
+ {0x66, 0x08}, // SPECIES_SUNFLORA
+ {0x77, 0x04}, // SPECIES_YANMA
+ {0x85, 0x0f}, // SPECIES_WOOPER
+ {0x76, 0x08}, // SPECIES_QUAGSIRE
+ {0x76, 0x0b}, // SPECIES_ESPEON
+ {0x87, 0x04}, // SPECIES_UMBREON
+ {0x66, 0x09}, // SPECIES_MURKROW
+ {0x66, 0x08}, // SPECIES_SLOWKING
+ {0x66, 0x0a}, // SPECIES_MISDREAVUS
+ {0x36, 0x08}, // SPECIES_UNOWN
+ {0x75, 0x0c}, // SPECIES_WOBBUFFET
+ {0x87, 0x05}, // SPECIES_GIRAFARIG
+ {0x65, 0x0f}, // SPECIES_PINECO
+ {0x84, 0x10}, // SPECIES_FORRETRESS
+ {0x85, 0x0f}, // SPECIES_DUNSPARCE
+ {0x87, 0x05}, // SPECIES_GLIGAR
+ {0x88, 0x00}, // SPECIES_STEELIX
+ {0x76, 0x0a}, // SPECIES_SNUBBULL
+ {0x87, 0x05}, // SPECIES_GRANBULL
+ {0x77, 0x07}, // SPECIES_QWILFISH
+ {0x77, 0x04}, // SPECIES_SCIZOR
+ {0x56, 0x0b}, // SPECIES_SHUCKLE
+ {0x77, 0x04}, // SPECIES_HERACROSS
+ {0x66, 0x08}, // SPECIES_SNEASEL
{0x66, 0x08}, // SPECIES_TEDDIURSA
- {0x66, 0x08}, // SPECIES_URSARING
- {0x88, 0x03}, // SPECIES_SLUGMA
- {0x66, 0x08}, // SPECIES_MAGCARGO
- {0x76, 0x09}, // SPECIES_SWINUB
- {0x63, 0x15}, // SPECIES_PILOSWINE
- {0x75, 0x0d}, // SPECIES_CORSOLA
- {0x65, 0x0c}, // SPECIES_REMORAID
- {0x75, 0x0d}, // SPECIES_OCTILLERY
- {0x66, 0x0a}, // SPECIES_DELIBIRD
- {0x67, 0x06}, // SPECIES_MANTINE
- {0x87, 0x07}, // SPECIES_SKARMORY
- {0x87, 0x04}, // SPECIES_HOUNDOUR
- {0x55, 0x0c}, // SPECIES_HOUNDOOM
- {0x87, 0x07}, // SPECIES_KINGDRA
- {0x87, 0x06}, // SPECIES_PHANPY
- {0x65, 0x0e}, // SPECIES_DONPHAN
- {0x85, 0x0d}, // SPECIES_PORYGON2
- {0x76, 0x0a}, // SPECIES_STANTLER
- {0x78, 0x03}, // SPECIES_SMEARGLE
- {0x76, 0x0a}, // SPECIES_TYROGUE
- {0x66, 0x08}, // SPECIES_HITMONTOP
- {0x87, 0x05}, // SPECIES_SMOOCHUM
- {0x56, 0x09}, // SPECIES_ELEKID
- {0x66, 0x08}, // SPECIES_MAGBY
- {0x66, 0x0b}, // SPECIES_MILTANK
- {0x87, 0x07}, // SPECIES_BLISSEY
- {0x85, 0x0d}, // SPECIES_RAIKOU
- {0x86, 0x0a}, // SPECIES_ENTEI
- {0x87, 0x06}, // SPECIES_SUICUNE
- {0x88, 0x03}, // SPECIES_LARVITAR
- {0x66, 0x08}, // SPECIES_PUPITAR
- {0x67, 0x05}, // SPECIES_TYRANITAR
- {0x88, 0x00}, // SPECIES_LUGIA
+ {0x88, 0x03}, // SPECIES_URSARING
+ {0x66, 0x08}, // SPECIES_SLUGMA
+ {0x76, 0x09}, // SPECIES_MAGCARGO
+ {0x63, 0x15}, // SPECIES_SWINUB
+ {0x75, 0x0d}, // SPECIES_PILOSWINE
+ {0x65, 0x0c}, // SPECIES_CORSOLA
+ {0x75, 0x0d}, // SPECIES_REMORAID
+ {0x66, 0x0a}, // SPECIES_OCTILLERY
+ {0x67, 0x06}, // SPECIES_DELIBIRD
+ {0x87, 0x07}, // SPECIES_MANTINE
+ {0x87, 0x04}, // SPECIES_SKARMORY
+ {0x55, 0x0c}, // SPECIES_HOUNDOUR
+ {0x87, 0x07}, // SPECIES_HOUNDOOM
+ {0x87, 0x06}, // SPECIES_KINGDRA
+ {0x65, 0x0e}, // SPECIES_PHANPY
+ {0x85, 0x0d}, // SPECIES_DONPHAN
+ {0x76, 0x0a}, // SPECIES_PORYGON2
+ {0x78, 0x03}, // SPECIES_STANTLER
+ {0x76, 0x0a}, // SPECIES_SMEARGLE
+ {0x66, 0x08}, // SPECIES_TYROGUE
+ {0x87, 0x05}, // SPECIES_HITMONTOP
+ {0x56, 0x09}, // SPECIES_SMOOCHUM
+ {0x66, 0x08}, // SPECIES_ELEKID
+ {0x66, 0x0b}, // SPECIES_MAGBY
+ {0x87, 0x07}, // SPECIES_MILTANK
+ {0x85, 0x0d}, // SPECIES_BLISSEY
+ {0x86, 0x0a}, // SPECIES_RAIKOU
+ {0x87, 0x06}, // SPECIES_ENTEI
+ {0x88, 0x03}, // SPECIES_SUICUNE
+ {0x66, 0x08}, // SPECIES_LARVITAR
+ {0x67, 0x05}, // SPECIES_PUPITAR
+ {0x88, 0x00}, // SPECIES_TYRANITAR
+ {0x88, 0x01}, // SPECIES_LUGIA
{0x88, 0x01}, // SPECIES_HO_OH
- {0x88, 0x01}, // SPECIES_CELEBI
- {0x66, 0x08}, // SPECIES_OLD_UNOWN_B
+ {0x66, 0x08}, // SPECIES_CELEBI
+ {0x88, 0x02}, // SPECIES_OLD_UNOWN_B
{0x88, 0x02}, // SPECIES_OLD_UNOWN_C
{0x88, 0x02}, // SPECIES_OLD_UNOWN_D
{0x88, 0x02}, // SPECIES_OLD_UNOWN_E
@@ -276,168 +277,167 @@ const struct MonCoords gMonBackPicCoords[] =
{0x88, 0x02}, // SPECIES_OLD_UNOWN_X
{0x88, 0x02}, // SPECIES_OLD_UNOWN_Y
{0x88, 0x02}, // SPECIES_OLD_UNOWN_Z
- {0x88, 0x02}, // SPECIES_TREECKO
- {0x87, 0x06}, // SPECIES_GROVYLE
- {0x86, 0x08}, // SPECIES_SCEPTILE
- {0x88, 0x01}, // SPECIES_TORCHIC
- {0x67, 0x05}, // SPECIES_COMBUSKEN
+ {0x87, 0x06}, // SPECIES_TREECKO
+ {0x86, 0x08}, // SPECIES_GROVYLE
+ {0x88, 0x01}, // SPECIES_SCEPTILE
+ {0x67, 0x05}, // SPECIES_TORCHIC
+ {0x88, 0x00}, // SPECIES_COMBUSKEN
{0x88, 0x00}, // SPECIES_BLAZIKEN
- {0x88, 0x00}, // SPECIES_MUDKIP
- {0x77, 0x05}, // SPECIES_MARSHTOMP
- {0x87, 0x04}, // SPECIES_SWAMPERT
- {0x87, 0x05}, // SPECIES_POOCHYENA
- {0x76, 0x09}, // SPECIES_MIGHTYENA
- {0x87, 0x04}, // SPECIES_ZIGZAGOON
- {0x76, 0x0b}, // SPECIES_LINOONE
- {0x85, 0x0f}, // SPECIES_WURMPLE
- {0x76, 0x0b}, // SPECIES_SILCOON
- {0x83, 0x15}, // SPECIES_BEAUTIFLY
- {0x88, 0x00}, // SPECIES_CASCOON
- {0x73, 0x14}, // SPECIES_DUSTOX
- {0x83, 0x14}, // SPECIES_LOTAD
- {0x75, 0x0f}, // SPECIES_LOMBRE
- {0x86, 0x08}, // SPECIES_LUDICOLO
- {0x86, 0x0a}, // SPECIES_SEEDOT
- {0x86, 0x09}, // SPECIES_NUZLEAF
- {0x76, 0x0a}, // SPECIES_SHIFTRY
- {0x86, 0x08}, // SPECIES_NINCADA
- {0x83, 0x14}, // SPECIES_NINJASK
- {0x86, 0x08}, // SPECIES_SHEDINJA
- {0x77, 0x06}, // SPECIES_TAILLOW
- {0x64, 0x11}, // SPECIES_SWELLOW
- {0x86, 0x08}, // SPECIES_SHROOMISH
- {0x85, 0x0d}, // SPECIES_BRELOOM
- {0x87, 0x04}, // SPECIES_SPINDA
- {0x77, 0x04}, // SPECIES_WINGULL
- {0x85, 0x0e}, // SPECIES_PELIPPER
- {0x87, 0x06}, // SPECIES_SURSKIT
- {0x86, 0x0b}, // SPECIES_MASQUERAIN
- {0x88, 0x00}, // SPECIES_WAILMER
- {0x83, 0x15}, // SPECIES_WAILORD
- {0x83, 0x16}, // SPECIES_SKITTY
- {0x86, 0x0a}, // SPECIES_DELCATTY
- {0x86, 0x08}, // SPECIES_KECLEON
- {0x87, 0x06}, // SPECIES_BALTOY
- {0x86, 0x08}, // SPECIES_CLAYDOL
- {0x87, 0x07}, // SPECIES_NOSEPASS
- {0x85, 0x0c}, // SPECIES_TORKOAL
- {0x86, 0x0a}, // SPECIES_SABLEYE
- {0x76, 0x08}, // SPECIES_BARBOACH
- {0x66, 0x0a}, // SPECIES_WHISCASH
- {0x86, 0x0a}, // SPECIES_LUVDISC
- {0x46, 0x0a}, // SPECIES_CORPHISH
- {0x77, 0x07}, // SPECIES_CRAWDAUNT
- {0x87, 0x05}, // SPECIES_FEEBAS
- {0x67, 0x07}, // SPECIES_MILOTIC
- {0x68, 0x02}, // SPECIES_CARVANHA
- {0x87, 0x07}, // SPECIES_SHARPEDO
- {0x88, 0x02}, // SPECIES_TRAPINCH
- {0x75, 0x0e}, // SPECIES_VIBRAVA
- {0x74, 0x11}, // SPECIES_FLYGON
- {0x88, 0x02}, // SPECIES_MAKUHITA
- {0x76, 0x0b}, // SPECIES_HARIYAMA
- {0x87, 0x07}, // SPECIES_ELECTRIKE
- {0x84, 0x10}, // SPECIES_MANECTRIC
- {0x87, 0x04}, // SPECIES_NUMEL
- {0x86, 0x0b}, // SPECIES_CAMERUPT
- {0x84, 0x13}, // SPECIES_SPHEAL
- {0x64, 0x12}, // SPECIES_SEALEO
- {0x86, 0x0a}, // SPECIES_WALREIN
- {0x87, 0x06}, // SPECIES_CACNEA
- {0x85, 0x0f}, // SPECIES_CACTURNE
- {0x87, 0x07}, // SPECIES_SNORUNT
- {0x76, 0x0a}, // SPECIES_GLALIE
- {0x85, 0x0c}, // SPECIES_LUNATONE
+ {0x77, 0x05}, // SPECIES_MUDKIP
+ {0x87, 0x04}, // SPECIES_MARSHTOMP
+ {0x87, 0x05}, // SPECIES_SWAMPERT
+ {0x76, 0x09}, // SPECIES_POOCHYENA
+ {0x87, 0x04}, // SPECIES_MIGHTYENA
+ {0x76, 0x0b}, // SPECIES_ZIGZAGOON
+ {0x85, 0x0f}, // SPECIES_LINOONE
+ {0x76, 0x0b}, // SPECIES_WURMPLE
+ {0x83, 0x15}, // SPECIES_SILCOON
+ {0x88, 0x00}, // SPECIES_BEAUTIFLY
+ {0x73, 0x14}, // SPECIES_CASCOON
+ {0x83, 0x14}, // SPECIES_DUSTOX
+ {0x75, 0x0f}, // SPECIES_LOTAD
+ {0x86, 0x08}, // SPECIES_LOMBRE
+ {0x86, 0x0a}, // SPECIES_LUDICOLO
+ {0x86, 0x09}, // SPECIES_SEEDOT
+ {0x76, 0x0a}, // SPECIES_NUZLEAF
+ {0x86, 0x08}, // SPECIES_SHIFTRY
+ {0x83, 0x14}, // SPECIES_NINCADA
+ {0x86, 0x08}, // SPECIES_NINJASK
+ {0x77, 0x06}, // SPECIES_SHEDINJA
+ {0x64, 0x11}, // SPECIES_TAILLOW
+ {0x86, 0x08}, // SPECIES_SWELLOW
+ {0x85, 0x0d}, // SPECIES_SHROOMISH
+ {0x87, 0x04}, // SPECIES_BRELOOM
+ {0x77, 0x04}, // SPECIES_SPINDA
+ {0x85, 0x0e}, // SPECIES_WINGULL
+ {0x87, 0x06}, // SPECIES_PELIPPER
+ {0x86, 0x0b}, // SPECIES_SURSKIT
+ {0x88, 0x00}, // SPECIES_MASQUERAIN
+ {0x83, 0x15}, // SPECIES_WAILMER
+ {0x83, 0x16}, // SPECIES_WAILORD
+ {0x86, 0x0a}, // SPECIES_SKITTY
+ {0x86, 0x08}, // SPECIES_DELCATTY
+ {0x87, 0x06}, // SPECIES_KECLEON
+ {0x86, 0x08}, // SPECIES_BALTOY
+ {0x87, 0x07}, // SPECIES_CLAYDOL
+ {0x85, 0x0c}, // SPECIES_NOSEPASS
+ {0x86, 0x0a}, // SPECIES_TORKOAL
+ {0x76, 0x08}, // SPECIES_SABLEYE
+ {0x66, 0x0a}, // SPECIES_BARBOACH
+ {0x86, 0x0a}, // SPECIES_WHISCASH
+ {0x46, 0x0a}, // SPECIES_LUVDISC
+ {0x77, 0x07}, // SPECIES_CORPHISH
+ {0x87, 0x05}, // SPECIES_CRAWDAUNT
+ {0x67, 0x07}, // SPECIES_FEEBAS
+ {0x68, 0x02}, // SPECIES_MILOTIC
+ {0x87, 0x07}, // SPECIES_CARVANHA
+ {0x88, 0x02}, // SPECIES_SHARPEDO
+ {0x75, 0x0e}, // SPECIES_TRAPINCH
+ {0x74, 0x11}, // SPECIES_VIBRAVA
+ {0x88, 0x02}, // SPECIES_FLYGON
+ {0x76, 0x0b}, // SPECIES_MAKUHITA
+ {0x87, 0x07}, // SPECIES_HARIYAMA
+ {0x84, 0x10}, // SPECIES_ELECTRIKE
+ {0x87, 0x04}, // SPECIES_MANECTRIC
+ {0x86, 0x0b}, // SPECIES_NUMEL
+ {0x84, 0x13}, // SPECIES_CAMERUPT
+ {0x64, 0x12}, // SPECIES_SPHEAL
+ {0x86, 0x0a}, // SPECIES_SEALEO
+ {0x87, 0x06}, // SPECIES_WALREIN
+ {0x85, 0x0f}, // SPECIES_CACNEA
+ {0x87, 0x07}, // SPECIES_CACTURNE
+ {0x76, 0x0a}, // SPECIES_SNORUNT
+ {0x85, 0x0c}, // SPECIES_GLALIE
+ {0x87, 0x05}, // SPECIES_LUNATONE
{0x87, 0x05}, // SPECIES_SOLROCK
- {0x87, 0x05}, // SPECIES_AZURILL
- {0x86, 0x0a}, // SPECIES_SPOINK
- {0x56, 0x0b}, // SPECIES_GRUMPIG
- {0x87, 0x04}, // SPECIES_PLUSLE
+ {0x86, 0x0a}, // SPECIES_AZURILL
+ {0x56, 0x0b}, // SPECIES_SPOINK
+ {0x87, 0x04}, // SPECIES_GRUMPIG
+ {0x76, 0x08}, // SPECIES_PLUSLE
{0x76, 0x08}, // SPECIES_MINUN
- {0x76, 0x08}, // SPECIES_MAWILE
- {0x87, 0x04}, // SPECIES_MEDITITE
- {0x76, 0x0b}, // SPECIES_MEDICHAM
- {0x68, 0x03}, // SPECIES_SWABLU
- {0x86, 0x09}, // SPECIES_ALTARIA
- {0x87, 0x06}, // SPECIES_WYNAUT
- {0x77, 0x07}, // SPECIES_DUSKULL
- {0x66, 0x0b}, // SPECIES_DUSCLOPS
+ {0x87, 0x04}, // SPECIES_MAWILE
+ {0x76, 0x0b}, // SPECIES_MEDITITE
+ {0x68, 0x03}, // SPECIES_MEDICHAM
+ {0x86, 0x09}, // SPECIES_SWABLU
+ {0x87, 0x06}, // SPECIES_ALTARIA
+ {0x77, 0x07}, // SPECIES_WYNAUT
+ {0x66, 0x0b}, // SPECIES_DUSKULL
+ {0x86, 0x08}, // SPECIES_DUSCLOPS
{0x86, 0x08}, // SPECIES_ROSELIA
- {0x86, 0x08}, // SPECIES_SLAKOTH
- {0x85, 0x0f}, // SPECIES_VIGOROTH
- {0x86, 0x0a}, // SPECIES_SLAKING
- {0x86, 0x08}, // SPECIES_GULPIN
- {0x66, 0x0b}, // SPECIES_SWALOT
- {0x77, 0x06}, // SPECIES_TROPIUS
- {0x87, 0x07}, // SPECIES_WHISMUR
- {0x85, 0x0d}, // SPECIES_LOUDRED
- {0x86, 0x09}, // SPECIES_EXPLOUD
- {0x88, 0x03}, // SPECIES_CLAMPERL
- {0x85, 0x0d}, // SPECIES_HUNTAIL
- {0x68, 0x02}, // SPECIES_GOREBYSS
- {0x77, 0x05}, // SPECIES_ABSOL
- {0x78, 0x03}, // SPECIES_SHUPPET
- {0x77, 0x06}, // SPECIES_BANETTE
- {0x65, 0x0c}, // SPECIES_SEVIPER
- {0x88, 0x03}, // SPECIES_ZANGOOSE
- {0x88, 0x01}, // SPECIES_RELICANTH
- {0x86, 0x0a}, // SPECIES_ARON
- {0x54, 0x11}, // SPECIES_LAIRON
- {0x84, 0x11}, // SPECIES_AGGRON
- {0x87, 0x07}, // SPECIES_CASTFORM
- {0x45, 0x0d}, // SPECIES_VOLBEAT
- {0x76, 0x08}, // SPECIES_ILLUMISE
- {0x67, 0x06}, // SPECIES_LILEEP
- {0x86, 0x09}, // SPECIES_CRADILY
- {0x77, 0x04}, // SPECIES_ANORITH
- {0x83, 0x17}, // SPECIES_ARMALDO
- {0x77, 0x05}, // SPECIES_RALTS
- {0x45, 0x0d}, // SPECIES_KIRLIA
- {0x57, 0x06}, // SPECIES_GARDEVOIR
- {0x77, 0x04}, // SPECIES_BAGON
- {0x66, 0x08}, // SPECIES_SHELGON
- {0x85, 0x0d}, // SPECIES_SALAMENCE
- {0x77, 0x06}, // SPECIES_BELDUM
- {0x66, 0x0a}, // SPECIES_METANG
- {0x84, 0x10}, // SPECIES_METAGROSS
- {0x83, 0x14}, // SPECIES_REGIROCK
- {0x86, 0x0a}, // SPECIES_REGICE
+ {0x85, 0x0f}, // SPECIES_SLAKOTH
+ {0x86, 0x0a}, // SPECIES_VIGOROTH
+ {0x86, 0x08}, // SPECIES_SLAKING
+ {0x66, 0x0b}, // SPECIES_GULPIN
+ {0x77, 0x06}, // SPECIES_SWALOT
+ {0x87, 0x07}, // SPECIES_TROPIUS
+ {0x85, 0x0d}, // SPECIES_WHISMUR
+ {0x86, 0x09}, // SPECIES_LOUDRED
+ {0x88, 0x03}, // SPECIES_EXPLOUD
+ {0x85, 0x0d}, // SPECIES_CLAMPERL
+ {0x68, 0x02}, // SPECIES_HUNTAIL
+ {0x77, 0x05}, // SPECIES_GOREBYSS
+ {0x78, 0x03}, // SPECIES_ABSOL
+ {0x77, 0x06}, // SPECIES_SHUPPET
+ {0x65, 0x0c}, // SPECIES_BANETTE
+ {0x88, 0x03}, // SPECIES_SEVIPER
+ {0x88, 0x01}, // SPECIES_ZANGOOSE
+ {0x86, 0x0a}, // SPECIES_RELICANTH
+ {0x54, 0x11}, // SPECIES_ARON
+ {0x84, 0x11}, // SPECIES_LAIRON
+ {0x87, 0x07}, // SPECIES_AGGRON
+ {0x45, 0x0d}, // SPECIES_CASTFORM
+ {0x76, 0x08}, // SPECIES_VOLBEAT
+ {0x67, 0x06}, // SPECIES_ILLUMISE
+ {0x86, 0x09}, // SPECIES_LILEEP
+ {0x77, 0x04}, // SPECIES_CRADILY
+ {0x83, 0x17}, // SPECIES_ANORITH
+ {0x77, 0x05}, // SPECIES_ARMALDO
+ {0x45, 0x0d}, // SPECIES_RALTS
+ {0x57, 0x06}, // SPECIES_KIRLIA
+ {0x77, 0x04}, // SPECIES_GARDEVOIR
+ {0x66, 0x08}, // SPECIES_BAGON
+ {0x85, 0x0d}, // SPECIES_SHELGON
+ {0x77, 0x06}, // SPECIES_SALAMENCE
+ {0x66, 0x0a}, // SPECIES_BELDUM
+ {0x84, 0x10}, // SPECIES_METANG
+ {0x83, 0x14}, // SPECIES_METAGROSS
+ {0x86, 0x0a}, // SPECIES_REGIROCK
+ {0x85, 0x0e}, // SPECIES_REGICE
{0x85, 0x0e}, // SPECIES_REGISTEEL
- {0x85, 0x0e}, // SPECIES_KYOGRE
- {0x84, 0x13}, // SPECIES_GROUDON
- {0x87, 0x07}, // SPECIES_RAYQUAZA
- {0x78, 0x00}, // SPECIES_LATIAS
- {0x88, 0x02}, // SPECIES_LATIOS
- {0x88, 0x03}, // SPECIES_JIRACHI
- {0x87, 0x05}, // SPECIES_DEOXYS
- {0x86, 0x09}, // SPECIES_CHIMECHO
- {0x47, 0x07}, // SPECIES_EGG
- {0x36, 0x0a}, // SPECIES_UNOWN_B
- {0x56, 0x09}, // SPECIES_UNOWN_C
- {0x67, 0x06}, // SPECIES_UNOWN_D
- {0x56, 0x08}, // SPECIES_UNOWN_E
- {0x56, 0x0a}, // SPECIES_UNOWN_F
- {0x66, 0x0a}, // SPECIES_UNOWN_G
- {0x57, 0x05}, // SPECIES_UNOWN_H
- {0x66, 0x08}, // SPECIES_UNOWN_I
- {0x37, 0x07}, // SPECIES_UNOWN_J
- {0x46, 0x09}, // SPECIES_UNOWN_K
- {0x57, 0x07}, // SPECIES_UNOWN_L
- {0x46, 0x0a}, // SPECIES_UNOWN_M
+ {0x84, 0x13}, // SPECIES_KYOGRE
+ {0x87, 0x07}, // SPECIES_GROUDON
+ {0x78, 0x00}, // SPECIES_RAYQUAZA
+ {0x88, 0x02}, // SPECIES_LATIAS
+ {0x88, 0x03}, // SPECIES_LATIOS
+ {0x87, 0x05}, // SPECIES_JIRACHI
+ {0x86, 0x09}, // SPECIES_DEOXYS
+ {0x47, 0x07}, // SPECIES_CHIMECHO
+ {0x36, 0x0a}, // SPECIES_EGG
+ {0x56, 0x09}, // SPECIES_UNOWN_B
+ {0x67, 0x06}, // SPECIES_UNOWN_C
+ {0x56, 0x08}, // SPECIES_UNOWN_D
+ {0x56, 0x0a}, // SPECIES_UNOWN_E
+ {0x66, 0x0a}, // SPECIES_UNOWN_F
+ {0x57, 0x05}, // SPECIES_UNOWN_G
+ {0x66, 0x08}, // SPECIES_UNOWN_H
+ {0x37, 0x07}, // SPECIES_UNOWN_I
+ {0x46, 0x09}, // SPECIES_UNOWN_J
+ {0x57, 0x07}, // SPECIES_UNOWN_K
+ {0x46, 0x0a}, // SPECIES_UNOWN_L
+ {0x65, 0x0d}, // SPECIES_UNOWN_M
{0x65, 0x0d}, // SPECIES_UNOWN_N
- {0x65, 0x0d}, // SPECIES_UNOWN_O
- {0x66, 0x08}, // SPECIES_UNOWN_P
- {0x46, 0x0a}, // SPECIES_UNOWN_Q
- {0x55, 0x0f}, // SPECIES_UNOWN_R
- {0x45, 0x0c}, // SPECIES_UNOWN_S
- {0x57, 0x04}, // SPECIES_UNOWN_T
- {0x45, 0x0d}, // SPECIES_UNOWN_U
- {0x65, 0x0d}, // SPECIES_UNOWN_V
- {0x56, 0x0b}, // SPECIES_UNOWN_W
- {0x55, 0x0d}, // SPECIES_UNOWN_X
- {0x55, 0x0f}, // SPECIES_UNOWN_Y
+ {0x66, 0x08}, // SPECIES_UNOWN_O
+ {0x46, 0x0a}, // SPECIES_UNOWN_P
+ {0x55, 0x0f}, // SPECIES_UNOWN_Q
+ {0x45, 0x0c}, // SPECIES_UNOWN_R
+ {0x57, 0x04}, // SPECIES_UNOWN_S
+ {0x45, 0x0d}, // SPECIES_UNOWN_T
+ {0x65, 0x0d}, // SPECIES_UNOWN_U
+ {0x56, 0x0b}, // SPECIES_UNOWN_V
+ {0x55, 0x0d}, // SPECIES_UNOWN_W
+ {0x55, 0x0f}, // SPECIES_UNOWN_X
+ {0x46, 0x0a}, // SPECIES_UNOWN_Y
{0x46, 0x0a}, // SPECIES_UNOWN_Z
- {0x46, 0x0a}, // SPECIES_UNOWN_EMARK
- {0x37, 0x06}, // SPECIES_UNOWN_QMARK
- {0x47, 0x06},
+ {0x37, 0x06}, // SPECIES_UNOWN_EMARK
+ {0x47, 0x06}, // SPECIES_UNOWN_QMARK
};
diff --git a/src/data/pokemon_graphics/footprint_table.h b/src/data/pokemon_graphics/footprint_table.h
new file mode 100644
index 000000000..779ce3dcd
--- /dev/null
+++ b/src/data/pokemon_graphics/footprint_table.h
@@ -0,0 +1,416 @@
+const u8 *const gMonFootprintTable[] =
+{
+ gMonFootprint_Bulbasaur,
+ gMonFootprint_Bulbasaur,
+ gMonFootprint_Ivysaur,
+ gMonFootprint_Venusaur,
+ gMonFootprint_Charmander,
+ gMonFootprint_Charmeleon,
+ gMonFootprint_Charizard,
+ gMonFootprint_Squirtle,
+ gMonFootprint_Wartortle,
+ gMonFootprint_Blastoise,
+ gMonFootprint_Caterpie,
+ gMonFootprint_Metapod,
+ gMonFootprint_Butterfree,
+ gMonFootprint_Weedle,
+ gMonFootprint_Kakuna,
+ gMonFootprint_Beedrill,
+ gMonFootprint_Pidgey,
+ gMonFootprint_Pidgeotto,
+ gMonFootprint_Pidgeot,
+ gMonFootprint_Rattata,
+ gMonFootprint_Raticate,
+ gMonFootprint_Spearow,
+ gMonFootprint_Fearow,
+ gMonFootprint_Ekans,
+ gMonFootprint_Arbok,
+ gMonFootprint_Pikachu,
+ gMonFootprint_Raichu,
+ gMonFootprint_Sandshrew,
+ gMonFootprint_Sandslash,
+ gMonFootprint_NidoranF,
+ gMonFootprint_Nidorina,
+ gMonFootprint_Nidoqueen,
+ gMonFootprint_NidoranM,
+ gMonFootprint_Nidorino,
+ gMonFootprint_Nidoking,
+ gMonFootprint_Clefairy,
+ gMonFootprint_Clefable,
+ gMonFootprint_Vulpix,
+ gMonFootprint_Ninetales,
+ gMonFootprint_Jigglypuff,
+ gMonFootprint_Wigglytuff,
+ gMonFootprint_Zubat,
+ gMonFootprint_Golbat,
+ gMonFootprint_Oddish,
+ gMonFootprint_Gloom,
+ gMonFootprint_Vileplume,
+ gMonFootprint_Paras,
+ gMonFootprint_Parasect,
+ gMonFootprint_Venonat,
+ gMonFootprint_Venomoth,
+ gMonFootprint_Diglett,
+ gMonFootprint_Dugtrio,
+ gMonFootprint_Meowth,
+ gMonFootprint_Persian,
+ gMonFootprint_Psyduck,
+ gMonFootprint_Golduck,
+ gMonFootprint_Mankey,
+ gMonFootprint_Primeape,
+ gMonFootprint_Growlithe,
+ gMonFootprint_Arcanine,
+ gMonFootprint_Poliwag,
+ gMonFootprint_Poliwhirl,
+ gMonFootprint_Poliwrath,
+ gMonFootprint_Abra,
+ gMonFootprint_Kadabra,
+ gMonFootprint_Alakazam,
+ gMonFootprint_Machop,
+ gMonFootprint_Machoke,
+ gMonFootprint_Machamp,
+ gMonFootprint_Bellsprout,
+ gMonFootprint_Weepinbell,
+ gMonFootprint_Victreebel,
+ gMonFootprint_Tentacool,
+ gMonFootprint_Tentacruel,
+ gMonFootprint_Geodude,
+ gMonFootprint_Graveler,
+ gMonFootprint_Golem,
+ gMonFootprint_Ponyta,
+ gMonFootprint_Rapidash,
+ gMonFootprint_Slowpoke,
+ gMonFootprint_Slowbro,
+ gMonFootprint_Magnemite,
+ gMonFootprint_Magneton,
+ gMonFootprint_Farfetchd,
+ gMonFootprint_Doduo,
+ gMonFootprint_Dodrio,
+ gMonFootprint_Seel,
+ gMonFootprint_Dewgong,
+ gMonFootprint_Grimer,
+ gMonFootprint_Muk,
+ gMonFootprint_Shellder,
+ gMonFootprint_Cloyster,
+ gMonFootprint_Gastly,
+ gMonFootprint_Haunter,
+ gMonFootprint_Gengar,
+ gMonFootprint_Onix,
+ gMonFootprint_Drowzee,
+ gMonFootprint_Hypno,
+ gMonFootprint_Krabby,
+ gMonFootprint_Kingler,
+ gMonFootprint_Voltorb,
+ gMonFootprint_Electrode,
+ gMonFootprint_Exeggcute,
+ gMonFootprint_Exeggutor,
+ gMonFootprint_Cubone,
+ gMonFootprint_Marowak,
+ gMonFootprint_Hitmonlee,
+ gMonFootprint_Hitmonchan,
+ gMonFootprint_Lickitung,
+ gMonFootprint_Koffing,
+ gMonFootprint_Weezing,
+ gMonFootprint_Rhyhorn,
+ gMonFootprint_Rhydon,
+ gMonFootprint_Chansey,
+ gMonFootprint_Tangela,
+ gMonFootprint_Kangaskhan,
+ gMonFootprint_Horsea,
+ gMonFootprint_Seadra,
+ gMonFootprint_Goldeen,
+ gMonFootprint_Seaking,
+ gMonFootprint_Staryu,
+ gMonFootprint_Starmie,
+ gMonFootprint_Mrmime,
+ gMonFootprint_Scyther,
+ gMonFootprint_Jynx,
+ gMonFootprint_Electabuzz,
+ gMonFootprint_Magmar,
+ gMonFootprint_Pinsir,
+ gMonFootprint_Tauros,
+ gMonFootprint_Magikarp,
+ gMonFootprint_Gyarados,
+ gMonFootprint_Lapras,
+ gMonFootprint_Ditto,
+ gMonFootprint_Eevee,
+ gMonFootprint_Vaporeon,
+ gMonFootprint_Jolteon,
+ gMonFootprint_Flareon,
+ gMonFootprint_Porygon,
+ gMonFootprint_Omanyte,
+ gMonFootprint_Omastar,
+ gMonFootprint_Kabuto,
+ gMonFootprint_Kabutops,
+ gMonFootprint_Aerodactyl,
+ gMonFootprint_Snorlax,
+ gMonFootprint_Articuno,
+ gMonFootprint_Zapdos,
+ gMonFootprint_Moltres,
+ gMonFootprint_Dratini,
+ gMonFootprint_Dragonair,
+ gMonFootprint_Dragonite,
+ gMonFootprint_Mewtwo,
+ gMonFootprint_Mew,
+ gMonFootprint_Chikorita,
+ gMonFootprint_Bayleef,
+ gMonFootprint_Meganium,
+ gMonFootprint_Cyndaquil,
+ gMonFootprint_Quilava,
+ gMonFootprint_Typhlosion,
+ gMonFootprint_Totodile,
+ gMonFootprint_Croconaw,
+ gMonFootprint_Feraligatr,
+ gMonFootprint_Sentret,
+ gMonFootprint_Furret,
+ gMonFootprint_Hoothoot,
+ gMonFootprint_Noctowl,
+ gMonFootprint_Ledyba,
+ gMonFootprint_Ledian,
+ gMonFootprint_Spinarak,
+ gMonFootprint_Ariados,
+ gMonFootprint_Crobat,
+ gMonFootprint_Chinchou,
+ gMonFootprint_Lanturn,
+ gMonFootprint_Pichu,
+ gMonFootprint_Cleffa,
+ gMonFootprint_Igglybuff,
+ gMonFootprint_Togepi,
+ gMonFootprint_Togetic,
+ gMonFootprint_Natu,
+ gMonFootprint_Xatu,
+ gMonFootprint_Mareep,
+ gMonFootprint_Flaaffy,
+ gMonFootprint_Ampharos,
+ gMonFootprint_Bellossom,
+ gMonFootprint_Marill,
+ gMonFootprint_Azumarill,
+ gMonFootprint_Sudowoodo,
+ gMonFootprint_Politoed,
+ gMonFootprint_Hoppip,
+ gMonFootprint_Skiploom,
+ gMonFootprint_Jumpluff,
+ gMonFootprint_Aipom,
+ gMonFootprint_Sunkern,
+ gMonFootprint_Sunflora,
+ gMonFootprint_Yanma,
+ gMonFootprint_Wooper,
+ gMonFootprint_Quagsire,
+ gMonFootprint_Espeon,
+ gMonFootprint_Umbreon,
+ gMonFootprint_Murkrow,
+ gMonFootprint_Slowking,
+ gMonFootprint_Misdreavus,
+ gMonFootprint_Unown,
+ gMonFootprint_Wobbuffet,
+ gMonFootprint_Girafarig,
+ gMonFootprint_Pineco,
+ gMonFootprint_Forretress,
+ gMonFootprint_Dunsparce,
+ gMonFootprint_Gligar,
+ gMonFootprint_Steelix,
+ gMonFootprint_Snubbull,
+ gMonFootprint_Granbull,
+ gMonFootprint_Qwilfish,
+ gMonFootprint_Scizor,
+ gMonFootprint_Shuckle,
+ gMonFootprint_Heracross,
+ gMonFootprint_Sneasel,
+ gMonFootprint_Teddiursa,
+ gMonFootprint_Ursaring,
+ gMonFootprint_Slugma,
+ gMonFootprint_Magcargo,
+ gMonFootprint_Swinub,
+ gMonFootprint_Piloswine,
+ gMonFootprint_Corsola,
+ gMonFootprint_Remoraid,
+ gMonFootprint_Octillery,
+ gMonFootprint_Delibird,
+ gMonFootprint_Mantine,
+ gMonFootprint_Skarmory,
+ gMonFootprint_Houndour,
+ gMonFootprint_Houndoom,
+ gMonFootprint_Kingdra,
+ gMonFootprint_Phanpy,
+ gMonFootprint_Donphan,
+ gMonFootprint_Porygon2,
+ gMonFootprint_Stantler,
+ gMonFootprint_Smeargle,
+ gMonFootprint_Tyrogue,
+ gMonFootprint_Hitmontop,
+ gMonFootprint_Smoochum,
+ gMonFootprint_Elekid,
+ gMonFootprint_Magby,
+ gMonFootprint_Miltank,
+ gMonFootprint_Blissey,
+ gMonFootprint_Raikou,
+ gMonFootprint_Entei,
+ gMonFootprint_Suicune,
+ gMonFootprint_Larvitar,
+ gMonFootprint_Pupitar,
+ gMonFootprint_Tyranitar,
+ gMonFootprint_Lugia,
+ gMonFootprint_HoOh,
+ gMonFootprint_Celebi,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_QuestionMark,
+ gMonFootprint_Treecko,
+ gMonFootprint_Grovyle,
+ gMonFootprint_Sceptile,
+ gMonFootprint_Torchic,
+ gMonFootprint_Combusken,
+ gMonFootprint_Blaziken,
+ gMonFootprint_Mudkip,
+ gMonFootprint_Marshtomp,
+ gMonFootprint_Swampert,
+ gMonFootprint_Poochyena,
+ gMonFootprint_Mightyena,
+ gMonFootprint_Zigzagoon,
+ gMonFootprint_Linoone,
+ gMonFootprint_Wurmple,
+ gMonFootprint_Silcoon,
+ gMonFootprint_Beautifly,
+ gMonFootprint_Cascoon,
+ gMonFootprint_Dustox,
+ gMonFootprint_Lotad,
+ gMonFootprint_Lombre,
+ gMonFootprint_Ludicolo,
+ gMonFootprint_Seedot,
+ gMonFootprint_Nuzleaf,
+ gMonFootprint_Shiftry,
+ gMonFootprint_Nincada,
+ gMonFootprint_Ninjask,
+ gMonFootprint_Shedinja,
+ gMonFootprint_Taillow,
+ gMonFootprint_Swellow,
+ gMonFootprint_Shroomish,
+ gMonFootprint_Breloom,
+ gMonFootprint_Spinda,
+ gMonFootprint_Wingull,
+ gMonFootprint_Pelipper,
+ gMonFootprint_Surskit,
+ gMonFootprint_Masquerain,
+ gMonFootprint_Wailmer,
+ gMonFootprint_Wailord,
+ gMonFootprint_Skitty,
+ gMonFootprint_Delcatty,
+ gMonFootprint_Kecleon,
+ gMonFootprint_Baltoy,
+ gMonFootprint_Claydol,
+ gMonFootprint_Nosepass,
+ gMonFootprint_Torkoal,
+ gMonFootprint_Sableye,
+ gMonFootprint_Barboach,
+ gMonFootprint_Whiscash,
+ gMonFootprint_Luvdisc,
+ gMonFootprint_Corphish,
+ gMonFootprint_Crawdaunt,
+ gMonFootprint_Feebas,
+ gMonFootprint_Milotic,
+ gMonFootprint_Carvanha,
+ gMonFootprint_Sharpedo,
+ gMonFootprint_Trapinch,
+ gMonFootprint_Vibrava,
+ gMonFootprint_Flygon,
+ gMonFootprint_Makuhita,
+ gMonFootprint_Hariyama,
+ gMonFootprint_Electrike,
+ gMonFootprint_Manectric,
+ gMonFootprint_Numel,
+ gMonFootprint_Camerupt,
+ gMonFootprint_Spheal,
+ gMonFootprint_Sealeo,
+ gMonFootprint_Walrein,
+ gMonFootprint_Cacnea,
+ gMonFootprint_Cacturne,
+ gMonFootprint_Snorunt,
+ gMonFootprint_Glalie,
+ gMonFootprint_Lunatone,
+ gMonFootprint_Solrock,
+ gMonFootprint_Azurill,
+ gMonFootprint_Spoink,
+ gMonFootprint_Grumpig,
+ gMonFootprint_Plusle,
+ gMonFootprint_Minun,
+ gMonFootprint_Mawile,
+ gMonFootprint_Meditite,
+ gMonFootprint_Medicham,
+ gMonFootprint_Swablu,
+ gMonFootprint_Altaria,
+ gMonFootprint_Wynaut,
+ gMonFootprint_Duskull,
+ gMonFootprint_Dusclops,
+ gMonFootprint_Roselia,
+ gMonFootprint_Slakoth,
+ gMonFootprint_Vigoroth,
+ gMonFootprint_Slaking,
+ gMonFootprint_Gulpin,
+ gMonFootprint_Swalot,
+ gMonFootprint_Tropius,
+ gMonFootprint_Whismur,
+ gMonFootprint_Loudred,
+ gMonFootprint_Exploud,
+ gMonFootprint_Clamperl,
+ gMonFootprint_Huntail,
+ gMonFootprint_Gorebyss,
+ gMonFootprint_Absol,
+ gMonFootprint_Shuppet,
+ gMonFootprint_Banette,
+ gMonFootprint_Seviper,
+ gMonFootprint_Zangoose,
+ gMonFootprint_Relicanth,
+ gMonFootprint_Aron,
+ gMonFootprint_Lairon,
+ gMonFootprint_Aggron,
+ gMonFootprint_Castform,
+ gMonFootprint_Volbeat,
+ gMonFootprint_Illumise,
+ gMonFootprint_Lileep,
+ gMonFootprint_Cradily,
+ gMonFootprint_Anorith,
+ gMonFootprint_Armaldo,
+ gMonFootprint_Ralts,
+ gMonFootprint_Kirlia,
+ gMonFootprint_Gardevoir,
+ gMonFootprint_Bagon,
+ gMonFootprint_Shelgon,
+ gMonFootprint_Salamence,
+ gMonFootprint_Beldum,
+ gMonFootprint_Metang,
+ gMonFootprint_Metagross,
+ gMonFootprint_Regirock,
+ gMonFootprint_Regice,
+ gMonFootprint_Registeel,
+ gMonFootprint_Kyogre,
+ gMonFootprint_Groudon,
+ gMonFootprint_Rayquaza,
+ gMonFootprint_Latias,
+ gMonFootprint_Latios,
+ gMonFootprint_Jirachi,
+ gMonFootprint_Deoxys,
+ gMonFootprint_Chimecho,
+ gMonFootprint_Bulbasaur,
+};
diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h
index fde423570..923df2cde 100644
--- a/src/data/pokemon_graphics/front_pic_coordinates.h
+++ b/src/data/pokemon_graphics/front_pic_coordinates.h
@@ -47,211 +47,212 @@ const struct MonCoords gMonFrontPicCoords[] =
{0x66, 0x0a}, // SPECIES_GLOOM
{0x77, 0x06}, // SPECIES_VILEPLUME
{0x55, 0x0f}, // SPECIES_PARAS
- {0x86, 0x08}, // SPECIES_VENONAT
- {0x66, 0x08}, // SPECIES_VENOMOTH
- {0x88, 0x02}, // SPECIES_DIGLETT
- {0x54, 0x12}, // SPECIES_DUGTRIO
- {0x75, 0x0d}, // SPECIES_MEOWTH
- {0x55, 0x0c}, // SPECIES_PERSIAN
- {0x77, 0x07}, // SPECIES_PSYDUCK
- {0x56, 0x09}, // SPECIES_GOLDUCK
- {0x78, 0x02}, // SPECIES_MANKEY
- {0x65, 0x0e}, // SPECIES_PRIMEAPE
- {0x77, 0x07}, // SPECIES_GROWLITHE
- {0x66, 0x0b}, // SPECIES_ARCANINE
- {0x88, 0x02}, // SPECIES_POLIWAG
- {0x74, 0x13}, // SPECIES_POLIWHIRL
- {0x76, 0x0a}, // SPECIES_POLIWRATH
- {0x76, 0x08}, // SPECIES_ABRA
- {0x66, 0x0b}, // SPECIES_KADABRA
- {0x77, 0x05}, // SPECIES_ALAKAZAM
- {0x87, 0x04}, // SPECIES_MACHOP
- {0x56, 0x0b}, // SPECIES_MACHOKE
- {0x67, 0x06}, // SPECIES_MACHAMP
- {0x88, 0x01}, // SPECIES_BELLSPROUT
- {0x65, 0x0f}, // SPECIES_WEEPINBELL
- {0x66, 0x0b}, // SPECIES_VICTREEBEL
- {0x77, 0x05}, // SPECIES_TENTACOOL
- {0x46, 0x09}, // SPECIES_TENTACRUEL
- {0x87, 0x04}, // SPECIES_GEODUDE
- {0x54, 0x12}, // SPECIES_GRAVELER
- {0x87, 0x04}, // SPECIES_GOLEM
- {0x77, 0x05}, // SPECIES_PONYTA
- {0x66, 0x08}, // SPECIES_RAPIDASH
- {0x88, 0x01}, // SPECIES_SLOWPOKE
- {0x66, 0x0b}, // SPECIES_SLOWBRO
- {0x86, 0x08}, // SPECIES_MAGNEMITE
- {0x43, 0x15}, // SPECIES_MAGNETON
- {0x76, 0x08}, // SPECIES_FARFETCHD
- {0x66, 0x09}, // SPECIES_DODUO
- {0x57, 0x05}, // SPECIES_DODRIO
- {0x88, 0x00}, // SPECIES_SEEL
- {0x76, 0x0a}, // SPECIES_DEWGONG
- {0x87, 0x07}, // SPECIES_GRIMER
- {0x65, 0x0c}, // SPECIES_MUK
- {0x87, 0x04}, // SPECIES_SHELLDER
- {0x55, 0x10}, // SPECIES_CLOYSTER
- {0x87, 0x05}, // SPECIES_GASTLY
- {0x77, 0x06}, // SPECIES_HAUNTER
+ {0x86, 0x08}, // SPECIES_PARASECT
+ {0x66, 0x08}, // SPECIES_VENONAT
+ {0x88, 0x02}, // SPECIES_VENOMOTH
+ {0x54, 0x12}, // SPECIES_DIGLETT
+ {0x75, 0x0d}, // SPECIES_DUGTRIO
+ {0x55, 0x0c}, // SPECIES_MEOWTH
+ {0x77, 0x07}, // SPECIES_PERSIAN
+ {0x56, 0x09}, // SPECIES_PSYDUCK
+ {0x78, 0x02}, // SPECIES_GOLDUCK
+ {0x65, 0x0e}, // SPECIES_MANKEY
+ {0x77, 0x07}, // SPECIES_PRIMEAPE
+ {0x66, 0x0b}, // SPECIES_GROWLITHE
+ {0x88, 0x02}, // SPECIES_ARCANINE
+ {0x74, 0x13}, // SPECIES_POLIWAG
+ {0x76, 0x0a}, // SPECIES_POLIWHIRL
+ {0x76, 0x08}, // SPECIES_POLIWRATH
+ {0x66, 0x0b}, // SPECIES_ABRA
+ {0x77, 0x05}, // SPECIES_KADABRA
+ {0x87, 0x04}, // SPECIES_ALAKAZAM
+ {0x56, 0x0b}, // SPECIES_MACHOP
+ {0x67, 0x06}, // SPECIES_MACHOKE
+ {0x88, 0x01}, // SPECIES_MACHAMP
+ {0x65, 0x0f}, // SPECIES_BELLSPROUT
+ {0x66, 0x0b}, // SPECIES_WEEPINBELL
+ {0x77, 0x05}, // SPECIES_VICTREEBEL
+ {0x46, 0x09}, // SPECIES_TENTACOOL
+ {0x87, 0x04}, // SPECIES_TENTACRUEL
+ {0x54, 0x12}, // SPECIES_GEODUDE
+ {0x87, 0x04}, // SPECIES_GRAVELER
+ {0x77, 0x05}, // SPECIES_GOLEM
+ {0x66, 0x08}, // SPECIES_PONYTA
+ {0x88, 0x01}, // SPECIES_RAPIDASH
+ {0x66, 0x0b}, // SPECIES_SLOWPOKE
+ {0x86, 0x08}, // SPECIES_SLOWBRO
+ {0x43, 0x15}, // SPECIES_MAGNEMITE
+ {0x76, 0x08}, // SPECIES_MAGNETON
+ {0x66, 0x09}, // SPECIES_FARFETCHD
+ {0x57, 0x05}, // SPECIES_DODUO
+ {0x88, 0x00}, // SPECIES_DODRIO
+ {0x76, 0x0a}, // SPECIES_SEEL
+ {0x87, 0x07}, // SPECIES_DEWGONG
+ {0x65, 0x0c}, // SPECIES_GRIMER
+ {0x87, 0x04}, // SPECIES_MUK
+ {0x55, 0x10}, // SPECIES_SHELLDER
+ {0x87, 0x05}, // SPECIES_CLOYSTER
+ {0x77, 0x06}, // SPECIES_GASTLY
+ {0x77, 0x05}, // SPECIES_HAUNTER
{0x77, 0x05}, // SPECIES_GENGAR
- {0x77, 0x05}, // SPECIES_ONIX
- {0x78, 0x02}, // SPECIES_DROWZEE
- {0x77, 0x07}, // SPECIES_HYPNO
- {0x77, 0x04}, // SPECIES_KRABBY
- {0x65, 0x0d}, // SPECIES_KINGLER
- {0x88, 0x03}, // SPECIES_VOLTORB
- {0x44, 0x13}, // SPECIES_ELECTRODE
- {0x55, 0x0e}, // SPECIES_EXEGGCUTE
- {0x87, 0x07}, // SPECIES_EXEGGUTOR
- {0x88, 0x00}, // SPECIES_CUBONE
- {0x55, 0x0f}, // SPECIES_MAROWAK
- {0x76, 0x0b}, // SPECIES_HITMONLEE
- {0x87, 0x04}, // SPECIES_HITMONCHAN
- {0x67, 0x04}, // SPECIES_LICKITUNG
- {0x86, 0x08}, // SPECIES_KOFFING
- {0x66, 0x08}, // SPECIES_WEEZING
- {0x88, 0x02}, // SPECIES_RHYHORN
- {0x76, 0x09}, // SPECIES_RHYDON
- {0x88, 0x02}, // SPECIES_CHANSEY
- {0x76, 0x09}, // SPECIES_TANGELA
- {0x67, 0x07}, // SPECIES_KANGASKHAN
- {0x88, 0x00}, // SPECIES_HORSEA
- {0x45, 0x0f}, // SPECIES_SEADRA
- {0x67, 0x07}, // SPECIES_GOLDEEN
- {0x66, 0x0a}, // SPECIES_SEAKING
- {0x77, 0x04}, // SPECIES_STARYU
- {0x66, 0x0a}, // SPECIES_STARMIE
- {0x77, 0x06}, // SPECIES_MR_MIME
- {0x66, 0x08}, // SPECIES_SCYTHER
- {0x88, 0x00}, // SPECIES_JYNX
- {0x77, 0x04}, // SPECIES_ELECTABUZZ
- {0x78, 0x02}, // SPECIES_MAGMAR
+ {0x78, 0x02}, // SPECIES_ONIX
+ {0x77, 0x07}, // SPECIES_DROWZEE
+ {0x77, 0x04}, // SPECIES_HYPNO
+ {0x65, 0x0d}, // SPECIES_KRABBY
+ {0x88, 0x03}, // SPECIES_KINGLER
+ {0x44, 0x13}, // SPECIES_VOLTORB
+ {0x55, 0x0e}, // SPECIES_ELECTRODE
+ {0x87, 0x07}, // SPECIES_EXEGGCUTE
+ {0x88, 0x00}, // SPECIES_EXEGGUTOR
+ {0x55, 0x0f}, // SPECIES_CUBONE
+ {0x76, 0x0b}, // SPECIES_MAROWAK
+ {0x87, 0x04}, // SPECIES_HITMONLEE
+ {0x67, 0x04}, // SPECIES_HITMONCHAN
+ {0x86, 0x08}, // SPECIES_LICKITUNG
+ {0x66, 0x08}, // SPECIES_KOFFING
+ {0x88, 0x02}, // SPECIES_WEEZING
+ {0x76, 0x09}, // SPECIES_RHYHORN
+ {0x88, 0x02}, // SPECIES_RHYDON
+ {0x76, 0x09}, // SPECIES_CHANSEY
+ {0x67, 0x07}, // SPECIES_TANGELA
+ {0x88, 0x00}, // SPECIES_KANGASKHAN
+ {0x45, 0x0f}, // SPECIES_HORSEA
+ {0x67, 0x07}, // SPECIES_SEADRA
+ {0x66, 0x0a}, // SPECIES_GOLDEEN
+ {0x77, 0x04}, // SPECIES_SEAKING
+ {0x66, 0x0a}, // SPECIES_STARYU
+ {0x77, 0x06}, // SPECIES_STARMIE
+ {0x66, 0x08}, // SPECIES_MR_MIME
+ {0x88, 0x00}, // SPECIES_SCYTHER
+ {0x77, 0x04}, // SPECIES_JYNX
+ {0x78, 0x02}, // SPECIES_ELECTABUZZ
+ {0x77, 0x04}, // SPECIES_MAGMAR
{0x77, 0x04}, // SPECIES_PINSIR
- {0x77, 0x04}, // SPECIES_TAUROS
- {0x78, 0x00}, // SPECIES_MAGIKARP
- {0x67, 0x06}, // SPECIES_GYARADOS
- {0x88, 0x08}, // SPECIES_LAPRAS
- {0x85, 0x0d}, // SPECIES_DITTO
- {0x54, 0x11}, // SPECIES_EEVEE
- {0x56, 0x09}, // SPECIES_VAPOREON
- {0x67, 0x06}, // SPECIES_JOLTEON
- {0x76, 0x09}, // SPECIES_FLAREON
- {0x66, 0x0a}, // SPECIES_PORYGON
- {0x55, 0x0d}, // SPECIES_OMANYTE
- {0x45, 0x0f}, // SPECIES_OMASTAR
- {0x67, 0x07}, // SPECIES_KABUTO
- {0x54, 0x11}, // SPECIES_KABUTOPS
- {0x88, 0x03}, // SPECIES_AERODACTYL
- {0x88, 0x01}, // SPECIES_SNORLAX
- {0x87, 0x05}, // SPECIES_ARTICUNO
- {0x88, 0x03}, // SPECIES_ZAPDOS
- {0x87, 0x04}, // SPECIES_MOLTRES
- {0x88, 0x00}, // SPECIES_DRATINI
- {0x75, 0x0e}, // SPECIES_DRAGONAIR
- {0x87, 0x06}, // SPECIES_DRAGONITE
+ {0x78, 0x00}, // SPECIES_TAUROS
+ {0x67, 0x06}, // SPECIES_MAGIKARP
+ {0x88, 0x08}, // SPECIES_GYARADOS
+ {0x85, 0x0d}, // SPECIES_LAPRAS
+ {0x54, 0x11}, // SPECIES_DITTO
+ {0x56, 0x09}, // SPECIES_EEVEE
+ {0x67, 0x06}, // SPECIES_VAPOREON
+ {0x76, 0x09}, // SPECIES_JOLTEON
+ {0x66, 0x0a}, // SPECIES_FLAREON
+ {0x55, 0x0d}, // SPECIES_PORYGON
+ {0x45, 0x0f}, // SPECIES_OMANYTE
+ {0x67, 0x07}, // SPECIES_OMASTAR
+ {0x54, 0x11}, // SPECIES_KABUTO
+ {0x88, 0x03}, // SPECIES_KABUTOPS
+ {0x88, 0x01}, // SPECIES_AERODACTYL
+ {0x87, 0x05}, // SPECIES_SNORLAX
+ {0x88, 0x03}, // SPECIES_ARTICUNO
+ {0x87, 0x04}, // SPECIES_ZAPDOS
+ {0x88, 0x00}, // SPECIES_MOLTRES
+ {0x75, 0x0e}, // SPECIES_DRATINI
+ {0x87, 0x06}, // SPECIES_DRAGONAIR
+ {0x88, 0x00}, // SPECIES_DRAGONITE
{0x88, 0x00}, // SPECIES_MEWTWO
- {0x88, 0x00}, // SPECIES_MEW
- {0x55, 0x0d}, // SPECIES_CHIKORITA
- {0x75, 0x0d}, // SPECIES_BAYLEEF
- {0x77, 0x04}, // SPECIES_MEGANIUM
- {0x88, 0x00}, // SPECIES_CYNDAQUIL
- {0x55, 0x0e}, // SPECIES_QUILAVA
- {0x76, 0x08}, // SPECIES_TYPHLOSION
- {0x78, 0x00}, // SPECIES_TOTODILE
- {0x55, 0x0f}, // SPECIES_CROCONAW
- {0x67, 0x06}, // SPECIES_FERALIGATR
- {0x88, 0x00}, // SPECIES_SENTRET
- {0x47, 0x04}, // SPECIES_FURRET
- {0x67, 0x07}, // SPECIES_HOOTHOOT
- {0x55, 0x0d}, // SPECIES_NOCTOWL
- {0x58, 0x03}, // SPECIES_LEDYBA
- {0x56, 0x0c}, // SPECIES_LEDIAN
- {0x67, 0x04}, // SPECIES_SPINARAK
- {0x54, 0x13}, // SPECIES_ARIADOS
- {0x87, 0x05}, // SPECIES_CROBAT
- {0x88, 0x00}, // SPECIES_CHINCHOU
- {0x75, 0x10}, // SPECIES_LANTURN
- {0x87, 0x0b}, // SPECIES_PICHU
- {0x45, 0x0c}, // SPECIES_CLEFFA
- {0x44, 0x14}, // SPECIES_IGGLYBUFF
- {0x44, 0x12}, // SPECIES_TOGEPI
- {0x34, 0x14}, // SPECIES_TOGETIC
- {0x46, 0x09}, // SPECIES_NATU
- {0x44, 0x14}, // SPECIES_XATU
- {0x47, 0x07}, // SPECIES_MAREEP
- {0x55, 0x10}, // SPECIES_FLAAFFY
- {0x56, 0x0a}, // SPECIES_AMPHAROS
- {0x77, 0x05}, // SPECIES_BELLOSSOM
- {0x45, 0x0e}, // SPECIES_MARILL
- {0x65, 0x0e}, // SPECIES_AZUMARILL
- {0x76, 0x09}, // SPECIES_SUDOWOODO
+ {0x55, 0x0d}, // SPECIES_MEW
+ {0x75, 0x0d}, // SPECIES_CHIKORITA
+ {0x77, 0x04}, // SPECIES_BAYLEEF
+ {0x88, 0x00}, // SPECIES_MEGANIUM
+ {0x55, 0x0e}, // SPECIES_CYNDAQUIL
+ {0x76, 0x08}, // SPECIES_QUILAVA
+ {0x78, 0x00}, // SPECIES_TYPHLOSION
+ {0x55, 0x0f}, // SPECIES_TOTODILE
+ {0x67, 0x06}, // SPECIES_CROCONAW
+ {0x88, 0x00}, // SPECIES_FERALIGATR
+ {0x47, 0x04}, // SPECIES_SENTRET
+ {0x67, 0x07}, // SPECIES_FURRET
+ {0x55, 0x0d}, // SPECIES_HOOTHOOT
+ {0x58, 0x03}, // SPECIES_NOCTOWL
+ {0x56, 0x0c}, // SPECIES_LEDYBA
+ {0x67, 0x04}, // SPECIES_LEDIAN
+ {0x54, 0x13}, // SPECIES_SPINARAK
+ {0x87, 0x05}, // SPECIES_ARIADOS
+ {0x88, 0x00}, // SPECIES_CROBAT
+ {0x75, 0x10}, // SPECIES_CHINCHOU
+ {0x87, 0x0b}, // SPECIES_LANTURN
+ {0x45, 0x0c}, // SPECIES_PICHU
+ {0x44, 0x14}, // SPECIES_CLEFFA
+ {0x44, 0x12}, // SPECIES_IGGLYBUFF
+ {0x34, 0x14}, // SPECIES_TOGEPI
+ {0x46, 0x09}, // SPECIES_TOGETIC
+ {0x44, 0x14}, // SPECIES_NATU
+ {0x47, 0x07}, // SPECIES_XATU
+ {0x55, 0x10}, // SPECIES_MAREEP
+ {0x56, 0x0a}, // SPECIES_FLAAFFY
+ {0x77, 0x05}, // SPECIES_AMPHAROS
+ {0x45, 0x0e}, // SPECIES_BELLOSSOM
+ {0x65, 0x0e}, // SPECIES_MARILL
+ {0x76, 0x09}, // SPECIES_AZUMARILL
+ {0x67, 0x06}, // SPECIES_SUDOWOODO
{0x67, 0x06}, // SPECIES_POLITOED
- {0x67, 0x06}, // SPECIES_HOPPIP
- {0x66, 0x0a}, // SPECIES_SKIPLOOM
- {0x55, 0x0f}, // SPECIES_JUMPLUFF
- {0x77, 0x07}, // SPECIES_AIPOM
- {0x58, 0x03}, // SPECIES_SUNKERN
- {0x44, 0x10}, // SPECIES_SUNFLORA
- {0x56, 0x08}, // SPECIES_YANMA
- {0x86, 0x0a}, // SPECIES_WOOPER
- {0x54, 0x10}, // SPECIES_QUAGSIRE
- {0x77, 0x07}, // SPECIES_ESPEON
- {0x66, 0x08}, // SPECIES_UMBREON
- {0x67, 0x08}, // SPECIES_MURKROW
- {0x66, 0x0b}, // SPECIES_SLOWKING
- {0x58, 0x01}, // SPECIES_MISDREAVUS
- {0x55, 0x0c}, // SPECIES_UNOWN
- {0x35, 0x0f}, // SPECIES_WOBBUFFET
- {0x77, 0x06}, // SPECIES_GIRAFARIG
- {0x88, 0x03}, // SPECIES_PINECO
- {0x56, 0x0a}, // SPECIES_FORRETRESS
- {0x76, 0x09}, // SPECIES_DUNSPARCE
- {0x74, 0x11}, // SPECIES_GLIGAR
- {0x78, 0x03}, // SPECIES_STEELIX
- {0x88, 0x00}, // SPECIES_SNUBBULL
- {0x55, 0x0d}, // SPECIES_GRANBULL
- {0x57, 0x06}, // SPECIES_QWILFISH
- {0x56, 0x0a}, // SPECIES_SCIZOR
- {0x88, 0x00}, // SPECIES_SHUCKLE
- {0x66, 0x09}, // SPECIES_HERACROSS
- {0x88, 0x03}, // SPECIES_SNEASEL
- {0x67, 0x05}, // SPECIES_TEDDIURSA
- {0x45, 0x0d}, // SPECIES_URSARING
- {0x78, 0x01}, // SPECIES_SLUGMA
- {0x45, 0x0d}, // SPECIES_MAGCARGO
- {0x57, 0x0d}, // SPECIES_SWINUB
- {0x43, 0x14}, // SPECIES_PILOSWINE
- {0x66, 0x08}, // SPECIES_CORSOLA
- {0x65, 0x0c}, // SPECIES_REMORAID
- {0x55, 0x0e}, // SPECIES_OCTILLERY
- {0x66, 0x0a}, // SPECIES_DELIBIRD
- {0x56, 0x08}, // SPECIES_MANTINE
- {0x88, 0x01}, // SPECIES_SKARMORY
- {0x88, 0x00}, // SPECIES_HOUNDOUR
- {0x56, 0x0b}, // SPECIES_HOUNDOOM
- {0x77, 0x05}, // SPECIES_KINGDRA
- {0x78, 0x04}, // SPECIES_PHANPY
- {0x54, 0x10}, // SPECIES_DONPHAN
- {0x86, 0x08}, // SPECIES_PORYGON2
- {0x55, 0x0f}, // SPECIES_STANTLER
- {0x88, 0x00}, // SPECIES_SMEARGLE
- {0x77, 0x06}, // SPECIES_TYROGUE
- {0x46, 0x09}, // SPECIES_HITMONTOP
- {0x67, 0x05}, // SPECIES_SMOOCHUM
- {0x35, 0x0f}, // SPECIES_ELEKID
- {0x76, 0x0a}, // SPECIES_MAGBY
- {0x45, 0x0d}, // SPECIES_MILTANK
- {0x77, 0x04}, // SPECIES_BLISSEY
- {0x77, 0x06}, // SPECIES_RAIKOU
+ {0x66, 0x0a}, // SPECIES_HOPPIP
+ {0x55, 0x0f}, // SPECIES_SKIPLOOM
+ {0x77, 0x07}, // SPECIES_JUMPLUFF
+ {0x58, 0x03}, // SPECIES_AIPOM
+ {0x44, 0x10}, // SPECIES_SUNKERN
+ {0x56, 0x08}, // SPECIES_SUNFLORA
+ {0x86, 0x0a}, // SPECIES_YANMA
+ {0x54, 0x10}, // SPECIES_WOOPER
+ {0x77, 0x07}, // SPECIES_QUAGSIRE
+ {0x66, 0x08}, // SPECIES_ESPEON
+ {0x67, 0x08}, // SPECIES_UMBREON
+ {0x66, 0x0b}, // SPECIES_MURKROW
+ {0x58, 0x01}, // SPECIES_SLOWKING
+ {0x55, 0x0c}, // SPECIES_MISDREAVUS
+ {0x35, 0x0f}, // SPECIES_UNOWN
+ {0x77, 0x06}, // SPECIES_WOBBUFFET
+ {0x88, 0x03}, // SPECIES_GIRAFARIG
+ {0x56, 0x0a}, // SPECIES_PINECO
+ {0x76, 0x09}, // SPECIES_FORRETRESS
+ {0x74, 0x11}, // SPECIES_DUNSPARCE
+ {0x78, 0x03}, // SPECIES_GLIGAR
+ {0x88, 0x00}, // SPECIES_STEELIX
+ {0x55, 0x0d}, // SPECIES_SNUBBULL
+ {0x57, 0x06}, // SPECIES_GRANBULL
+ {0x56, 0x0a}, // SPECIES_QWILFISH
+ {0x88, 0x00}, // SPECIES_SCIZOR
+ {0x66, 0x09}, // SPECIES_SHUCKLE
+ {0x88, 0x03}, // SPECIES_HERACROSS
+ {0x67, 0x05}, // SPECIES_SNEASEL
+ {0x45, 0x0d}, // SPECIES_TEDDIURSA
+ {0x78, 0x01}, // SPECIES_URSARING
+ {0x45, 0x0d}, // SPECIES_SLUGMA
+ {0x57, 0x0d}, // SPECIES_MAGCARGO
+ {0x43, 0x14}, // SPECIES_SWINUB
+ {0x66, 0x08}, // SPECIES_PILOSWINE
+ {0x65, 0x0c}, // SPECIES_CORSOLA
+ {0x55, 0x0e}, // SPECIES_REMORAID
+ {0x66, 0x0a}, // SPECIES_OCTILLERY
+ {0x56, 0x08}, // SPECIES_DELIBIRD
+ {0x88, 0x01}, // SPECIES_MANTINE
+ {0x88, 0x00}, // SPECIES_SKARMORY
+ {0x56, 0x0b}, // SPECIES_HOUNDOUR
+ {0x77, 0x05}, // SPECIES_HOUNDOOM
+ {0x78, 0x04}, // SPECIES_KINGDRA
+ {0x54, 0x10}, // SPECIES_PHANPY
+ {0x86, 0x08}, // SPECIES_DONPHAN
+ {0x55, 0x0f}, // SPECIES_PORYGON2
+ {0x88, 0x00}, // SPECIES_STANTLER
+ {0x77, 0x06}, // SPECIES_SMEARGLE
+ {0x46, 0x09}, // SPECIES_TYROGUE
+ {0x67, 0x05}, // SPECIES_HITMONTOP
+ {0x35, 0x0f}, // SPECIES_SMOOCHUM
+ {0x76, 0x0a}, // SPECIES_ELEKID
+ {0x45, 0x0d}, // SPECIES_MAGBY
+ {0x77, 0x04}, // SPECIES_MILTANK
+ {0x77, 0x06}, // SPECIES_BLISSEY
+ {0x88, 0x00}, // SPECIES_RAIKOU
{0x88, 0x00}, // SPECIES_ENTEI
{0x88, 0x00}, // SPECIES_SUICUNE
- {0x88, 0x00}, // SPECIES_LARVITAR
- {0x46, 0x09}, // SPECIES_PUPITAR
- {0x56, 0x09}, // SPECIES_TYRANITAR
+ {0x46, 0x09}, // SPECIES_LARVITAR
+ {0x56, 0x09}, // SPECIES_PUPITAR
+ {0x88, 0x00}, // SPECIES_TYRANITAR
{0x88, 0x00}, // SPECIES_LUGIA
{0x88, 0x00}, // SPECIES_HO_OH
- {0x88, 0x00}, // SPECIES_CELEBI
- {0x55, 0x0e}, // SPECIES_OLD_UNOWN_B
+ {0x55, 0x0e}, // SPECIES_CELEBI
+ {0x87, 0x04}, // SPECIES_OLD_UNOWN_B
{0x87, 0x04}, // SPECIES_OLD_UNOWN_C
{0x87, 0x04}, // SPECIES_OLD_UNOWN_D
{0x87, 0x04}, // SPECIES_OLD_UNOWN_E
@@ -276,168 +277,167 @@ const struct MonCoords gMonFrontPicCoords[] =
{0x87, 0x04}, // SPECIES_OLD_UNOWN_X
{0x87, 0x04}, // SPECIES_OLD_UNOWN_Y
{0x87, 0x04}, // SPECIES_OLD_UNOWN_Z
- {0x87, 0x04}, // SPECIES_TREECKO
- {0x66, 0x08}, // SPECIES_GROVYLE
- {0x87, 0x04}, // SPECIES_SCEPTILE
- {0x88, 0x00}, // SPECIES_TORCHIC
- {0x56, 0x08}, // SPECIES_COMBUSKEN
- {0x88, 0x01}, // SPECIES_BLAZIKEN
- {0x88, 0x00}, // SPECIES_MUDKIP
- {0x56, 0x0c}, // SPECIES_MARSHTOMP
- {0x67, 0x06}, // SPECIES_SWAMPERT
- {0x88, 0x00}, // SPECIES_POOCHYENA
- {0x55, 0x0c}, // SPECIES_MIGHTYENA
- {0x87, 0x04}, // SPECIES_ZIGZAGOON
- {0x85, 0x0f}, // SPECIES_LINOONE
- {0x78, 0x03}, // SPECIES_WURMPLE
- {0x45, 0x0e}, // SPECIES_SILCOON
- {0x75, 0x11}, // SPECIES_BEAUTIFLY
- {0x86, 0x09}, // SPECIES_CASCOON
- {0x74, 0x10}, // SPECIES_DUSTOX
- {0x86, 0x0f}, // SPECIES_LOTAD
- {0x65, 0x0e}, // SPECIES_LOMBRE
- {0x66, 0x09}, // SPECIES_LUDICOLO
- {0x88, 0x00}, // SPECIES_SEEDOT
- {0x46, 0x10}, // SPECIES_NUZLEAF
- {0x56, 0x08}, // SPECIES_SHIFTRY
- {0x88, 0x02}, // SPECIES_NINCADA
- {0x74, 0x12}, // SPECIES_NINJASK
- {0x86, 0x0a}, // SPECIES_SHEDINJA
- {0x66, 0x0a}, // SPECIES_TAILLOW
- {0x64, 0x10}, // SPECIES_SWELLOW
- {0x87, 0x06}, // SPECIES_SHROOMISH
- {0x54, 0x10}, // SPECIES_BRELOOM
- {0x77, 0x04}, // SPECIES_SPINDA
- {0x68, 0x08}, // SPECIES_WINGULL
- {0x84, 0x18}, // SPECIES_PELIPPER
- {0x77, 0x04}, // SPECIES_SURSKIT
- {0x65, 0x0f}, // SPECIES_MASQUERAIN
- {0x88, 0x01}, // SPECIES_WAILMER
- {0x75, 0x0f}, // SPECIES_WAILORD
- {0x87, 0x0a}, // SPECIES_SKITTY
- {0x66, 0x0b}, // SPECIES_DELCATTY
- {0x66, 0x08}, // SPECIES_KECLEON
- {0x67, 0x07}, // SPECIES_BALTOY
- {0x55, 0x10}, // SPECIES_CLAYDOL
- {0x78, 0x06}, // SPECIES_NOSEPASS
- {0x56, 0x0c}, // SPECIES_TORKOAL
- {0x88, 0x02}, // SPECIES_SABLEYE
- {0x66, 0x09}, // SPECIES_BARBOACH
- {0x46, 0x0b}, // SPECIES_WHISCASH
- {0x76, 0x09}, // SPECIES_LUVDISC
- {0x46, 0x18}, // SPECIES_CORPHISH
- {0x66, 0x0c}, // SPECIES_CRAWDAUNT
- {0x88, 0x01}, // SPECIES_FEEBAS
- {0x46, 0x0d}, // SPECIES_MILOTIC
- {0x88, 0x00}, // SPECIES_CARVANHA
- {0x67, 0x06}, // SPECIES_SHARPEDO
- {0x78, 0x03}, // SPECIES_TRAPINCH
- {0x54, 0x10}, // SPECIES_VIBRAVA
- {0x86, 0x0c}, // SPECIES_FLYGON
- {0x88, 0x01}, // SPECIES_MAKUHITA
- {0x65, 0x0c}, // SPECIES_HARIYAMA
- {0x88, 0x01}, // SPECIES_ELECTRIKE
- {0x64, 0x12}, // SPECIES_MANECTRIC
- {0x67, 0x04}, // SPECIES_NUMEL
- {0x65, 0x0f}, // SPECIES_CAMERUPT
- {0x87, 0x09}, // SPECIES_SPHEAL
- {0x65, 0x10}, // SPECIES_SEALEO
- {0x86, 0x0a}, // SPECIES_WALREIN
- {0x88, 0x01}, // SPECIES_CACNEA
- {0x74, 0x10}, // SPECIES_CACTURNE
- {0x88, 0x00}, // SPECIES_SNORUNT
- {0x56, 0x0b}, // SPECIES_GLALIE
- {0x76, 0x0a}, // SPECIES_LUNATONE
- {0x66, 0x09}, // SPECIES_SOLROCK
- {0x88, 0x01}, // SPECIES_AZURILL
- {0x55, 0x0f}, // SPECIES_SPOINK
- {0x46, 0x09}, // SPECIES_GRUMPIG
- {0x77, 0x05}, // SPECIES_PLUSLE
- {0x56, 0x0e}, // SPECIES_MINUN
- {0x66, 0x0c}, // SPECIES_MAWILE
- {0x76, 0x08}, // SPECIES_MEDITITE
- {0x65, 0x0c}, // SPECIES_MEDICHAM
- {0x68, 0x01}, // SPECIES_SWABLU
- {0x76, 0x11}, // SPECIES_ALTARIA
- {0x88, 0x02}, // SPECIES_WYNAUT
- {0x55, 0x0c}, // SPECIES_DUSKULL
- {0x66, 0x0a}, // SPECIES_DUSCLOPS
- {0x77, 0x05}, // SPECIES_ROSELIA
- {0x76, 0x08}, // SPECIES_SLAKOTH
- {0x74, 0x12}, // SPECIES_VIGOROTH
- {0x78, 0x00}, // SPECIES_SLAKING
- {0x86, 0x08}, // SPECIES_GULPIN
- {0x55, 0x12}, // SPECIES_SWALOT
- {0x66, 0x08}, // SPECIES_TROPIUS
- {0x88, 0x00}, // SPECIES_WHISMUR
- {0x55, 0x0e}, // SPECIES_LOUDRED
- {0x78, 0x03}, // SPECIES_EXPLOUD
- {0x88, 0x01}, // SPECIES_CLAMPERL
- {0x55, 0x0e}, // SPECIES_HUNTAIL
- {0x78, 0x03}, // SPECIES_GOREBYSS
- {0x86, 0x0b}, // SPECIES_ABSOL
- {0x68, 0x00}, // SPECIES_SHUPPET
- {0x56, 0x0e}, // SPECIES_BANETTE
- {0x55, 0x0c}, // SPECIES_SEVIPER
- {0x77, 0x08}, // SPECIES_ZANGOOSE
- {0x87, 0x05}, // SPECIES_RELICANTH
- {0x77, 0x0b}, // SPECIES_ARON
- {0x43, 0x14}, // SPECIES_LAIRON
- {0x75, 0x0d}, // SPECIES_AGGRON
- {0x88, 0x00}, // SPECIES_CASTFORM
- {0x34, 0x11}, // SPECIES_VOLBEAT
- {0x66, 0x08}, // SPECIES_ILLUMISE
- {0x56, 0x08}, // SPECIES_LILEEP
- {0x67, 0x07}, // SPECIES_CRADILY
- {0x78, 0x00}, // SPECIES_ANORITH
- {0x66, 0x08}, // SPECIES_ARMALDO
- {0x88, 0x00}, // SPECIES_RALTS
- {0x35, 0x0f}, // SPECIES_KIRLIA
- {0x47, 0x06}, // SPECIES_GARDEVOIR
- {0x78, 0x01}, // SPECIES_BAGON
- {0x56, 0x0b}, // SPECIES_SHELGON
- {0x66, 0x09}, // SPECIES_SALAMENCE
- {0x87, 0x04}, // SPECIES_BELDUM
- {0x55, 0x0f}, // SPECIES_METANG
- {0x87, 0x07}, // SPECIES_METAGROSS
- {0x87, 0x06}, // SPECIES_REGIROCK
- {0x78, 0x04}, // SPECIES_REGICE
- {0x88, 0x02}, // SPECIES_REGISTEEL
- {0x88, 0x03}, // SPECIES_KYOGRE
- {0x87, 0x04}, // SPECIES_GROUDON
- {0x88, 0x01}, // SPECIES_RAYQUAZA
- {0x88, 0x00}, // SPECIES_LATIAS
- {0x88, 0x01}, // SPECIES_LATIOS
- {0x88, 0x02}, // SPECIES_JIRACHI
- {0x66, 0x0d}, // SPECIES_DEOXYS
- {0x88, 0x01}, // SPECIES_CHIMECHO
- {0x37, 0x06}, // SPECIES_EGG
- {0x33, 0x14}, // SPECIES_UNOWN_B
- {0x34, 0x10}, // SPECIES_UNOWN_C
+ {0x66, 0x08}, // SPECIES_TREECKO
+ {0x87, 0x04}, // SPECIES_GROVYLE
+ {0x88, 0x00}, // SPECIES_SCEPTILE
+ {0x56, 0x08}, // SPECIES_TORCHIC
+ {0x88, 0x01}, // SPECIES_COMBUSKEN
+ {0x88, 0x00}, // SPECIES_BLAZIKEN
+ {0x56, 0x0c}, // SPECIES_MUDKIP
+ {0x67, 0x06}, // SPECIES_MARSHTOMP
+ {0x88, 0x00}, // SPECIES_SWAMPERT
+ {0x55, 0x0c}, // SPECIES_POOCHYENA
+ {0x87, 0x04}, // SPECIES_MIGHTYENA
+ {0x85, 0x0f}, // SPECIES_ZIGZAGOON
+ {0x78, 0x03}, // SPECIES_LINOONE
+ {0x45, 0x0e}, // SPECIES_WURMPLE
+ {0x75, 0x11}, // SPECIES_SILCOON
+ {0x86, 0x09}, // SPECIES_BEAUTIFLY
+ {0x74, 0x10}, // SPECIES_CASCOON
+ {0x86, 0x0f}, // SPECIES_DUSTOX
+ {0x65, 0x0e}, // SPECIES_LOTAD
+ {0x66, 0x09}, // SPECIES_LOMBRE
+ {0x88, 0x00}, // SPECIES_LUDICOLO
+ {0x46, 0x10}, // SPECIES_SEEDOT
+ {0x56, 0x08}, // SPECIES_NUZLEAF
+ {0x88, 0x02}, // SPECIES_SHIFTRY
+ {0x74, 0x12}, // SPECIES_NINCADA
+ {0x86, 0x0a}, // SPECIES_NINJASK
+ {0x66, 0x0a}, // SPECIES_SHEDINJA
+ {0x64, 0x10}, // SPECIES_TAILLOW
+ {0x87, 0x06}, // SPECIES_SWELLOW
+ {0x54, 0x10}, // SPECIES_SHROOMISH
+ {0x77, 0x04}, // SPECIES_BRELOOM
+ {0x68, 0x08}, // SPECIES_SPINDA
+ {0x84, 0x18}, // SPECIES_WINGULL
+ {0x77, 0x04}, // SPECIES_PELIPPER
+ {0x65, 0x0f}, // SPECIES_SURSKIT
+ {0x88, 0x01}, // SPECIES_MASQUERAIN
+ {0x75, 0x0f}, // SPECIES_WAILMER
+ {0x87, 0x0a}, // SPECIES_WAILORD
+ {0x66, 0x0b}, // SPECIES_SKITTY
+ {0x66, 0x08}, // SPECIES_DELCATTY
+ {0x67, 0x07}, // SPECIES_KECLEON
+ {0x55, 0x10}, // SPECIES_BALTOY
+ {0x78, 0x06}, // SPECIES_CLAYDOL
+ {0x56, 0x0c}, // SPECIES_NOSEPASS
+ {0x88, 0x02}, // SPECIES_TORKOAL
+ {0x66, 0x09}, // SPECIES_SABLEYE
+ {0x46, 0x0b}, // SPECIES_BARBOACH
+ {0x76, 0x09}, // SPECIES_WHISCASH
+ {0x46, 0x18}, // SPECIES_LUVDISC
+ {0x66, 0x0c}, // SPECIES_CORPHISH
+ {0x88, 0x01}, // SPECIES_CRAWDAUNT
+ {0x46, 0x0d}, // SPECIES_FEEBAS
+ {0x88, 0x00}, // SPECIES_MILOTIC
+ {0x67, 0x06}, // SPECIES_CARVANHA
+ {0x78, 0x03}, // SPECIES_SHARPEDO
+ {0x54, 0x10}, // SPECIES_TRAPINCH
+ {0x86, 0x0c}, // SPECIES_VIBRAVA
+ {0x88, 0x01}, // SPECIES_FLYGON
+ {0x65, 0x0c}, // SPECIES_MAKUHITA
+ {0x88, 0x01}, // SPECIES_HARIYAMA
+ {0x64, 0x12}, // SPECIES_ELECTRIKE
+ {0x67, 0x04}, // SPECIES_MANECTRIC
+ {0x65, 0x0f}, // SPECIES_NUMEL
+ {0x87, 0x09}, // SPECIES_CAMERUPT
+ {0x65, 0x10}, // SPECIES_SPHEAL
+ {0x86, 0x0a}, // SPECIES_SEALEO
+ {0x88, 0x01}, // SPECIES_WALREIN
+ {0x74, 0x10}, // SPECIES_CACNEA
+ {0x88, 0x00}, // SPECIES_CACTURNE
+ {0x56, 0x0b}, // SPECIES_SNORUNT
+ {0x76, 0x0a}, // SPECIES_GLALIE
+ {0x66, 0x09}, // SPECIES_LUNATONE
+ {0x88, 0x01}, // SPECIES_SOLROCK
+ {0x55, 0x0f}, // SPECIES_AZURILL
+ {0x46, 0x09}, // SPECIES_SPOINK
+ {0x77, 0x05}, // SPECIES_GRUMPIG
+ {0x56, 0x0e}, // SPECIES_PLUSLE
+ {0x66, 0x0c}, // SPECIES_MINUN
+ {0x76, 0x08}, // SPECIES_MAWILE
+ {0x65, 0x0c}, // SPECIES_MEDITITE
+ {0x68, 0x01}, // SPECIES_MEDICHAM
+ {0x76, 0x11}, // SPECIES_SWABLU
+ {0x88, 0x02}, // SPECIES_ALTARIA
+ {0x55, 0x0c}, // SPECIES_WYNAUT
+ {0x66, 0x0a}, // SPECIES_DUSKULL
+ {0x77, 0x05}, // SPECIES_DUSCLOPS
+ {0x76, 0x08}, // SPECIES_ROSELIA
+ {0x74, 0x12}, // SPECIES_SLAKOTH
+ {0x78, 0x00}, // SPECIES_VIGOROTH
+ {0x86, 0x08}, // SPECIES_SLAKING
+ {0x55, 0x12}, // SPECIES_GULPIN
+ {0x66, 0x08}, // SPECIES_SWALOT
+ {0x88, 0x00}, // SPECIES_TROPIUS
+ {0x55, 0x0e}, // SPECIES_WHISMUR
+ {0x78, 0x03}, // SPECIES_LOUDRED
+ {0x88, 0x01}, // SPECIES_EXPLOUD
+ {0x55, 0x0e}, // SPECIES_CLAMPERL
+ {0x78, 0x03}, // SPECIES_HUNTAIL
+ {0x86, 0x0b}, // SPECIES_GOREBYSS
+ {0x68, 0x00}, // SPECIES_ABSOL
+ {0x56, 0x0e}, // SPECIES_SHUPPET
+ {0x55, 0x0c}, // SPECIES_BANETTE
+ {0x77, 0x08}, // SPECIES_SEVIPER
+ {0x87, 0x05}, // SPECIES_ZANGOOSE
+ {0x77, 0x0b}, // SPECIES_RELICANTH
+ {0x43, 0x14}, // SPECIES_ARON
+ {0x75, 0x0d}, // SPECIES_LAIRON
+ {0x88, 0x00}, // SPECIES_AGGRON
+ {0x34, 0x11}, // SPECIES_CASTFORM
+ {0x66, 0x08}, // SPECIES_VOLBEAT
+ {0x56, 0x08}, // SPECIES_ILLUMISE
+ {0x67, 0x07}, // SPECIES_LILEEP
+ {0x78, 0x00}, // SPECIES_CRADILY
+ {0x66, 0x08}, // SPECIES_ANORITH
+ {0x88, 0x00}, // SPECIES_ARMALDO
+ {0x35, 0x0f}, // SPECIES_RALTS
+ {0x47, 0x06}, // SPECIES_KIRLIA
+ {0x78, 0x01}, // SPECIES_GARDEVOIR
+ {0x56, 0x0b}, // SPECIES_BAGON
+ {0x66, 0x09}, // SPECIES_SHELGON
+ {0x87, 0x04}, // SPECIES_SALAMENCE
+ {0x55, 0x0f}, // SPECIES_BELDUM
+ {0x87, 0x07}, // SPECIES_METANG
+ {0x87, 0x06}, // SPECIES_METAGROSS
+ {0x78, 0x04}, // SPECIES_REGIROCK
+ {0x88, 0x02}, // SPECIES_REGICE
+ {0x88, 0x03}, // SPECIES_REGISTEEL
+ {0x87, 0x04}, // SPECIES_KYOGRE
+ {0x88, 0x01}, // SPECIES_GROUDON
+ {0x88, 0x00}, // SPECIES_RAYQUAZA
+ {0x88, 0x01}, // SPECIES_LATIAS
+ {0x88, 0x02}, // SPECIES_LATIOS
+ {0x66, 0x0d}, // SPECIES_JIRACHI
+ {0x88, 0x01}, // SPECIES_DEOXYS
+ {0x37, 0x06}, // SPECIES_CHIMECHO
+ {0x33, 0x14}, // SPECIES_EGG
+ {0x34, 0x10}, // SPECIES_UNOWN_B
+ {0x44, 0x10}, // SPECIES_UNOWN_C
{0x44, 0x10}, // SPECIES_UNOWN_D
- {0x44, 0x10}, // SPECIES_UNOWN_E
+ {0x44, 0x11}, // SPECIES_UNOWN_E
{0x44, 0x11}, // SPECIES_UNOWN_F
- {0x44, 0x11}, // SPECIES_UNOWN_G
- {0x35, 0x0e}, // SPECIES_UNOWN_H
- {0x44, 0x10}, // SPECIES_UNOWN_I
- {0x34, 0x10}, // SPECIES_UNOWN_J
- {0x34, 0x11}, // SPECIES_UNOWN_K
- {0x44, 0x11}, // SPECIES_UNOWN_L
- {0x34, 0x13}, // SPECIES_UNOWN_M
- {0x44, 0x13}, // SPECIES_UNOWN_N
- {0x43, 0x14}, // SPECIES_UNOWN_O
- {0x44, 0x10}, // SPECIES_UNOWN_P
- {0x34, 0x13}, // SPECIES_UNOWN_Q
- {0x43, 0x15}, // SPECIES_UNOWN_R
- {0x34, 0x13}, // SPECIES_UNOWN_S
- {0x45, 0x0c}, // SPECIES_UNOWN_T
- {0x34, 0x12}, // SPECIES_UNOWN_U
+ {0x35, 0x0e}, // SPECIES_UNOWN_G
+ {0x44, 0x10}, // SPECIES_UNOWN_H
+ {0x34, 0x10}, // SPECIES_UNOWN_I
+ {0x34, 0x11}, // SPECIES_UNOWN_J
+ {0x44, 0x11}, // SPECIES_UNOWN_K
+ {0x34, 0x13}, // SPECIES_UNOWN_L
+ {0x44, 0x13}, // SPECIES_UNOWN_M
+ {0x43, 0x14}, // SPECIES_UNOWN_N
+ {0x44, 0x10}, // SPECIES_UNOWN_O
+ {0x34, 0x13}, // SPECIES_UNOWN_P
+ {0x43, 0x15}, // SPECIES_UNOWN_Q
+ {0x34, 0x13}, // SPECIES_UNOWN_R
+ {0x45, 0x0c}, // SPECIES_UNOWN_S
+ {0x34, 0x12}, // SPECIES_UNOWN_T
+ {0x44, 0x12}, // SPECIES_UNOWN_U
{0x44, 0x12}, // SPECIES_UNOWN_V
- {0x44, 0x12}, // SPECIES_UNOWN_W
- {0x44, 0x13}, // SPECIES_UNOWN_X
- {0x33, 0x15}, // SPECIES_UNOWN_Y
- {0x34, 0x11}, // SPECIES_UNOWN_Z
- {0x34, 0x10}, // SPECIES_UNOWN_EMARK
- {0x35, 0x0f}, // SPECIES_UNOWN_QMARK
- {0x35, 0x0d},
+ {0x44, 0x13}, // SPECIES_UNOWN_W
+ {0x33, 0x15}, // SPECIES_UNOWN_X
+ {0x34, 0x11}, // SPECIES_UNOWN_Y
+ {0x34, 0x10}, // SPECIES_UNOWN_Z
+ {0x35, 0x0f}, // SPECIES_UNOWN_EMARK
+ {0x35, 0x0d}, // SPECIES_UNOWN_QMARK
};
diff --git a/src/dewford_trend.c b/src/dewford_trend.c
index 44b42c123..3050ebecf 100644
--- a/src/dewford_trend.c
+++ b/src/dewford_trend.c
@@ -1,13 +1,14 @@
#include "global.h"
#include "dewford_trend.h"
#include "easy_chat.h"
-#include "constants/easy_chat.h"
#include "event_data.h"
#include "link.h"
#include "malloc.h"
#include "random.h"
#include "text.h"
#include "tv.h"
+#include "string_util.h"
+#include "constants/easy_chat.h"
// static functions
static void sub_8122804(struct EasyChatPair *s, u16 b, u8 c);
diff --git a/src/dragon.c b/src/dragon.c
index 20ef357a0..49f1b57c8 100644
--- a/src/dragon.c
+++ b/src/dragon.c
@@ -1,13 +1,21 @@
#include "global.h"
#include "battle_anim.h"
+#include "scanline_effect.h"
+#include "task.h"
+#include "trig.h"
#include "constants/rgb.h"
-extern void sub_8113064(struct Sprite *);
-extern void sub_8113224(struct Sprite *);
-extern void sub_81131B4(struct Sprite *);
-extern void sub_8113224(struct Sprite *);
-extern void sub_8113250(struct Sprite *);
-extern void sub_81135EC(struct Sprite *);
+extern u16 gUnknown_0203A100[];
+
+void sub_8113064(struct Sprite *);
+void sub_81131B4(struct Sprite *);
+void sub_8113224(struct Sprite *);
+void sub_8113250(struct Sprite *);
+void sub_81135EC(struct Sprite *);
+static void sub_81132E0(struct Sprite *);
+static void sub_81134B8(u8);
+static void sub_8113574(struct Task *);
+static void sub_811369C(struct Sprite *);
const union AnimCmd gUnknown_08596E60[] =
{
@@ -178,3 +186,252 @@ const struct SpriteTemplate gUnknown_08596FB0 =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81135EC,
};
+
+void sub_8113064(struct Sprite *sprite)
+{
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ {
+ sprite->pos1.x -= gBattleAnimArgs[0];
+ gBattleAnimArgs[3] = -gBattleAnimArgs[3];
+ gBattleAnimArgs[4] = -gBattleAnimArgs[4];
+ }
+ else
+ {
+ sprite->pos1.x += gBattleAnimArgs[0];
+ }
+
+ sprite->pos1.y += gBattleAnimArgs[1];
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[1] = gBattleAnimArgs[3];
+ sprite->data[3] = gBattleAnimArgs[4];
+ sprite->data[5] = gBattleAnimArgs[5];
+ sprite->invisible = 1;
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+ sprite->callback = sub_80A66DC;
+}
+
+static void sub_8113100(struct Sprite *sprite)
+{
+ sub_80A6838(sprite);
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ {
+ sprite->pos1.x -= gBattleAnimArgs[1];
+ sprite->pos1.y += gBattleAnimArgs[1];
+ sprite->data[2] -= gBattleAnimArgs[2];
+ sprite->data[4] += gBattleAnimArgs[3];
+ }
+ else
+ {
+ sprite->pos1.x += gBattleAnimArgs[0];
+ sprite->pos1.y += gBattleAnimArgs[1];
+ sprite->data[2] += gBattleAnimArgs[2];
+ sprite->data[4] += gBattleAnimArgs[3];
+ StartSpriteAnim(sprite, 1);
+ }
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+}
+
+void sub_81131B4(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1);
+ }
+ else
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
+ }
+
+ sub_80A6864(sprite, gBattleAnimArgs[1]);
+ sprite->pos1.y += gBattleAnimArgs[2];
+ sprite->callback = sub_80A67D8;
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+}
+
+void sub_8113224(struct Sprite *sprite)
+{
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ StartSpriteAffineAnim(sprite, 1);
+
+ sub_8113100(sprite);
+}
+
+void sub_8113250(struct Sprite *sprite)
+{
+ u16 r5;
+ u16 r0;
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
+ sprite->data[4] = 0;
+ sprite->data[5] = 1;
+ sprite->data[6] = gBattleAnimArgs[0];
+ r5 = sub_80A861C(gBattlerAttacker, 0);
+ r0 = sub_80A861C(gBattlerAttacker, 1);
+ if (r5 > r0)
+ sprite->data[7] = r5 / 2;
+ else
+ sprite->data[7] = r0 / 2;
+ sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
+ sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
+ sprite->callback = sub_81132E0;
+}
+
+static void sub_81132E0(struct Sprite *sprite)
+{
+ switch (sprite->data[0])
+ {
+ case 0:
+ sprite->data[6] = (sprite->data[6] - sprite->data[5]) & 0xFF;
+ sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
+ sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
+ if (++sprite->data[4] > 5)
+ {
+ sprite->data[4] = 0;
+ if (sprite->data[5] <= 15 && ++sprite->data[5] > 15)
+ sprite->data[5] = 16;
+ }
+ if (++sprite->data[3] > 0x3C)
+ {
+ sprite->data[3] = 0;
+ sprite->data[0]++;
+ }
+ break;
+ case 1:
+ sprite->data[6] = (sprite->data[6] - sprite->data[5]) & 0xFF;
+ if (sprite->data[7] <= 0x95 && (sprite->data[7] += 8) > 0x95)
+ sprite->data[7] = 0x96;
+ sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]);
+ sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]);
+ if (++sprite->data[4] > 5)
+ {
+ sprite->data[4] = 0;
+ if (sprite->data[5] <= 15 && ++sprite->data[5] > 15)
+ sprite->data[5] = 16;
+ }
+ if (++sprite->data[3] > 20)
+ DestroyAnimSprite(sprite);
+ break;
+ }
+}
+
+void sub_81133E8(u8 taskId)
+{
+ struct ScanlineEffectParams sp;
+ struct Task *task = &gTasks[taskId];
+ u16 i;
+ u8 r1;
+ if (sub_80A8364(gBattleAnimAttacker) == 1)
+ {
+ sp.dmaDest = &REG_BG1HOFS;
+ task->data[2] = gBattle_BG1_X;
+ }
+ else
+ {
+ sp.dmaDest = &REG_BG2HOFS;
+ task->data[2] = gBattle_BG2_X;
+ }
+
+ sp.dmaControl = 0xA2600001;
+ sp.initState = 1;
+ sp.unused9 = 0;
+ r1 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
+ task->data[3] = r1 - 32;
+ task->data[4] = r1 + 32;
+ if (task->data[3] < 0)
+ task->data[3] = 0;
+
+ for (i = task->data[3]; i <= task->data[4]; i++)
+ {
+ gScanlineEffectRegBuffers[0][i] = task->data[2];
+ gScanlineEffectRegBuffers[1][i] = task->data[2];
+ }
+
+ ScanlineEffect_SetParams(sp);
+ task->func = sub_81134B8;
+}
+
+static void sub_81134B8(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ switch (task->data[0])
+ {
+ case 0:
+ if (++task->data[7] > 1)
+ {
+ task->data[7] = 0;
+ if (++task->data[6] == 3)
+ task->data[0]++;
+ }
+ sub_8113574(task);
+ break;
+ case 1:
+ if (++task->data[1] > 0x3C)
+ task->data[0]++;
+ sub_8113574(task);
+ break;
+ case 2:
+ if (++task->data[7] > 1)
+ {
+ task->data[7] = 0;
+ if (--task->data[6] == 0)
+ task->data[0]++;
+ }
+ sub_8113574(task);
+ break;
+ case 3:
+ gScanlineEffect.state = 3;
+ task->data[0]++;
+ break;
+ case 4:
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+static void sub_8113574(struct Task *task)
+{
+ u16 r3 = task->data[5];
+ u16 i;
+ for (i = task->data[3]; i <= task->data[4]; i++)
+ {
+ gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = ((gSineTable[r3] * task->data[6]) >> 7) + task->data[2];
+ r3 = (r3 + 8) & 0xFF;
+ }
+
+ task->data[5] = (task->data[5] + 9) & 0xFF;
+}
+
+void sub_81135EC(struct Sprite *sprite)
+{
+ int r6 = (gBattleAnimArgs[2] * 3) / 5;
+ int i;
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[4];
+ sprite->data[1] = Cos(gBattleAnimArgs[1], gBattleAnimArgs[2]);
+ sprite->data[2] = Sin(gBattleAnimArgs[1], r6);
+ sprite->pos1.x += sprite->data[1] * gBattleAnimArgs[0];
+ sprite->pos1.y += sprite->data[2] * gBattleAnimArgs[0];
+ sprite->data[3] = gBattleAnimArgs[3];
+ sprite->callback = sub_811369C;
+ for (i = 0; i < 7; i++)
+ gUnknown_0203A100[i] = sprite->data[i];
+}
+
+static void sub_811369C(struct Sprite *sprite)
+{
+ sprite->data[4] += sprite->data[1];
+ sprite->data[5] += sprite->data[2];
+ sprite->pos2.x = sprite->data[4] / 10;
+ sprite->pos2.y = sprite->data[5] / 10;
+ if (++sprite->data[0] > sprite->data[3])
+ DestroyAnimSprite(sprite);
+}
diff --git a/src/effects_1.c b/src/effects_1.c
index 36676b70d..a8687bc38 100644
--- a/src/effects_1.c
+++ b/src/effects_1.c
@@ -13,7 +13,7 @@ extern void sub_80FED28(struct Sprite *);
extern void sub_80FEE78(struct Sprite *);
extern void sub_80FEF44(struct Sprite *);
extern void sub_80FEFFC(struct Sprite *);
-extern void sub_80FF268(struct Sprite *);
+extern void AnimMoveTwisterParticle(struct Sprite *);
extern void sub_80FF0F4(struct Sprite *);
extern void sub_80FF374(struct Sprite *);
extern void sub_80FF698(struct Sprite *);
@@ -437,7 +437,7 @@ const struct SpriteTemplate gUnknown_085923A8 =
.anims = gUnknown_08592388,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_80FF268,
+ .callback = AnimMoveTwisterParticle,
};
const union AnimCmd gUnknown_085923C0[] =
diff --git a/src/field_effect.c b/src/field_effect.c
index 2ec5edf1e..a26d43030 100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -32,6 +32,8 @@
#define subsprite_table(ptr) {.subsprites = ptr, .subspriteCount = (sizeof ptr) / (sizeof(struct Subsprite))}
+extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const.
+
EWRAM_DATA s32 gFieldEffectArguments[8] = {0};
// Static type declarations
@@ -755,67 +757,15 @@ u8 AddNewGameBirchObject(s16 x, s16 y, u8 subpriority)
return CreateSprite(&gNewGameBirchObjectTemplate, x, y, subpriority);
}
-#ifdef NONMATCHING
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
{
- u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
+ s32 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag);
PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10);
if (spriteId == 0xFFFF)
return MAX_SPRITES;
-
- return spriteId;
+ else
+ return spriteId;
}
-#else
-NAKED
-u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
-{
- asm_unified("push {r4,r5,lr}\n\
- sub sp, 0x10\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- movs r3, 0x80\n\
- lsls r3, 8\n\
- lsls r1, 16\n\
- asrs r1, 16\n\
- str r1, [sp]\n\
- lsls r2, 16\n\
- asrs r2, 16\n\
- str r2, [sp, 0x4]\n\
- movs r1, 0\n\
- str r1, [sp, 0x8]\n\
- ldr r1, =gMonPaletteTable\n\
- lsls r4, r0, 3\n\
- adds r4, r1\n\
- ldrh r1, [r4, 0x4]\n\
- str r1, [sp, 0xC]\n\
- movs r1, 0\n\
- adds r2, r3, 0\n\
- movs r3, 0x1\n\
- bl CreateMonPicSprite_HandleDeoxys\n\
- lsls r0, 16\n\
- lsrs r5, r0, 16\n\
- ldrh r0, [r4, 0x4]\n\
- bl IndexOfSpritePaletteTag\n\
- adds r0, 0x10\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- bl PreservePaletteInWeather\n\
- ldr r0, =0x0000ffff\n\
- cmp r5, r0\n\
- beq _080B5FDC\n\
- lsls r0, r5, 24\n\
- lsrs r0, 24\n\
- b _080B5FDE\n\
- .pool\n\
-_080B5FDC:\n\
- movs r0, 0x40\n\
-_080B5FDE:\n\
- add sp, 0x10\n\
- pop {r4,r5}\n\
- pop {r1}\n\
- bx r1");
-}
-#endif //NONMATCHING
u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subpriority)
{
@@ -824,8 +774,8 @@ u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subprio
PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10);
if (spriteId == 0xFFFF)
return 0x40;
-
- return spriteId;
+ else
+ return spriteId;
}
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId)
@@ -3123,134 +3073,134 @@ NAKED
u8 sub_80B8F98(void)
{
asm_unified("push {r4-r7,lr}\n\
- mov r7, r8\n\
- push {r7}\n\
- ldr r0, =gFieldEffectObjectTemplatePointers\n\
- adds r0, 0x90\n\
- ldr r0, [r0]\n\
- movs r2, 0x18\n\
- negs r2, r2\n\
- movs r1, 0x78\n\
- movs r3, 0x1\n\
- bl CreateSprite\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- mov r8, r0\n\
- lsls r1, r0, 4\n\
- add r1, r8\n\
- lsls r1, 2\n\
- ldr r0, =gSprites\n\
- adds r1, r0\n\
- ldrb r2, [r1, 0x5]\n\
- movs r0, 0xD\n\
- negs r0, r0\n\
- ands r0, r2\n\
- movs r2, 0x4\n\
- orrs r0, r2\n\
- movs r2, 0xF\n\
- ands r0, r2\n\
- movs r2, 0x40\n\
- orrs r0, r2\n\
- strb r0, [r1, 0x5]\n\
- movs r2, 0\n\
- strh r2, [r1, 0x2E]\n\
- strh r2, [r1, 0x30]\n\
- strh r2, [r1, 0x32]\n\
- ldr r0, =0x0000ffff\n\
- strh r0, [r1, 0x34]\n\
- ldrh r0, [r1, 0x22]\n\
- strh r0, [r1, 0x36]\n\
- strh r2, [r1, 0x38]\n\
- ldr r1, =0x00003e41\n\
- movs r0, 0x50\n\
- bl SetGpuReg\n\
- ldr r1, =0x00000e0e\n\
- movs r0, 0x52\n\
- bl SetGpuReg\n\
- ldr r1, =0x00003f3f\n\
- movs r0, 0x48\n\
- bl SetGpuReg\n\
- ldr r0, =gUnknown_0855B610\n\
- movs r1, 0xC0\n\
- movs r2, 0x20\n\
- bl LoadPalette\n\
- movs r0, 0x12\n\
- movs r1, 0x78\n\
- bl SetGpuReg\n\
- movs r4, 0x3\n\
- ldr r7, =0x0600f800\n\
- ldr r0, =0x0000bff4\n\
- adds r6, r0, 0\n\
+ mov r7, r8\n\
+ push {r7}\n\
+ ldr r0, =gFieldEffectObjectTemplatePointers\n\
+ adds r0, 0x90\n\
+ ldr r0, [r0]\n\
+ movs r2, 0x18\n\
+ negs r2, r2\n\
+ movs r1, 0x78\n\
+ movs r3, 0x1\n\
+ bl CreateSprite\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ mov r8, r0\n\
+ lsls r1, r0, 4\n\
+ add r1, r8\n\
+ lsls r1, 2\n\
+ ldr r0, =gSprites\n\
+ adds r1, r0\n\
+ ldrb r2, [r1, 0x5]\n\
+ movs r0, 0xD\n\
+ negs r0, r0\n\
+ ands r0, r2\n\
+ movs r2, 0x4\n\
+ orrs r0, r2\n\
+ movs r2, 0xF\n\
+ ands r0, r2\n\
+ movs r2, 0x40\n\
+ orrs r0, r2\n\
+ strb r0, [r1, 0x5]\n\
+ movs r2, 0\n\
+ strh r2, [r1, 0x2E]\n\
+ strh r2, [r1, 0x30]\n\
+ strh r2, [r1, 0x32]\n\
+ ldr r0, =0x0000ffff\n\
+ strh r0, [r1, 0x34]\n\
+ ldrh r0, [r1, 0x22]\n\
+ strh r0, [r1, 0x36]\n\
+ strh r2, [r1, 0x38]\n\
+ ldr r1, =0x00003e41\n\
+ movs r0, 0x50\n\
+ bl SetGpuReg\n\
+ ldr r1, =0x00000e0e\n\
+ movs r0, 0x52\n\
+ bl SetGpuReg\n\
+ ldr r1, =0x00003f3f\n\
+ movs r0, 0x48\n\
+ bl SetGpuReg\n\
+ ldr r0, =gUnknown_0855B610\n\
+ movs r1, 0xC0\n\
+ movs r2, 0x20\n\
+ bl LoadPalette\n\
+ movs r0, 0x12\n\
+ movs r1, 0x78\n\
+ bl SetGpuReg\n\
+ movs r4, 0x3\n\
+ ldr r7, =0x0600f800\n\
+ ldr r0, =0x0000bff4\n\
+ adds r6, r0, 0\n\
_080B901A:\n\
- movs r2, 0xC\n\
- lsls r0, r4, 1\n\
- lsls r5, r4, 5\n\
- adds r0, r4\n\
- lsls r3, r0, 1\n\
+ movs r2, 0xC\n\
+ lsls r0, r4, 1\n\
+ lsls r5, r4, 5\n\
+ adds r0, r4\n\
+ lsls r3, r0, 1\n\
_080B9024:\n\
- adds r0, r5, r2\n\
- lsls r0, 1\n\
- adds r0, r7\n\
- adds r1, r2, r6\n\
- adds r1, r3, r1\n\
- adds r1, 0x1\n\
- strh r1, [r0]\n\
- adds r0, r2, 0x1\n\
- lsls r0, 24\n\
- lsrs r2, r0, 24\n\
- cmp r2, 0x11\n\
- bls _080B9024\n\
- adds r0, r4, 0x1\n\
- lsls r0, 24\n\
- lsrs r4, r0, 24\n\
- cmp r4, 0xE\n\
- bls _080B901A\n\
- movs r0, 0\n\
- ldr r5, =gUnknown_0855B630\n\
+ adds r0, r5, r2\n\
+ lsls r0, 1\n\
+ adds r0, r7\n\
+ adds r1, r2, r6\n\
+ adds r1, r3, r1\n\
+ adds r1, 0x1\n\
+ strh r1, [r0]\n\
+ adds r0, r2, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ cmp r2, 0x11\n\
+ bls _080B9024\n\
+ adds r0, r4, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ cmp r4, 0xE\n\
+ bls _080B901A\n\
+ movs r0, 0\n\
+ ldr r5, =gUnknown_0855B630\n\
_080B904A:\n\
- movs r4, 0\n\
- adds r7, r0, 0x1\n\
- lsls r6, r0, 5\n\
+ movs r4, 0\n\
+ adds r7, r0, 0x1\n\
+ lsls r6, r0, 5\n\
_080B9050:\n\
- lsls r1, r4, 2\n\
- adds r1, r6, r1\n\
- ldr r0, =0x06008020\n\
- adds r3, r1, r0\n\
- adds r0, r1, 0x1\n\
- adds r0, r5\n\
- ldrb r2, [r0]\n\
- lsls r2, 8\n\
- adds r0, r1, r5\n\
- ldrb r0, [r0]\n\
- adds r0, r2\n\
- strh r0, [r3]\n\
- ldr r0, =0x06008022\n\
- adds r3, r1, r0\n\
- adds r0, r1, 0x3\n\
- adds r0, r5\n\
- ldrb r2, [r0]\n\
- lsls r2, 8\n\
- adds r1, 0x2\n\
- adds r1, r5\n\
- ldrb r0, [r1]\n\
- adds r0, r2\n\
- strh r0, [r3]\n\
- adds r0, r4, 0x1\n\
- lsls r0, 24\n\
- lsrs r4, r0, 24\n\
- cmp r4, 0x7\n\
- bls _080B9050\n\
- lsls r0, r7, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x59\n\
- bls _080B904A\n\
- mov r0, r8\n\
- pop {r3}\n\
- mov r8, r3\n\
- pop {r4-r7}\n\
- pop {r1}\n\
- bx r1\n\
- .pool");
+ lsls r1, r4, 2\n\
+ adds r1, r6, r1\n\
+ ldr r0, =0x06008020\n\
+ adds r3, r1, r0\n\
+ adds r0, r1, 0x1\n\
+ adds r0, r5\n\
+ ldrb r2, [r0]\n\
+ lsls r2, 8\n\
+ adds r0, r1, r5\n\
+ ldrb r0, [r0]\n\
+ adds r0, r2\n\
+ strh r0, [r3]\n\
+ ldr r0, =0x06008022\n\
+ adds r3, r1, r0\n\
+ adds r0, r1, 0x3\n\
+ adds r0, r5\n\
+ ldrb r2, [r0]\n\
+ lsls r2, 8\n\
+ adds r1, 0x2\n\
+ adds r1, r5\n\
+ ldrb r0, [r1]\n\
+ adds r0, r2\n\
+ strh r0, [r3]\n\
+ adds r0, r4, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ cmp r4, 0x7\n\
+ bls _080B9050\n\
+ lsls r0, r7, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x59\n\
+ bls _080B904A\n\
+ mov r0, r8\n\
+ pop {r3}\n\
+ mov r8, r3\n\
+ pop {r4-r7}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .pool");
}
#endif // NONMATCHING
diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c
index 856f7d5ef..1f90c02b9 100755
--- a/src/field_effect_helpers.c
+++ b/src/field_effect_helpers.c
@@ -142,7 +142,7 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
reflectionSprite->pos2.x = mainSprite->pos2.x;
reflectionSprite->pos2.y = -mainSprite->pos2.y;
reflectionSprite->coordOffsetEnabled = mainSprite->coordOffsetEnabled;
-
+
if (eventObject->unk3_3 == TRUE)
reflectionSprite->invisible = TRUE;
@@ -1022,19 +1022,19 @@ static void SynchroniseSurfAnim(struct EventObject *eventObject, struct Sprite *
StartSpriteAnimIfDifferent(sprite, surfBlobDirectionAnims[eventObject->movementDirection]);
}
-#ifdef NONMATCHING
void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
{
- s16 x;
- s16 y;
u8 i;
+ s16 x = eventObject->currentCoords.x;
+ s16 y = eventObject->currentCoords.y;
+ s32 spriteY = sprite->pos2.y;
- x = eventObject->currentCoords.x;
- y = eventObject->currentCoords.y;
- if (sprite->pos2.y == 0 && (x != sprite->data[6] || y != sprite->data[7]))
+ if (spriteY == 0 && (x != sprite->data[6] || y != sprite->data[7]))
{
- sprite->data[5] = sprite->pos2.y;
- for (sprite->data[6] = x, sprite->data[7] = y, i = DIR_SOUTH; i <= DIR_EAST; i ++, x = sprite->data[6], y = sprite->data[7])
+ sprite->data[5] = spriteY;
+ sprite->data[6] = x;
+ sprite->data[7] = y;
+ for (i = DIR_SOUTH; i <= DIR_EAST; i++, x = sprite->data[6], y = sprite->data[7])
{
MoveCoords(i, &x, &y);
if (MapGridGetZCoordAt(x, y) == 3)
@@ -1045,87 +1045,6 @@ void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
}
}
}
-#else
-NAKED void sub_81556E8(struct EventObject *eventObject, struct Sprite *sprite)
-{
- asm_unified("push {r4-r7,lr}\n\
- mov r7, r8\n\
- push {r7}\n\
- sub sp, 0x4\n\
- adds r4, r1, 0\n\
- ldrh r2, [r0, 0x10]\n\
- mov r1, sp\n\
- strh r2, [r1]\n\
- ldrh r1, [r0, 0x12]\n\
- mov r0, sp\n\
- adds r0, 0x2\n\
- strh r1, [r0]\n\
- movs r2, 0x26\n\
- ldrsh r3, [r4, r2]\n\
- mov r8, r0\n\
- cmp r3, 0\n\
- bne _08155770\n\
- mov r0, sp\n\
- movs r5, 0\n\
- ldrsh r2, [r0, r5]\n\
- movs r5, 0x3A\n\
- ldrsh r0, [r4, r5]\n\
- cmp r2, r0\n\
- bne _08155724\n\
- lsls r0, r1, 16\n\
- asrs r0, 16\n\
- movs r5, 0x3C\n\
- ldrsh r1, [r4, r5]\n\
- cmp r0, r1\n\
- beq _08155770\n\
-_08155724:\n\
- strh r3, [r4, 0x38]\n\
- strh r2, [r4, 0x3A]\n\
- mov r1, r8\n\
- movs r2, 0\n\
- ldrsh r0, [r1, r2]\n\
- strh r0, [r4, 0x3C]\n\
- movs r5, 0x1\n\
- mov r7, r8\n\
- mov r6, sp\n\
-_08155736:\n\
- adds r0, r5, 0\n\
- mov r1, sp\n\
- adds r2, r7, 0\n\
- bl MoveCoords\n\
- movs r1, 0\n\
- ldrsh r0, [r6, r1]\n\
- movs r2, 0\n\
- ldrsh r1, [r7, r2]\n\
- bl MapGridGetZCoordAt\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x3\n\
- bne _0815575C\n\
- ldrh r0, [r4, 0x38]\n\
- adds r0, 0x1\n\
- strh r0, [r4, 0x38]\n\
- b _08155770\n\
-_0815575C:\n\
- adds r0, r5, 0x1\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
- ldrh r0, [r4, 0x3A]\n\
- strh r0, [r6]\n\
- ldrh r0, [r4, 0x3C]\n\
- mov r1, r8\n\
- strh r0, [r1]\n\
- cmp r5, 0x4\n\
- bls _08155736\n\
-_08155770:\n\
- add sp, 0x4\n\
- pop {r3}\n\
- mov r8, r3\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0");
-}
-#endif
static void CreateBobbingEffect(struct EventObject *eventObject, struct Sprite *linkedSprite, struct Sprite *sprite)
{
@@ -1450,7 +1369,7 @@ void sub_8155EA0(struct Sprite *sprite)
bool8 sub_8155EA8(struct Sprite *sprite)
{
bool8 returnBool = FALSE;
-
+
switch (sprite->data[7])
{
case 0:
@@ -1470,7 +1389,7 @@ bool8 sub_8155EA8(struct Sprite *sprite)
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
break;
}
-
+
SetGpuReg(REG_OFFSET_BG0HOFS, -sprite->pos2.x);
if (++sprite->data[6] == 72)
{
@@ -1483,14 +1402,14 @@ bool8 sub_8155EA8(struct Sprite *sprite)
sprite->pos2.x = 0;
returnBool = TRUE;
}
-
+
return returnBool;
}
void sub_8155F80(struct Sprite *sprite)
{
u8 i, j;
-
+
switch (sprite->data[2])
{
case 0:
@@ -1594,7 +1513,7 @@ void sub_8155F80(struct Sprite *sprite)
FieldEffectStop(sprite, FLDEFF_64);
break;
}
-
+
if (sprite->data[2] == 1)
{
if ((sprite->data[1] & 7) == 0)
@@ -1603,7 +1522,7 @@ void sub_8155F80(struct Sprite *sprite)
sprite->data[3] = -sprite->data[3];
sprite->data[1]++;
}
-
+
sprite->data[0]++;
}
@@ -1676,102 +1595,102 @@ static void sub_81561FC(struct Sprite *sprite /*r6*/, u8 z, u8 offset)
NAKED void sub_81561FC(struct Sprite *sprite /*r6*/, u8 z, u8 offset)
{
asm_unified("push {r4-r7,lr}\n\
- adds r6, r0, 0\n\
- adds r0, r1, 0\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- adds r1, r6, 0\n\
- bl SetObjectSubpriorityByZCoord\n\
- movs r7, 0\n\
+ adds r6, r0, 0\n\
+ adds r0, r1, 0\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r2, 24\n\
+ lsrs r2, 24\n\
+ adds r1, r6, 0\n\
+ bl SetObjectSubpriorityByZCoord\n\
+ movs r7, 0\n\
_08156212:\n\
- lsls r0, r7, 3\n\
- adds r0, r7\n\
- lsls r0, 2\n\
- ldr r1, =gEventObjects\n\
- adds r4, r0, r1\n\
- ldrb r0, [r4]\n\
- lsls r0, 31\n\
- cmp r0, 0\n\
- beq _081562B4\n\
- ldrb r0, [r4, 0x5]\n\
- bl GetEventObjectGraphicsInfo\n\
- ldrb r1, [r4, 0x4]\n\
- lsls r0, r1, 4\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- ldr r1, =gSprites\n\
- adds r5, r0, r1\n\
- adds r0, r6, 0\n\
- adds r0, 0x28\n\
- movs r2, 0\n\
- ldrsb r2, [r0, r2]\n\
- ldrh r0, [r6, 0x20]\n\
- adds r1, r0, r2\n\
- subs r0, r2\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- lsls r1, 16\n\
- asrs r1, 16\n\
- movs r0, 0x20\n\
- ldrsh r2, [r5, r0]\n\
- cmp r1, r2\n\
- bge _081562B4\n\
- lsls r0, r4, 16\n\
- asrs r0, 16\n\
- cmp r0, r2\n\
- ble _081562B4\n\
- adds r0, r5, 0\n\
- adds r0, 0x29\n\
- movs r3, 0\n\
- ldrsb r3, [r0, r3]\n\
- ldrh r2, [r5, 0x22]\n\
- adds r2, r3\n\
- ldrh r4, [r5, 0x22]\n\
- adds r0, r6, 0\n\
- adds r0, 0x29\n\
- movs r1, 0\n\
- ldrsb r1, [r0, r1]\n\
- ldrh r0, [r6, 0x22]\n\
- subs r0, r1\n\
- lsls r0, 16\n\
- asrs r0, 16\n\
- adds r3, r0, r3\n\
- lsls r2, 16\n\
- asrs r2, 16\n\
- lsls r3, 16\n\
- asrs r3, 16\n\
- cmp r2, r3\n\
- blt _0815628C\n\
- cmp r2, r0\n\
- bge _081562B4\n\
+ lsls r0, r7, 3\n\
+ adds r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, =gEventObjects\n\
+ adds r4, r0, r1\n\
+ ldrb r0, [r4]\n\
+ lsls r0, 31\n\
+ cmp r0, 0\n\
+ beq _081562B4\n\
+ ldrb r0, [r4, 0x5]\n\
+ bl GetEventObjectGraphicsInfo\n\
+ ldrb r1, [r4, 0x4]\n\
+ lsls r0, r1, 4\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ ldr r1, =gSprites\n\
+ adds r5, r0, r1\n\
+ adds r0, r6, 0\n\
+ adds r0, 0x28\n\
+ movs r2, 0\n\
+ ldrsb r2, [r0, r2]\n\
+ ldrh r0, [r6, 0x20]\n\
+ adds r1, r0, r2\n\
+ subs r0, r2\n\
+ lsls r0, 16\n\
+ lsrs r4, r0, 16\n\
+ lsls r1, 16\n\
+ asrs r1, 16\n\
+ movs r0, 0x20\n\
+ ldrsh r2, [r5, r0]\n\
+ cmp r1, r2\n\
+ bge _081562B4\n\
+ lsls r0, r4, 16\n\
+ asrs r0, 16\n\
+ cmp r0, r2\n\
+ ble _081562B4\n\
+ adds r0, r5, 0\n\
+ adds r0, 0x29\n\
+ movs r3, 0\n\
+ ldrsb r3, [r0, r3]\n\
+ ldrh r2, [r5, 0x22]\n\
+ adds r2, r3\n\
+ ldrh r4, [r5, 0x22]\n\
+ adds r0, r6, 0\n\
+ adds r0, 0x29\n\
+ movs r1, 0\n\
+ ldrsb r1, [r0, r1]\n\
+ ldrh r0, [r6, 0x22]\n\
+ subs r0, r1\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ adds r3, r0, r3\n\
+ lsls r2, 16\n\
+ asrs r2, 16\n\
+ lsls r3, 16\n\
+ asrs r3, 16\n\
+ cmp r2, r3\n\
+ blt _0815628C\n\
+ cmp r2, r0\n\
+ bge _081562B4\n\
_0815628C:\n\
- lsls r0, r4, 16\n\
- asrs r0, 16\n\
- cmp r0, r3\n\
- ble _081562B4\n\
- adds r2, r6, 0\n\
- adds r2, 0x43\n\
- adds r0, r5, 0\n\
- adds r0, 0x43\n\
- ldrb r1, [r0]\n\
- ldrb r0, [r2]\n\
- cmp r0, r1\n\
- bhi _081562B4\n\
- adds r0, r1, 0x2\n\
- strb r0, [r2]\n\
- b _081562BE\n\
- .pool\n\
+ lsls r0, r4, 16\n\
+ asrs r0, 16\n\
+ cmp r0, r3\n\
+ ble _081562B4\n\
+ adds r2, r6, 0\n\
+ adds r2, 0x43\n\
+ adds r0, r5, 0\n\
+ adds r0, 0x43\n\
+ ldrb r1, [r0]\n\
+ ldrb r0, [r2]\n\
+ cmp r0, r1\n\
+ bhi _081562B4\n\
+ adds r0, r1, 0x2\n\
+ strb r0, [r2]\n\
+ b _081562BE\n\
+ .pool\n\
_081562B4:\n\
- adds r0, r7, 0x1\n\
- lsls r0, 24\n\
- lsrs r7, r0, 24\n\
- cmp r7, 0xF\n\
- bls _08156212\n\
+ adds r0, r7, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r7, r0, 24\n\
+ cmp r7, 0xF\n\
+ bls _08156212\n\
_081562BE:\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0");
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0");
}
#endif
diff --git a/src/fight.c b/src/fight.c
index 89fe5900b..c9000fae4 100644
--- a/src/fight.c
+++ b/src/fight.c
@@ -1,25 +1,42 @@
#include "global.h"
#include "battle_anim.h"
+#include "gpu_regs.h"
+#include "random.h"
+#include "task.h"
+#include "trig.h"
#include "constants/rgb.h"
-extern void unc_080B08A0(struct Sprite *);
-extern void sub_810CE68(struct Sprite *);
-extern void sub_810CEB4(struct Sprite *);
-extern void sub_810CEE0(struct Sprite *);
-extern void sub_810CF30(struct Sprite *);
-extern void sub_810D10C(struct Sprite *);
-extern void sub_810D1B4(struct Sprite *);
-extern void sub_810D278(struct Sprite *);
-extern void sub_810D2E4(struct Sprite *);
-extern void sub_810D37C(struct Sprite *);
-extern void sub_810D40C(struct Sprite *);
-extern void sub_810D4F4(struct Sprite *);
-extern void sub_810D608(struct Sprite *);
-extern void sub_810D714(struct Sprite *);
-extern void sub_810D874(struct Sprite *);
-extern void sub_810D984(struct Sprite *);
-extern void sub_810DA10(struct Sprite *);
-extern void sub_810DA7C(struct Sprite *);
+void unc_080B08A0(struct Sprite *);
+void sub_810CE68(struct Sprite *);
+void sub_810CEB4(struct Sprite *);
+void AnimBasicFistOrFoot(struct Sprite *);
+void sub_810CF30(struct Sprite *);
+void sub_810D10C(struct Sprite *);
+void sub_810D1B4(struct Sprite *);
+void AnimSpinningKickOrPunch(struct Sprite *);
+void AnimStompFoot(struct Sprite *);
+void sub_810D37C(struct Sprite *);
+void sub_810D40C(struct Sprite *);
+void sub_810D4F4(struct Sprite *);
+void sub_810D608(struct Sprite *);
+void sub_810D714(struct Sprite *);
+void sub_810D874(struct Sprite *);
+void sub_810D984(struct Sprite *);
+void sub_810DA10(struct Sprite *);
+void sub_810DA7C(struct Sprite *);
+static void sub_810D0B8(struct Sprite *);
+static void sub_810D164(struct Sprite *);
+static void sub_810D240(struct Sprite *);
+static void AnimSpinningKickOrPunchFinish(struct Sprite *);
+static void AnimStompFootStep(struct Sprite *);
+static void AnimStompFootEnd(struct Sprite *);
+static void sub_810D47C(struct Sprite *);
+static void sub_810D5DC(struct Sprite *);
+static void sub_810D6A8(struct Sprite *);
+static void sub_810D770(struct Sprite *);
+static void sub_810D830(struct Sprite *);
+
+extern struct SpriteTemplate gBasicHitSplatSpriteTemplate;
const struct SpriteTemplate gUnknown_08595E14 =
{
@@ -109,7 +126,7 @@ const struct SpriteTemplate gFistFootSpriteTemplate =
.anims = gUnknown_08595E54,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_810CEE0,
+ .callback = AnimBasicFistOrFoot,
};
const struct SpriteTemplate gUnknown_08595EB0 =
@@ -165,7 +182,7 @@ const struct SpriteTemplate gUnknown_08595F14 =
.anims = gUnknown_08595E54,
.images = NULL,
.affineAnims = gUnknown_08595F10,
- .callback = sub_810D278,
+ .callback = AnimSpinningKickOrPunch,
};
const union AffineAnimCmd gUnknown_08595F2C[] =
@@ -188,7 +205,7 @@ const struct SpriteTemplate gMegaPunchKickSpriteTemplate =
.anims = gUnknown_08595E54,
.images = NULL,
.affineAnims = gUnknown_08595F44,
- .callback = sub_810D278,
+ .callback = AnimSpinningKickOrPunch,
};
const struct SpriteTemplate gUnknown_08595F60 =
@@ -199,7 +216,7 @@ const struct SpriteTemplate gUnknown_08595F60 =
.anims = gUnknown_08595E58,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_810D2E4,
+ .callback = AnimStompFoot,
};
const struct SpriteTemplate gUnknown_08595F78 =
@@ -396,3 +413,623 @@ const struct SpriteTemplate gUnknown_08596104 =
.affineAnims = gUnknown_08596100,
.callback = sub_810DA7C,
};
+
+void unc_080B08A0(struct Sprite *sprite)
+{
+ sub_80A6864(sprite, gBattleAnimArgs[0]);
+ sprite->pos1.y += gBattleAnimArgs[1];
+ sprite->data[0] = 15;
+ sprite->callback = WaitAnimForDuration;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_810CE68(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[7] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ {
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ gBattleAnimArgs[3] = -gBattleAnimArgs[3];
+ }
+
+ StartSpriteAnim(sprite, gBattleAnimArgs[6]);
+ gBattleAnimArgs[6] = 0;
+ sub_80A7938(sprite);
+}
+
+void sub_810CEB4(struct Sprite *sprite)
+{
+ if (IsContest())
+ {
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ gBattleAnimArgs[3] = -gBattleAnimArgs[3];
+ }
+
+ sub_810CE68(sprite);
+}
+
+// Displays a basic fist or foot sprite for a given duration.
+// Used by many fighting moves (and elemental "punch" moves).
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: duration
+// arg 3: ? (todo: related to initial pixel offsets)
+// arg 4: anim num
+void AnimBasicFistOrFoot(struct Sprite *sprite)
+{
+ StartSpriteAnim(sprite, gBattleAnimArgs[4]);
+
+ if (gBattleAnimArgs[3] == 0)
+ InitAnimSpritePos(sprite, 1);
+ else
+ sub_80A6980(sprite, TRUE);
+
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->callback = WaitAnimForDuration;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_810CF30(struct Sprite *sprite)
+{
+ u8 battler;
+ s16 xMod, yMod;
+ s16 x, y;
+
+ if (gBattleAnimArgs[0] == 0)
+ battler = gBattleAnimAttacker;
+ else
+ battler = gBattleAnimTarget;
+
+ if (gBattleAnimArgs[2] < 0)
+ gBattleAnimArgs[2] = Random2() % 5;
+
+ StartSpriteAnim(sprite, gBattleAnimArgs[2]);
+ sprite->pos1.x = GetBattlerSpriteCoord(battler, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(battler, 3);
+
+ xMod = sub_80A861C(battler, 1) / 2;
+ yMod = sub_80A861C(battler, 0) / 4;
+
+ x = Random2() % xMod;
+ y = Random2() % yMod;
+
+ if (Random2() & 1)
+ x *= -1;
+ if (Random2() & 1)
+ y *= -1;
+
+ if ((gBattlerPositions[battler] & BIT_SIDE) == B_SIDE_PLAYER)
+ y += 0xFFF0;
+
+ sprite->pos1.x += x;
+ sprite->pos1.y += y;
+
+ sprite->data[0] = gBattleAnimArgs[1];
+ sprite->data[7] = CreateSprite(&gBasicHitSplatSpriteTemplate, sprite->pos1.x, sprite->pos1.y, sprite->subpriority + 1);
+ if (sprite->data[7] != 64)
+ {
+ StartSpriteAffineAnim(&gSprites[sprite->data[7]], 0);
+ gSprites[sprite->data[7]].callback = SpriteCallbackDummy;
+ }
+
+ sprite->callback = sub_810D0B8;
+}
+
+static void sub_810D0B8(struct Sprite *sprite)
+{
+ if (sprite->data[0] == 0)
+ {
+ if (sprite->data[7] != 64)
+ {
+ FreeOamMatrix(gSprites[sprite->data[7]].oam.matrixNum);
+ DestroySprite(&gSprites[sprite->data[7]]);
+ }
+
+ DestroyAnimSprite(sprite);
+ }
+ else
+ {
+ sprite->data[0]--;
+ }
+}
+
+void sub_810D10C(struct Sprite *sprite)
+{
+ sub_80A6980(sprite, TRUE);
+ sprite->data[0] = 30;
+
+ if (gBattleAnimArgs[2] == 0)
+ {
+ sprite->data[2] = sprite->pos1.x - 20;
+ }
+ else
+ {
+ sprite->data[2] = sprite->pos1.x + 20;
+ sprite->hFlip = 1;
+ }
+
+ sprite->data[4] = sprite->pos1.y - 20;
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, sub_810D164);
+}
+
+static void sub_810D164(struct Sprite *sprite)
+{
+ if (++sprite->data[5] == 11)
+ {
+ sprite->data[2] = sprite->pos1.x - sprite->pos2.x;
+ sprite->data[4] = sprite->pos1.y - sprite->pos2.y;
+ sprite->data[0] = 8;
+ sprite->pos1.x += sprite->pos2.x;
+ sprite->pos1.y += sprite->pos2.y;
+ sprite->pos2.y = 0;
+ sprite->pos2.x = 0;
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+ }
+}
+
+void sub_810D1B4(struct Sprite *sprite)
+{
+ if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT)
+ gBattleAnimArgs[0] *= -1;
+
+ sub_80A6980(sprite, TRUE);
+
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+
+ sprite->data[0] = gBattleAnimArgs[3];
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
+ sprite->data[3] = sprite->pos1.y;
+ sprite->data[4] = sprite->pos1.y;
+
+ InitAnimLinearTranslation(sprite);
+
+ sprite->data[5] = gBattleAnimArgs[5];
+ sprite->data[6] = gBattleAnimArgs[4];
+ sprite->data[7] = 0;
+
+ sprite->callback = sub_810D240;
+}
+
+static void sub_810D240(struct Sprite *sprite)
+{
+ if (!TranslateAnimLinear(sprite))
+ {
+ sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]);
+ sprite->data[7] += sprite->data[6];
+ }
+ else
+ {
+ DestroyAnimSprite(sprite);
+ }
+}
+
+// Animates the spinning, shrinking kick or punch, which then
+// reappears at full size. Used by moves such as MOVE_MEGA_PUNCH and MOVE_MEGA_KICK.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: anim num
+// arg 3: spin duration
+void AnimSpinningKickOrPunch(struct Sprite *sprite)
+{
+ sub_80A6980(sprite, TRUE);
+ StartSpriteAnim(sprite, gBattleAnimArgs[2]);
+ sprite->data[0] = gBattleAnimArgs[3];
+
+ sprite->callback = WaitAnimForDuration;
+ StoreSpriteCallbackInData6(sprite, AnimSpinningKickOrPunchFinish);
+}
+
+static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite)
+{
+ StartSpriteAffineAnim(sprite, 0);
+ sprite->affineAnimPaused = 1;
+ sprite->data[0] = 20;
+
+ sprite->callback = WaitAnimForDuration;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+// Animates MOVE_STOMP's foot that slides downward.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: initial wait duration
+void AnimStompFoot(struct Sprite *sprite)
+{
+ sub_80A6980(sprite, TRUE);
+ sprite->data[0] = gBattleAnimArgs[2];
+
+ sprite->callback = AnimStompFootStep;
+}
+
+static void AnimStompFootStep(struct Sprite *sprite)
+{
+ if (--sprite->data[0] == -1)
+ {
+ sprite->data[0] = 6;
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, AnimStompFootEnd);
+ }
+}
+
+static void AnimStompFootEnd(struct Sprite *sprite)
+{
+ sprite->data[0] = 15;
+
+ sprite->callback = WaitAnimForDuration;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_810D37C(struct Sprite *sprite)
+{
+ if (sprite->data[0] == 0)
+ {
+ sub_80A6980(sprite, TRUE);
+ sprite->data[1] = gBattleAnimArgs[2];
+ sprite->data[2] = gBattleAnimArgs[3];
+ sprite->data[0]++;
+ }
+ else
+ {
+ sprite->data[4] += sprite->data[1];
+ sprite->pos2.x = sprite->data[4] >> 8;
+ sprite->pos2.y = Sin(sprite->data[3], sprite->data[2]);
+ sprite->data[3] = (sprite->data[3] + 3) & 0xFF;
+
+ if (sprite->data[3] > 100)
+ sprite->invisible = sprite->data[3] % 2;
+
+ if (sprite->data[3] > 120)
+ DestroyAnimSprite(sprite);
+ }
+}
+
+void sub_810D40C(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1);
+ }
+ else
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
+ }
+
+ sprite->pos1.x += gBattleAnimArgs[1];
+ sprite->pos1.y += gBattleAnimArgs[2];
+
+ sprite->data[0] = 0;
+ sprite->data[1] = gBattleAnimArgs[3];
+ sprite->data[2] = gBattleAnimArgs[4];
+ sprite->data[3] = 0;
+ sprite->callback = sub_810D47C;
+}
+
+static void sub_810D47C(struct Sprite *sprite)
+{
+ switch (sprite->data[0])
+ {
+ case 0:
+ if (--sprite->data[1] == 0)
+ {
+ if (sprite->data[2] == 0)
+ DestroyAnimSprite(sprite);
+ else
+ sprite->data[0]++;
+ }
+ break;
+ case 1:
+ if (++sprite->data[1] > 1)
+ {
+ sprite->data[1] = 0;
+ sprite->data[3]++;
+ if (sprite->data[3] & 1)
+ sprite->pos2.x = 2;
+ else
+ sprite->pos2.x = -2;
+ }
+
+ if (--sprite->data[2] == 0)
+ DestroyAnimSprite(sprite);
+ break;
+ }
+}
+
+void sub_810D4F4(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2];
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3];
+ }
+ else
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[2];
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[3];
+ }
+
+ sprite->oam.tileNum += gBattleAnimArgs[1] * 16;
+ sprite->data[0] = 0;
+
+ switch (gBattleAnimArgs[1])
+ {
+ case 0:
+ sprite->data[6] = -3;
+ sprite->data[7] = -3;
+ break;
+ case 1:
+ sprite->data[6] = 3;
+ sprite->data[7] = -3;
+ break;
+ case 2:
+ sprite->data[6] = -3;
+ sprite->data[7] = 3;
+ break;
+ case 3:
+ sprite->data[6] = 3;
+ sprite->data[7] = 3;
+ break;
+ default:
+ DestroyAnimSprite(sprite);
+ return;
+ }
+
+ sprite->callback = sub_810D5DC;
+}
+
+static void sub_810D5DC(struct Sprite *sprite)
+{
+ sprite->pos1.x += sprite->data[6];
+ sprite->pos1.y += sprite->data[7];
+
+ if (++sprite->data[0] > 40)
+ DestroyAnimSprite(sprite);
+}
+
+void sub_810D608(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
+ sprite->oam.priority = sub_80A8328(gBattleAnimAttacker);
+ sprite->data[7] = gBattleAnimTarget;
+ }
+ else
+ {
+ sprite->oam.priority = sub_80A8328(gBattleAnimTarget);
+ sprite->data[7] = gBattleAnimAttacker;
+ }
+
+ sprite->data[0] = 0;
+ sprite->data[1] = 12;
+ sprite->data[2] = 8;
+ sprite->callback = sub_810D6A8;
+}
+
+static void sub_810D6A8(struct Sprite *sprite)
+{
+ if (++sprite->data[0] == 180)
+ {
+ SetGpuReg(REG_OFFSET_BLDCNT, 0);
+
+ sprite->data[0] = 16;
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[2] = GetBattlerSpriteCoord(sprite->data[7], 2);
+ sprite->data[3] = sprite->pos1.y;
+ sprite->data[4] = GetBattlerSpriteCoord(sprite->data[7], 3);
+
+ InitAnimLinearTranslation(sprite);
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+ sprite->callback = sub_80A6F98;
+ }
+}
+
+void sub_810D714(struct Sprite *sprite)
+{
+ sprite->pos1.x = gBattleAnimArgs[0];
+ sprite->pos1.y = 120;
+
+ sprite->data[0] = gBattleAnimArgs[3];
+ sub_80A8048(&sprite->data[4], &sprite->data[5], (void *)(sprite->pos1.y << 8));
+
+ sprite->data[6] = gBattleAnimArgs[1];
+ sprite->oam.tileNum += gBattleAnimArgs[2] * 4;
+
+ sprite->callback = sub_810D770;
+}
+
+static void sub_810D770(struct Sprite *sprite)
+{
+ void *var0;
+
+ if (sprite->data[0] != 0)
+ {
+ var0 = sub_80A8050(sprite->data[4], sprite->data[5]);
+ var0 -= sprite->data[6];
+ sub_80A8048(&sprite->data[4], &sprite->data[5], var0);
+
+ var0 = (void *)(((intptr_t)var0) >> 8);
+ sprite->pos1.y = (intptr_t)var0;
+ if (sprite->pos1.y < -8)
+ DestroyAnimSprite(sprite);
+ else
+ sprite->data[0]--;
+ }
+ else
+ {
+ s16 pos0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ s16 pos1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
+ s16 pos2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ s16 pos3 = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+
+ sprite->data[0] = pos2 - pos0;
+ sprite->data[1] = pos3 - pos1;
+ sprite->data[2] = sprite->pos1.x << 4;
+ sprite->data[3] = sprite->pos1.y << 4;
+
+ sprite->callback = sub_810D830;
+ }
+}
+
+static void sub_810D830(struct Sprite *sprite)
+{
+ u16 edgeX;
+
+ sprite->data[2] += sprite->data[0];
+ sprite->data[3] += sprite->data[1];
+ sprite->pos1.x = sprite->data[2] >> 4;
+ sprite->pos1.y = sprite->data[3] >> 4;
+
+ edgeX = sprite->pos1.x + 8;
+ if (edgeX > 256 || sprite->pos1.y < -8 || sprite->pos1.y > 120)
+ DestroyAnimSprite(sprite);
+}
+
+void sub_810D874(struct Sprite *sprite)
+{
+ u8 battler;
+
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
+ battler = gBattleAnimTarget;
+ sprite->oam.priority = sub_80A8328(gBattleAnimAttacker);
+ }
+ else
+ {
+ battler = gBattleAnimAttacker;
+ sprite->oam.priority = sub_80A8328(gBattleAnimTarget);
+ }
+
+ if (IsContest())
+ sprite->oam.matrixNum |= 0x8;
+ else if (GetBattlerSide(battler) == B_SIDE_PLAYER)
+ sprite->oam.matrixNum |= 0x18;
+
+ sprite->data[0] = 16;
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[2] = GetBattlerSpriteCoord(battler, 2);
+ sprite->data[3] = sprite->pos1.y;
+ sprite->data[4] = GetBattlerSpriteCoord(battler, 3);
+
+ InitAnimLinearTranslation(sprite);
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+ sprite->callback = sub_80A6F98;
+}
+
+static void sub_810D960(struct Sprite *sprite)
+{
+ if (sprite->data[0] == sprite->data[4])
+ DestroyAnimSprite(sprite);
+
+ sprite->data[0]++;
+}
+
+void sub_810D984(struct Sprite *sprite)
+{
+ u8 turn;
+
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+ sprite->data[1] = gBattleAnimArgs[3];
+ sprite->data[2] = gBattleAnimArgs[0];
+ sprite->data[3] = gBattleAnimArgs[1];
+ sprite->data[4] = gBattleAnimArgs[2];
+
+ turn = gAnimMoveTurn;
+ if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
+ turn++;
+
+ if (turn & 1)
+ {
+ sprite->data[2] = -sprite->data[2];
+ sprite->data[1]++;
+ }
+
+ StartSpriteAnim(sprite, sprite->data[1]);
+ sprite->pos2.x = sprite->data[2];
+ sprite->pos2.y = sprite->data[3];
+ sprite->callback = sub_810D960;
+}
+
+void sub_810DA10(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[2] == 0)
+ InitAnimSpritePos(sprite, 0);
+ else
+ sub_80A6980(sprite, FALSE);
+
+ if (IsContest())
+ {
+ StartSpriteAnim(sprite, 2);
+ }
+ else if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ {
+ StartSpriteAnim(sprite, 1);
+ }
+
+ sprite->callback = sub_80A67D8;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_810DA7C(struct Sprite *sprite)
+{
+ if (sprite->affineAnimEnded)
+ {
+ sprite->data[1] = (sprite->data[1] + 40) & 0xFF;
+ sprite->pos2.x = Sin(sprite->data[1], 2);
+ if (++sprite->data[0] > 40)
+ DestroyAnimSprite(sprite);
+ }
+}
+
+void sub_810DABC(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ sub_80A6DAC(0);
+ task->data[8] = gBattleAnimArgs[0];
+ task->data[0]++;
+ break;
+ case 1:
+ if (--task->data[8] == -1)
+ task->data[0]++;
+ break;
+ case 2:
+ default:
+ task->data[9] += 1280;
+ break;
+ }
+
+ task->data[10] += 2816;
+
+ if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
+ gBattle_BG3_X += task->data[9] >> 8;
+ else
+ gBattle_BG3_X -= task->data[9] >> 8;
+
+ gBattle_BG3_Y += task->data[10] >> 8;
+ task->data[9] &= 0xFF;
+ task->data[10] &= 0xFF;
+
+ if (gBattleAnimArgs[7] == -1)
+ {
+ gBattle_BG3_X = 0;
+ gBattle_BG3_Y = 0;
+ sub_80A6DAC(1);
+ DestroyAnimVisualTask(taskId);
+ }
+}
diff --git a/src/frontier_util.c b/src/frontier_util.c
index 7ac2e6fa7..d90628184 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -36,7 +36,7 @@
#include "constants/items.h"
#include "constants/event_objects.h"
-extern u8 gUnknown_0203CEF8[];
+extern u8 gSelectedOrderFromParty[];
struct FrontierBrainMon
{
@@ -107,397 +107,397 @@ static const struct FrontierBrainMon sFrontierBrainsMons[][2][3] =
// Silver Symbol.
{
{
- .species = SPECIES_ALAKAZAM,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 24,
- .nature = 15,
- .evs = {106, 0, 152, 152, 100, 0},
- .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_DISABLE},
+ .species = SPECIES_ALAKAZAM,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 24,
+ .nature = 15,
+ .evs = {106, 0, 152, 152, 100, 0},
+ .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_DISABLE},
},
{
- .species = SPECIES_ENTEI,
- .heldItem = ITEM_LUM_BERRY,
- .fixedIV = 24,
- .nature = 1,
- .evs = {100, 152, 152, 0, 100, 6},
- .moves = {MOVE_FIRE_BLAST, MOVE_CALM_MIND, MOVE_RETURN, MOVE_ROAR},
+ .species = SPECIES_ENTEI,
+ .heldItem = ITEM_LUM_BERRY,
+ .fixedIV = 24,
+ .nature = 1,
+ .evs = {100, 152, 152, 0, 100, 6},
+ .moves = {MOVE_FIRE_BLAST, MOVE_CALM_MIND, MOVE_RETURN, MOVE_ROAR},
},
{
- .species = SPECIES_SNORLAX,
- .heldItem = ITEM_QUICK_CLAW,
- .fixedIV = 24,
- .nature = 3,
- .evs = {152, 152, 0, 0, 106, 100},
- .moves = {MOVE_BODY_SLAM, MOVE_BELLY_DRUM, MOVE_YAWN, MOVE_SHADOW_BALL},
+ .species = SPECIES_SNORLAX,
+ .heldItem = ITEM_QUICK_CLAW,
+ .fixedIV = 24,
+ .nature = 3,
+ .evs = {152, 152, 0, 0, 106, 100},
+ .moves = {MOVE_BODY_SLAM, MOVE_BELLY_DRUM, MOVE_YAWN, MOVE_SHADOW_BALL},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_RAIKOU,
- .heldItem = ITEM_LUM_BERRY,
- .fixedIV = 31,
- .nature = 15,
- .evs = {158, 0, 252, 100, 0, 0},
- .moves = {MOVE_THUNDERBOLT, MOVE_CALM_MIND, MOVE_REFLECT, MOVE_REST},
+ .species = SPECIES_RAIKOU,
+ .heldItem = ITEM_LUM_BERRY,
+ .fixedIV = 31,
+ .nature = 15,
+ .evs = {158, 0, 252, 100, 0, 0},
+ .moves = {MOVE_THUNDERBOLT, MOVE_CALM_MIND, MOVE_REFLECT, MOVE_REST},
},
{
- .species = SPECIES_LATIOS,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 31,
- .nature = 15,
- .evs = {252, 0, 252, 6, 0, 0},
- .moves = {MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_RECOVER, MOVE_DRAGON_CLAW},
+ .species = SPECIES_LATIOS,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 31,
+ .nature = 15,
+ .evs = {252, 0, 252, 6, 0, 0},
+ .moves = {MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_RECOVER, MOVE_DRAGON_CLAW},
},
{
- .species = SPECIES_SNORLAX,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 31,
- .nature = 3,
- .evs = {252, 252, 0, 0, 6, 0},
- .moves = {MOVE_CURSE, MOVE_RETURN, MOVE_REST, MOVE_SHADOW_BALL},
+ .species = SPECIES_SNORLAX,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 31,
+ .nature = 3,
+ .evs = {252, 252, 0, 0, 6, 0},
+ .moves = {MOVE_CURSE, MOVE_RETURN, MOVE_REST, MOVE_SHADOW_BALL},
},
},
},
- [FRONTIER_FACILITY_DOME] =
- {
+ [FRONTIER_FACILITY_DOME] =
+ {
// Silver Symbol.
{
{
- .species = SPECIES_SWAMPERT,
- .heldItem = ITEM_FOCUS_BAND,
- .fixedIV = 20,
- .nature = 2,
- .evs = {152, 152, 106, 0, 100, 0},
- .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_ICE_BEAM, MOVE_COUNTER},
+ .species = SPECIES_SWAMPERT,
+ .heldItem = ITEM_FOCUS_BAND,
+ .fixedIV = 20,
+ .nature = 2,
+ .evs = {152, 152, 106, 0, 100, 0},
+ .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_ICE_BEAM, MOVE_COUNTER},
},
{
- .species = SPECIES_SALAMENCE,
- .heldItem = ITEM_LUM_BERRY,
- .fixedIV = 20,
- .nature = 3,
- .evs = {152, 152, 106, 100, 0, 0},
- .moves = {MOVE_EARTHQUAKE, MOVE_BRICK_BREAK, MOVE_DRAGON_CLAW, MOVE_AERIAL_ACE},
+ .species = SPECIES_SALAMENCE,
+ .heldItem = ITEM_LUM_BERRY,
+ .fixedIV = 20,
+ .nature = 3,
+ .evs = {152, 152, 106, 100, 0, 0},
+ .moves = {MOVE_EARTHQUAKE, MOVE_BRICK_BREAK, MOVE_DRAGON_CLAW, MOVE_AERIAL_ACE},
},
{
- .species = SPECIES_CHARIZARD,
- .heldItem = ITEM_WHITE_HERB,
- .fixedIV = 20,
- .nature = 17,
- .evs = {100, 152, 106, 152, 0, 0},
- .moves = {MOVE_OVERHEAT, MOVE_ROCK_SLIDE, MOVE_AERIAL_ACE, MOVE_EARTHQUAKE},
+ .species = SPECIES_CHARIZARD,
+ .heldItem = ITEM_WHITE_HERB,
+ .fixedIV = 20,
+ .nature = 17,
+ .evs = {100, 152, 106, 152, 0, 0},
+ .moves = {MOVE_OVERHEAT, MOVE_ROCK_SLIDE, MOVE_AERIAL_ACE, MOVE_EARTHQUAKE},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_SWAMPERT,
- .heldItem = ITEM_LEFTOVERS,
- .fixedIV = 31,
- .nature = 2,
- .evs = {252, 252, 6, 0, 0, 0},
- .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_ICE_BEAM, MOVE_MIRROR_COAT},
+ .species = SPECIES_SWAMPERT,
+ .heldItem = ITEM_LEFTOVERS,
+ .fixedIV = 31,
+ .nature = 2,
+ .evs = {252, 252, 6, 0, 0, 0},
+ .moves = {MOVE_SURF, MOVE_EARTHQUAKE, MOVE_ICE_BEAM, MOVE_MIRROR_COAT},
},
{
- .species = SPECIES_METAGROSS,
- .heldItem = ITEM_QUICK_CLAW,
- .fixedIV = 31,
- .nature = 2,
- .evs = {252, 252, 6, 0, 0, 0},
- .moves = {MOVE_PSYCHIC, MOVE_METEOR_MASH, MOVE_EARTHQUAKE, MOVE_PROTECT},
+ .species = SPECIES_METAGROSS,
+ .heldItem = ITEM_QUICK_CLAW,
+ .fixedIV = 31,
+ .nature = 2,
+ .evs = {252, 252, 6, 0, 0, 0},
+ .moves = {MOVE_PSYCHIC, MOVE_METEOR_MASH, MOVE_EARTHQUAKE, MOVE_PROTECT},
},
{
- .species = SPECIES_LATIAS,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 31,
- .nature = 15,
- .evs = {252, 0, 252, 6, 0, 0},
- .moves = {MOVE_THUNDERBOLT, MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_REST},
+ .species = SPECIES_LATIAS,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 31,
+ .nature = 15,
+ .evs = {252, 0, 252, 6, 0, 0},
+ .moves = {MOVE_THUNDERBOLT, MOVE_PSYCHIC, MOVE_CALM_MIND, MOVE_REST},
},
},
},
- [FRONTIER_FACILITY_PALACE] =
- {
+ [FRONTIER_FACILITY_PALACE] =
+ {
// Silver Symbol.
{
{
- .species = SPECIES_CROBAT,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 16,
- .nature = 3,
- .evs = {152, 0, 0, 152, 100, 106},
- .moves = {MOVE_CONFUSE_RAY, MOVE_DOUBLE_TEAM, MOVE_TOXIC, MOVE_FLY},
+ .species = SPECIES_CROBAT,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 16,
+ .nature = 3,
+ .evs = {152, 0, 0, 152, 100, 106},
+ .moves = {MOVE_CONFUSE_RAY, MOVE_DOUBLE_TEAM, MOVE_TOXIC, MOVE_FLY},
},
{
- .species = SPECIES_SLAKING,
- .heldItem = ITEM_SCOPE_LENS,
- .fixedIV = 16,
- .nature = 0,
- .evs = {152, 152, 0, 106, 100, 0},
- .moves = {MOVE_EARTHQUAKE, MOVE_SWAGGER, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK},
+ .species = SPECIES_SLAKING,
+ .heldItem = ITEM_SCOPE_LENS,
+ .fixedIV = 16,
+ .nature = 0,
+ .evs = {152, 152, 0, 106, 100, 0},
+ .moves = {MOVE_EARTHQUAKE, MOVE_SWAGGER, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK},
},
{
- .species = SPECIES_LAPRAS,
- .heldItem = ITEM_QUICK_CLAW,
- .fixedIV = 16,
- .nature = 17,
- .evs = {0, 0, 252, 0, 106, 152},
- .moves = {MOVE_ICE_BEAM, MOVE_HORN_DRILL, MOVE_CONFUSE_RAY, MOVE_PROTECT},
+ .species = SPECIES_LAPRAS,
+ .heldItem = ITEM_QUICK_CLAW,
+ .fixedIV = 16,
+ .nature = 17,
+ .evs = {0, 0, 252, 0, 106, 152},
+ .moves = {MOVE_ICE_BEAM, MOVE_HORN_DRILL, MOVE_CONFUSE_RAY, MOVE_PROTECT},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_ARCANINE,
- .heldItem = ITEM_WHITE_HERB,
- .fixedIV = 31,
- .nature = 11,
- .evs = {6, 252, 252, 0, 0, 0},
- .moves = {MOVE_OVERHEAT, MOVE_EXTREME_SPEED, MOVE_ROAR, MOVE_PROTECT},
+ .species = SPECIES_ARCANINE,
+ .heldItem = ITEM_WHITE_HERB,
+ .fixedIV = 31,
+ .nature = 11,
+ .evs = {6, 252, 252, 0, 0, 0},
+ .moves = {MOVE_OVERHEAT, MOVE_EXTREME_SPEED, MOVE_ROAR, MOVE_PROTECT},
},
{
- .species = SPECIES_SLAKING,
- .heldItem = ITEM_SCOPE_LENS,
- .fixedIV = 31,
- .nature = 0,
- .evs = {6, 252, 0, 252, 0, 0},
- .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_YAWN},
+ .species = SPECIES_SLAKING,
+ .heldItem = ITEM_SCOPE_LENS,
+ .fixedIV = 31,
+ .nature = 0,
+ .evs = {6, 252, 0, 252, 0, 0},
+ .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_YAWN},
},
{
- .species = SPECIES_SUICUNE,
- .heldItem = ITEM_KINGS_ROCK,
- .fixedIV = 31,
- .nature = 11,
- .evs = {252, 0, 252, 6, 0, 0},
- .moves = {MOVE_BLIZZARD, MOVE_SURF, MOVE_BITE, MOVE_CALM_MIND},
+ .species = SPECIES_SUICUNE,
+ .heldItem = ITEM_KINGS_ROCK,
+ .fixedIV = 31,
+ .nature = 11,
+ .evs = {252, 0, 252, 6, 0, 0},
+ .moves = {MOVE_BLIZZARD, MOVE_SURF, MOVE_BITE, MOVE_CALM_MIND},
},
},
},
- [FRONTIER_FACILITY_ARENA] =
- {
+ [FRONTIER_FACILITY_ARENA] =
+ {
// Silver Symbol.
{
{
- .species = SPECIES_HERACROSS,
- .heldItem = ITEM_SALAC_BERRY,
- .fixedIV = 20,
- .nature = 13,
- .evs = {106, 152, 0, 152, 0, 100},
- .moves = {MOVE_MEGAHORN, MOVE_ROCK_TOMB, MOVE_ENDURE, MOVE_REVERSAL},
+ .species = SPECIES_HERACROSS,
+ .heldItem = ITEM_SALAC_BERRY,
+ .fixedIV = 20,
+ .nature = 13,
+ .evs = {106, 152, 0, 152, 0, 100},
+ .moves = {MOVE_MEGAHORN, MOVE_ROCK_TOMB, MOVE_ENDURE, MOVE_REVERSAL},
},
{
- .species = SPECIES_UMBREON,
- .heldItem = ITEM_LEFTOVERS,
- .fixedIV = 20,
- .nature = 20,
- .evs = {152, 0, 100, 0, 152, 106},
- .moves = {MOVE_BODY_SLAM, MOVE_CONFUSE_RAY, MOVE_PSYCHIC, MOVE_FAINT_ATTACK},
+ .species = SPECIES_UMBREON,
+ .heldItem = ITEM_LEFTOVERS,
+ .fixedIV = 20,
+ .nature = 20,
+ .evs = {152, 0, 100, 0, 152, 106},
+ .moves = {MOVE_BODY_SLAM, MOVE_CONFUSE_RAY, MOVE_PSYCHIC, MOVE_FAINT_ATTACK},
},
{
- .species = SPECIES_SHEDINJA,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 20,
- .nature = 3,
- .evs = {0, 252, 6, 252, 0, 0},
- .moves = {MOVE_SHADOW_BALL, MOVE_RETURN, MOVE_CONFUSE_RAY, MOVE_AERIAL_ACE},
+ .species = SPECIES_SHEDINJA,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 20,
+ .nature = 3,
+ .evs = {0, 252, 6, 252, 0, 0},
+ .moves = {MOVE_SHADOW_BALL, MOVE_RETURN, MOVE_CONFUSE_RAY, MOVE_AERIAL_ACE},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_UMBREON,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 31,
- .nature = 20,
- .evs = {252, 0, 0, 0, 252, 6},
- .moves = {MOVE_DOUBLE_EDGE, MOVE_CONFUSE_RAY, MOVE_REST, MOVE_PSYCHIC},
+ .species = SPECIES_UMBREON,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 31,
+ .nature = 20,
+ .evs = {252, 0, 0, 0, 252, 6},
+ .moves = {MOVE_DOUBLE_EDGE, MOVE_CONFUSE_RAY, MOVE_REST, MOVE_PSYCHIC},
},
{
- .species = SPECIES_GENGAR,
- .heldItem = ITEM_LEFTOVERS,
- .fixedIV = 31,
- .nature = 15,
- .evs = {252, 0, 252, 0, 6, 0},
- .moves = {MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_DESTINY_BOND},
+ .species = SPECIES_GENGAR,
+ .heldItem = ITEM_LEFTOVERS,
+ .fixedIV = 31,
+ .nature = 15,
+ .evs = {252, 0, 252, 0, 6, 0},
+ .moves = {MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_DREAM_EATER, MOVE_DESTINY_BOND},
},
{
- .species = SPECIES_BRELOOM,
- .heldItem = ITEM_LUM_BERRY,
- .fixedIV = 31,
- .nature = 13,
- .evs = {6, 252, 0, 252, 0, 0},
- .moves = {MOVE_SPORE, MOVE_FOCUS_PUNCH, MOVE_GIGA_DRAIN, MOVE_HEADBUTT},
+ .species = SPECIES_BRELOOM,
+ .heldItem = ITEM_LUM_BERRY,
+ .fixedIV = 31,
+ .nature = 13,
+ .evs = {6, 252, 0, 252, 0, 0},
+ .moves = {MOVE_SPORE, MOVE_FOCUS_PUNCH, MOVE_GIGA_DRAIN, MOVE_HEADBUTT},
},
},
},
- [FRONTIER_FACILITY_FACTORY] =
- {
+ [FRONTIER_FACILITY_FACTORY] =
+ {
// Because Factory's pokemon are random, this facility's Brain also uses random pokemon.
// What is interesting, this team is actually the one Steven uses in the multi tag battle alongside the player.
{
{
- .species = SPECIES_METANG,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 2,
- .evs = {0, 252, 252, 0, 6, 0},
- .moves = {MOVE_LIGHT_SCREEN, MOVE_PSYCHIC, MOVE_REFLECT, MOVE_METAL_CLAW},
+ .species = SPECIES_METANG,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 2,
+ .evs = {0, 252, 252, 0, 6, 0},
+ .moves = {MOVE_LIGHT_SCREEN, MOVE_PSYCHIC, MOVE_REFLECT, MOVE_METAL_CLAW},
},
{
- .species = SPECIES_SKARMORY,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 8,
- .evs = {252, 0, 0, 0, 6, 252},
- .moves = {MOVE_TOXIC, MOVE_AERIAL_ACE, MOVE_PROTECT, MOVE_STEEL_WING},
+ .species = SPECIES_SKARMORY,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 8,
+ .evs = {252, 0, 0, 0, 6, 252},
+ .moves = {MOVE_TOXIC, MOVE_AERIAL_ACE, MOVE_PROTECT, MOVE_STEEL_WING},
},
{
- .species = SPECIES_AGGRON,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 3,
- .evs = {0, 252, 0, 0, 252, 6},
- .moves = {MOVE_THUNDERBOLT, MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_DRAGON_CLAW},
+ .species = SPECIES_AGGRON,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 3,
+ .evs = {0, 252, 0, 0, 252, 6},
+ .moves = {MOVE_THUNDERBOLT, MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_DRAGON_CLAW},
},
},
{
{
- .species = SPECIES_METANG,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 2,
- .evs = {0, 252, 252, 0, 6, 0},
- .moves = {MOVE_LIGHT_SCREEN, MOVE_PSYCHIC, MOVE_REFLECT, MOVE_METAL_CLAW},
+ .species = SPECIES_METANG,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 2,
+ .evs = {0, 252, 252, 0, 6, 0},
+ .moves = {MOVE_LIGHT_SCREEN, MOVE_PSYCHIC, MOVE_REFLECT, MOVE_METAL_CLAW},
},
{
- .species = SPECIES_SKARMORY,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 8,
- .evs = {252, 0, 0, 0, 6, 252},
- .moves = {MOVE_TOXIC, MOVE_AERIAL_ACE, MOVE_PROTECT, MOVE_STEEL_WING},
+ .species = SPECIES_SKARMORY,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 8,
+ .evs = {252, 0, 0, 0, 6, 252},
+ .moves = {MOVE_TOXIC, MOVE_AERIAL_ACE, MOVE_PROTECT, MOVE_STEEL_WING},
},
{
- .species = SPECIES_AGGRON,
- .heldItem = ITEM_SITRUS_BERRY,
- .fixedIV = 31,
- .nature = 3,
- .evs = {0, 252, 0, 0, 252, 6},
- .moves = {MOVE_THUNDERBOLT, MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_DRAGON_CLAW},
+ .species = SPECIES_AGGRON,
+ .heldItem = ITEM_SITRUS_BERRY,
+ .fixedIV = 31,
+ .nature = 3,
+ .evs = {0, 252, 0, 0, 252, 6},
+ .moves = {MOVE_THUNDERBOLT, MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_DRAGON_CLAW},
},
},
},
- [FRONTIER_FACILITY_PIKE] =
- {
+ [FRONTIER_FACILITY_PIKE] =
+ {
// Silver Symbol.
{
{
- .species = SPECIES_SEVIPER,
- .heldItem = ITEM_QUICK_CLAW,
- .fixedIV = 16,
- .nature = 2,
- .evs = {252, 0, 252, 0, 6, 0},
- .moves = {MOVE_SWAGGER, MOVE_CRUNCH, MOVE_POISON_FANG, MOVE_GIGA_DRAIN},
+ .species = SPECIES_SEVIPER,
+ .heldItem = ITEM_QUICK_CLAW,
+ .fixedIV = 16,
+ .nature = 2,
+ .evs = {252, 0, 252, 0, 6, 0},
+ .moves = {MOVE_SWAGGER, MOVE_CRUNCH, MOVE_POISON_FANG, MOVE_GIGA_DRAIN},
},
{
- .species = SPECIES_SHUCKLE,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 16,
- .nature = 5,
- .evs = {252, 0, 0, 0, 106, 252},
- .moves = {MOVE_TOXIC, MOVE_SANDSTORM, MOVE_PROTECT, MOVE_REST},
+ .species = SPECIES_SHUCKLE,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 16,
+ .nature = 5,
+ .evs = {252, 0, 0, 0, 106, 252},
+ .moves = {MOVE_TOXIC, MOVE_SANDSTORM, MOVE_PROTECT, MOVE_REST},
},
{
- .species = SPECIES_MILOTIC,
- .heldItem = ITEM_LEFTOVERS,
- .fixedIV = 16,
- .nature = 15,
- .evs = {152, 0, 100, 0, 152, 106},
- .moves = {MOVE_ICE_BEAM, MOVE_MIRROR_COAT, MOVE_SURF, MOVE_RECOVER},
+ .species = SPECIES_MILOTIC,
+ .heldItem = ITEM_LEFTOVERS,
+ .fixedIV = 16,
+ .nature = 15,
+ .evs = {152, 0, 100, 0, 152, 106},
+ .moves = {MOVE_ICE_BEAM, MOVE_MIRROR_COAT, MOVE_SURF, MOVE_RECOVER},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_SEVIPER,
- .heldItem = ITEM_FOCUS_BAND,
- .fixedIV = 31,
- .nature = 5,
- .evs = {252, 0, 0, 0, 252, 6},
- .moves = {MOVE_SWAGGER, MOVE_CRUNCH, MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN},
+ .species = SPECIES_SEVIPER,
+ .heldItem = ITEM_FOCUS_BAND,
+ .fixedIV = 31,
+ .nature = 5,
+ .evs = {252, 0, 0, 0, 252, 6},
+ .moves = {MOVE_SWAGGER, MOVE_CRUNCH, MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN},
},
{
- .species = SPECIES_STEELIX,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 31,
- .nature = 2,
- .evs = {252, 0, 0, 0, 6, 252},
- .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_EXPLOSION, MOVE_SCREECH},
+ .species = SPECIES_STEELIX,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 31,
+ .nature = 2,
+ .evs = {252, 0, 0, 0, 6, 252},
+ .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_EXPLOSION, MOVE_SCREECH},
},
{
- .species = SPECIES_GYARADOS,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 31,
- .nature = 3,
- .evs = {252, 6, 0, 0, 0, 252},
- .moves = {MOVE_DRAGON_DANCE, MOVE_RETURN, MOVE_ROAR, MOVE_REST},
+ .species = SPECIES_GYARADOS,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 31,
+ .nature = 3,
+ .evs = {252, 6, 0, 0, 0, 252},
+ .moves = {MOVE_DRAGON_DANCE, MOVE_RETURN, MOVE_ROAR, MOVE_REST},
},
},
},
- [FRONTIER_FACILITY_PYRAMID] =
- {
+ [FRONTIER_FACILITY_PYRAMID] =
+ {
// Silver Symbol.
{
{
- .species = SPECIES_REGIROCK,
- .heldItem = ITEM_QUICK_CLAW,
- .fixedIV = 16,
- .nature = 3,
- .evs = {152, 152, 0, 0, 106, 100},
- .moves = {MOVE_EXPLOSION, MOVE_SUPERPOWER, MOVE_EARTHQUAKE, MOVE_ANCIENT_POWER},
+ .species = SPECIES_REGIROCK,
+ .heldItem = ITEM_QUICK_CLAW,
+ .fixedIV = 16,
+ .nature = 3,
+ .evs = {152, 152, 0, 0, 106, 100},
+ .moves = {MOVE_EXPLOSION, MOVE_SUPERPOWER, MOVE_EARTHQUAKE, MOVE_ANCIENT_POWER},
},
{
- .species = SPECIES_REGISTEEL,
- .heldItem = ITEM_LEFTOVERS,
- .fixedIV = 16,
- .nature = 3,
- .evs = {152, 152, 0, 0, 6, 200},
- .moves = {MOVE_EARTHQUAKE, MOVE_METAL_CLAW, MOVE_TOXIC, MOVE_IRON_DEFENSE},
+ .species = SPECIES_REGISTEEL,
+ .heldItem = ITEM_LEFTOVERS,
+ .fixedIV = 16,
+ .nature = 3,
+ .evs = {152, 152, 0, 0, 6, 200},
+ .moves = {MOVE_EARTHQUAKE, MOVE_METAL_CLAW, MOVE_TOXIC, MOVE_IRON_DEFENSE},
},
{
- .species = SPECIES_REGICE,
- .heldItem = ITEM_CHESTO_BERRY,
- .fixedIV = 16,
- .nature = 15,
- .evs = {106, 0, 152, 0, 100, 152},
- .moves = {MOVE_ICE_BEAM, MOVE_AMNESIA, MOVE_THUNDER, MOVE_REST},
+ .species = SPECIES_REGICE,
+ .heldItem = ITEM_CHESTO_BERRY,
+ .fixedIV = 16,
+ .nature = 15,
+ .evs = {106, 0, 152, 0, 100, 152},
+ .moves = {MOVE_ICE_BEAM, MOVE_AMNESIA, MOVE_THUNDER, MOVE_REST},
},
},
// Gold Symbol.
{
{
- .species = SPECIES_ARTICUNO,
- .heldItem = ITEM_SCOPE_LENS,
- .fixedIV = 31,
- .nature = 16,
- .evs = {6, 0, 252, 252, 0, 0},
- .moves = {MOVE_BLIZZARD, MOVE_WATER_PULSE, MOVE_AERIAL_ACE, MOVE_REFLECT},
+ .species = SPECIES_ARTICUNO,
+ .heldItem = ITEM_SCOPE_LENS,
+ .fixedIV = 31,
+ .nature = 16,
+ .evs = {6, 0, 252, 252, 0, 0},
+ .moves = {MOVE_BLIZZARD, MOVE_WATER_PULSE, MOVE_AERIAL_ACE, MOVE_REFLECT},
},
{
- .species = SPECIES_ZAPDOS,
- .heldItem = ITEM_LUM_BERRY,
- .fixedIV = 31,
- .nature = 16,
- .evs = {6, 0, 252, 252, 0, 0},
- .moves = {MOVE_THUNDER, MOVE_DETECT, MOVE_DRILL_PECK, MOVE_LIGHT_SCREEN},
+ .species = SPECIES_ZAPDOS,
+ .heldItem = ITEM_LUM_BERRY,
+ .fixedIV = 31,
+ .nature = 16,
+ .evs = {6, 0, 252, 252, 0, 0},
+ .moves = {MOVE_THUNDER, MOVE_DETECT, MOVE_DRILL_PECK, MOVE_LIGHT_SCREEN},
},
{
- .species = SPECIES_MOLTRES,
- .heldItem = ITEM_BRIGHT_POWDER,
- .fixedIV = 31,
- .nature = 16,
- .evs = {6, 0, 252, 252, 0, 0},
- .moves = {MOVE_FIRE_BLAST, MOVE_HYPER_BEAM, MOVE_AERIAL_ACE, MOVE_SAFEGUARD},
+ .species = SPECIES_MOLTRES,
+ .heldItem = ITEM_BRIGHT_POWDER,
+ .fixedIV = 31,
+ .nature = 16,
+ .evs = {6, 0, 252, 252, 0, 0},
+ .moves = {MOVE_FIRE_BLAST, MOVE_HYPER_BEAM, MOVE_AERIAL_ACE, MOVE_SAFEGUARD},
},
},
},
@@ -610,29 +610,29 @@ static const u16 gUnknown_08611BFC[][2] =
static void (* const sFrontierUtilFuncs[])(void) =
{
- sub_81A17A0,
- sub_81A1830,
- sub_81A1968,
- sub_81A1AD4,
- DoSoftReset_,
- sub_81A1B28,
- sub_81A1B38,
- ShowFacilityResultsWindow,
- sub_81A31FC,
- sub_81A35EC,
- sub_81A3B00,
- sub_81A3B64,
- sub_81A3D30,
- sub_81A3D58,
- sub_81A3DA0,
- sub_81A3FD4,
- sub_81A4224,
- sub_81A4230,
- sub_81A43A8,
- sub_81A4410,
- sub_81A443C,
- sub_81A447C,
- sub_81A457C,
+ sub_81A17A0,
+ sub_81A1830,
+ sub_81A1968,
+ sub_81A1AD4,
+ DoSoftReset_,
+ sub_81A1B28,
+ sub_81A1B38,
+ ShowFacilityResultsWindow,
+ sub_81A31FC,
+ sub_81A35EC,
+ sub_81A3B00,
+ sub_81A3B64,
+ sub_81A3D30,
+ sub_81A3D58,
+ sub_81A3DA0,
+ sub_81A3FD4,
+ sub_81A4224,
+ sub_81A4230,
+ sub_81A43A8,
+ sub_81A4410,
+ sub_81A443C,
+ sub_81A447C,
+ sub_81A457C,
};
static const struct WindowTemplate gUnknown_08611C74 =
@@ -672,12 +672,12 @@ static const struct WindowTemplate gUnknown_08611C84 =
static const u8 sFacilityToBrainEventObjGfx[][2] =
{
[FRONTIER_FACILITY_TOWER] = {EVENT_OBJ_GFX_ANABEL, TRUE},
- [FRONTIER_FACILITY_DOME] = {EVENT_OBJ_GFX_TUCKER, FALSE},
- [FRONTIER_FACILITY_PALACE] = {EVENT_OBJ_GFX_SPENSER, FALSE},
- [FRONTIER_FACILITY_ARENA] = {EVENT_OBJ_GFX_GRETA, TRUE},
- [FRONTIER_FACILITY_FACTORY] = {EVENT_OBJ_GFX_NOLAND, FALSE},
- [FRONTIER_FACILITY_PIKE] = {EVENT_OBJ_GFX_LUCY, TRUE},
- [FRONTIER_FACILITY_PYRAMID] = {EVENT_OBJ_GFX_BRANDON, FALSE},
+ [FRONTIER_FACILITY_DOME] = {EVENT_OBJ_GFX_TUCKER, FALSE},
+ [FRONTIER_FACILITY_PALACE] = {EVENT_OBJ_GFX_SPENSER, FALSE},
+ [FRONTIER_FACILITY_ARENA] = {EVENT_OBJ_GFX_GRETA, TRUE},
+ [FRONTIER_FACILITY_FACTORY] = {EVENT_OBJ_GFX_NOLAND, FALSE},
+ [FRONTIER_FACILITY_PIKE] = {EVENT_OBJ_GFX_LUCY, TRUE},
+ [FRONTIER_FACILITY_PYRAMID] = {EVENT_OBJ_GFX_BRANDON, FALSE},
};
const u16 gFrontierBannedSpecies[] =
@@ -887,7 +887,7 @@ static void sub_81A1968(void)
switch (gSpecialVar_0x8005)
{
- case 0:
+ case 0:
gSaveBlock2Ptr->frontier.field_CA8 = gSpecialVar_0x8006;
break;
case 1:
@@ -901,7 +901,7 @@ static void sub_81A1968(void)
break;
case 4:
for (i = 0; i < 4; i++)
- gSaveBlock2Ptr->frontier.selectedPartyMons[i] = gUnknown_0203CEF8[i];
+ gSaveBlock2Ptr->frontier.selectedPartyMons[i] = gSelectedOrderFromParty[i];
break;
case 6:
gSaveBlock2Ptr->frontier.field_CA9_b = gSpecialVar_0x8006;
@@ -918,8 +918,8 @@ static void sub_81A1AD4(void)
sub_81B8558();
for (i = 0; i < gSpecialVar_0x8005; i++)
- gUnknown_0203CEF8[i] = gSaveBlock2Ptr->frontier.selectedPartyMons[i];
- ReducePlayerPartyToThree();
+ gSelectedOrderFromParty[i] = gSaveBlock2Ptr->frontier.selectedPartyMons[i];
+ ReducePlayerPartyToSelectedMons();
}
static void DoSoftReset_(void)
@@ -2556,235 +2556,235 @@ NAKED
void CreateFrontierBrainPokemon(void)
{
asm_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, 0x44\n\
- ldr r0, =0x000040cf\n\
- bl VarGet\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- str r0, [sp, 0x20]\n\
- bl GetFronterBrainSymbol\n\
- str r0, [sp, 0x24]\n\
- ldr r0, [sp, 0x20]\n\
- cmp r0, 0x1\n\
- bne _081A4E44\n\
- ldr r0, =0x000003fe\n\
- bl TrainerIdToDomeTournamentId\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- bl GetDomeTrainerMonCountInBits\n\
- adds r4, r0, 0\n\
- b _081A4E46\n\
- .pool\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x44\n\
+ ldr r0, =0x000040cf\n\
+ bl VarGet\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ str r0, [sp, 0x20]\n\
+ bl GetFronterBrainSymbol\n\
+ str r0, [sp, 0x24]\n\
+ ldr r0, [sp, 0x20]\n\
+ cmp r0, 0x1\n\
+ bne _081A4E44\n\
+ ldr r0, =0x000003fe\n\
+ bl TrainerIdToDomeTournamentId\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ bl GetDomeTrainerMonCountInBits\n\
+ adds r4, r0, 0\n\
+ b _081A4E46\n\
+ .pool\n\
_081A4E44:\n\
- movs r4, 0x7\n\
+ movs r4, 0x7\n\
_081A4E46:\n\
- bl ZeroEnemyPartyMons\n\
- movs r1, 0\n\
- str r1, [sp, 0x18]\n\
- bl SetFacilityPtrsGetLevel\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- str r0, [sp, 0x1C]\n\
- movs r2, 0\n\
- str r2, [sp, 0x14]\n\
+ bl ZeroEnemyPartyMons\n\
+ movs r1, 0\n\
+ str r1, [sp, 0x18]\n\
+ bl SetFacilityPtrsGetLevel\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ str r0, [sp, 0x1C]\n\
+ movs r2, 0\n\
+ str r2, [sp, 0x14]\n\
_081A4E5C:\n\
- movs r0, 0x1\n\
- ands r0, r4\n\
- asrs r4, 1\n\
- str r4, [sp, 0x30]\n\
- ldr r3, [sp, 0x14]\n\
- adds r3, 0x1\n\
- str r3, [sp, 0x28]\n\
- cmp r0, 0\n\
- bne _081A4E70\n\
- b _081A4FC4\n\
+ movs r0, 0x1\n\
+ ands r0, r4\n\
+ asrs r4, 1\n\
+ str r4, [sp, 0x30]\n\
+ ldr r3, [sp, 0x14]\n\
+ adds r3, 0x1\n\
+ str r3, [sp, 0x28]\n\
+ cmp r0, 0\n\
+ bne _081A4E70\n\
+ b _081A4FC4\n\
_081A4E70:\n\
- ldr r4, [sp, 0x14]\n\
- lsls r4, 2\n\
- mov r9, r4\n\
- ldr r0, [sp, 0x24]\n\
- lsls r0, 4\n\
- str r0, [sp, 0x38]\n\
- ldr r1, [sp, 0x20]\n\
- lsls r1, 4\n\
- str r1, [sp, 0x34]\n\
- ldr r2, [sp, 0x1C]\n\
- lsls r2, 24\n\
- str r2, [sp, 0x3C]\n\
- ldr r3, [sp, 0x18]\n\
- adds r3, 0x1\n\
- str r3, [sp, 0x2C]\n\
- ldr r0, [sp, 0x14]\n\
- add r0, r9\n\
- lsls r0, 2\n\
- mov r8, r0\n\
+ ldr r4, [sp, 0x14]\n\
+ lsls r4, 2\n\
+ mov r9, r4\n\
+ ldr r0, [sp, 0x24]\n\
+ lsls r0, 4\n\
+ str r0, [sp, 0x38]\n\
+ ldr r1, [sp, 0x20]\n\
+ lsls r1, 4\n\
+ str r1, [sp, 0x34]\n\
+ ldr r2, [sp, 0x1C]\n\
+ lsls r2, 24\n\
+ str r2, [sp, 0x3C]\n\
+ ldr r3, [sp, 0x18]\n\
+ adds r3, 0x1\n\
+ str r3, [sp, 0x2C]\n\
+ ldr r0, [sp, 0x14]\n\
+ add r0, r9\n\
+ lsls r0, 2\n\
+ mov r8, r0\n\
_081A4E96:\n\
- bl Random\n\
- adds r4, r0, 0\n\
- bl Random\n\
- lsls r4, 16\n\
- lsrs r7, r4, 16\n\
- lsls r0, 16\n\
- orrs r7, r0\n\
- ldr r0, =0x0000ef2a\n\
- adds r1, r7, 0\n\
- bl IsShinyOtIdPersonality\n\
- lsls r0, 24\n\
- cmp r0, 0\n\
- bne _081A4E96\n\
- ldr r4, [sp, 0x38]\n\
- ldr r1, [sp, 0x24]\n\
- subs r0, r4, r1\n\
- lsls r5, r0, 2\n\
- mov r2, r8\n\
- adds r4, r2, r5\n\
- ldr r3, [sp, 0x34]\n\
- ldr r1, [sp, 0x20]\n\
- subs r0, r3, r1\n\
- lsls r6, r0, 3\n\
- adds r4, r6\n\
- ldr r2, =sFrontierBrainsMons\n\
- adds r4, r2\n\
- adds r0, r7, 0\n\
- bl GetNatureFromPersonality\n\
- ldrb r1, [r4, 0x5]\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r1, r0\n\
- bne _081A4E96\n\
- ldr r4, [sp, 0x18]\n\
- movs r0, 0x64\n\
- adds r3, r4, 0\n\
- muls r3, r0\n\
- mov r8, r3\n\
- ldr r1, =gEnemyParty\n\
- add r1, r8\n\
- mov r10, r1\n\
- ldr r4, [sp, 0x14]\n\
- add r4, r9\n\
- lsls r4, 2\n\
- adds r0, r4, r5\n\
- adds r0, r6\n\
- ldr r2, =sFrontierBrainsMons\n\
- adds r0, r2\n\
- ldrh r1, [r0]\n\
- ldr r3, [sp, 0x3C]\n\
- lsrs r2, r3, 24\n\
- ldrb r3, [r0, 0x4]\n\
- movs r0, 0x1\n\
- str r0, [sp]\n\
- str r7, [sp, 0x4]\n\
- str r0, [sp, 0x8]\n\
- ldr r0, =0x0000ef2a\n\
- str r0, [sp, 0xC]\n\
- mov r0, r10\n\
- bl CreateMon\n\
- ldr r0, =sFrontierBrainsMons\n\
- adds r5, r0\n\
- adds r5, r6, r5\n\
- adds r4, r5, r4\n\
- adds r4, 0x2\n\
- mov r0, r10\n\
- movs r1, 0xC\n\
- adds r2, r4, 0\n\
- bl SetMonData\n\
- movs r7, 0\n\
- mov r6, r8\n\
- ldr r3, =gEnemyParty\n\
+ bl Random\n\
+ adds r4, r0, 0\n\
+ bl Random\n\
+ lsls r4, 16\n\
+ lsrs r7, r4, 16\n\
+ lsls r0, 16\n\
+ orrs r7, r0\n\
+ ldr r0, =0x0000ef2a\n\
+ adds r1, r7, 0\n\
+ bl IsShinyOtIdPersonality\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _081A4E96\n\
+ ldr r4, [sp, 0x38]\n\
+ ldr r1, [sp, 0x24]\n\
+ subs r0, r4, r1\n\
+ lsls r5, r0, 2\n\
+ mov r2, r8\n\
+ adds r4, r2, r5\n\
+ ldr r3, [sp, 0x34]\n\
+ ldr r1, [sp, 0x20]\n\
+ subs r0, r3, r1\n\
+ lsls r6, r0, 3\n\
+ adds r4, r6\n\
+ ldr r2, =sFrontierBrainsMons\n\
+ adds r4, r2\n\
+ adds r0, r7, 0\n\
+ bl GetNatureFromPersonality\n\
+ ldrb r1, [r4, 0x5]\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r1, r0\n\
+ bne _081A4E96\n\
+ ldr r4, [sp, 0x18]\n\
+ movs r0, 0x64\n\
+ adds r3, r4, 0\n\
+ muls r3, r0\n\
+ mov r8, r3\n\
+ ldr r1, =gEnemyParty\n\
+ add r1, r8\n\
+ mov r10, r1\n\
+ ldr r4, [sp, 0x14]\n\
+ add r4, r9\n\
+ lsls r4, 2\n\
+ adds r0, r4, r5\n\
+ adds r0, r6\n\
+ ldr r2, =sFrontierBrainsMons\n\
+ adds r0, r2\n\
+ ldrh r1, [r0]\n\
+ ldr r3, [sp, 0x3C]\n\
+ lsrs r2, r3, 24\n\
+ ldrb r3, [r0, 0x4]\n\
+ movs r0, 0x1\n\
+ str r0, [sp]\n\
+ str r7, [sp, 0x4]\n\
+ str r0, [sp, 0x8]\n\
+ ldr r0, =0x0000ef2a\n\
+ str r0, [sp, 0xC]\n\
+ mov r0, r10\n\
+ bl CreateMon\n\
+ ldr r0, =sFrontierBrainsMons\n\
+ adds r5, r0\n\
+ adds r5, r6, r5\n\
+ adds r4, r5, r4\n\
+ adds r4, 0x2\n\
+ mov r0, r10\n\
+ movs r1, 0xC\n\
+ adds r2, r4, 0\n\
+ bl SetMonData\n\
+ movs r7, 0\n\
+ mov r6, r8\n\
+ ldr r3, =gEnemyParty\n\
_081A4F32:\n\
- adds r1, r7, 0\n\
- adds r1, 0x1A\n\
- ldr r0, [sp, 0x14]\n\
- add r0, r9\n\
- lsls r4, r0, 2\n\
- adds r2, r5, r4\n\
- adds r0, r7, 0x6\n\
- adds r2, r0\n\
- adds r0, r6, r3\n\
- str r3, [sp, 0x40]\n\
- bl SetMonData\n\
- adds r7, 0x1\n\
- ldr r3, [sp, 0x40]\n\
- cmp r7, 0x5\n\
- ble _081A4F32\n\
- movs r1, 0xFF\n\
- add r0, sp, 0x10\n\
- strb r1, [r0]\n\
- movs r7, 0\n\
- ldr r1, [sp, 0x18]\n\
- movs r2, 0x64\n\
- adds r6, r1, 0\n\
- muls r6, r2\n\
- ldr r3, =sFrontierBrainsMons + 0xC\n\
- mov r8, r3\n\
- ldr r3, =gEnemyParty\n\
- adds r5, r4, 0\n\
+ adds r1, r7, 0\n\
+ adds r1, 0x1A\n\
+ ldr r0, [sp, 0x14]\n\
+ add r0, r9\n\
+ lsls r4, r0, 2\n\
+ adds r2, r5, r4\n\
+ adds r0, r7, 0x6\n\
+ adds r2, r0\n\
+ adds r0, r6, r3\n\
+ str r3, [sp, 0x40]\n\
+ bl SetMonData\n\
+ adds r7, 0x1\n\
+ ldr r3, [sp, 0x40]\n\
+ cmp r7, 0x5\n\
+ ble _081A4F32\n\
+ movs r1, 0xFF\n\
+ add r0, sp, 0x10\n\
+ strb r1, [r0]\n\
+ movs r7, 0\n\
+ ldr r1, [sp, 0x18]\n\
+ movs r2, 0x64\n\
+ adds r6, r1, 0\n\
+ muls r6, r2\n\
+ ldr r3, =sFrontierBrainsMons + 0xC\n\
+ mov r8, r3\n\
+ ldr r3, =gEnemyParty\n\
+ adds r5, r4, 0\n\
_081A4F6A:\n\
- ldr r4, [sp, 0x38]\n\
- ldr r0, [sp, 0x24]\n\
- subs r1, r4, r0\n\
- lsls r1, 2\n\
- adds r1, r5, r1\n\
- ldr r2, [sp, 0x34]\n\
- ldr r4, [sp, 0x20]\n\
- subs r0, r2, r4\n\
- lsls r0, 3\n\
- adds r1, r0\n\
- add r1, r8\n\
- ldrh r4, [r1]\n\
- lsls r2, r7, 24\n\
- lsrs r2, 24\n\
- adds r0, r6, r3\n\
- adds r1, r4, 0\n\
- str r3, [sp, 0x40]\n\
- bl SetMonMoveSlot\n\
- ldr r3, [sp, 0x40]\n\
- cmp r4, 0xDA\n\
- bne _081A4F9C\n\
- movs r1, 0\n\
- add r0, sp, 0x10\n\
- strb r1, [r0]\n\
+ ldr r4, [sp, 0x38]\n\
+ ldr r0, [sp, 0x24]\n\
+ subs r1, r4, r0\n\
+ lsls r1, 2\n\
+ adds r1, r5, r1\n\
+ ldr r2, [sp, 0x34]\n\
+ ldr r4, [sp, 0x20]\n\
+ subs r0, r2, r4\n\
+ lsls r0, 3\n\
+ adds r1, r0\n\
+ add r1, r8\n\
+ ldrh r4, [r1]\n\
+ lsls r2, r7, 24\n\
+ lsrs r2, 24\n\
+ adds r0, r6, r3\n\
+ adds r1, r4, 0\n\
+ str r3, [sp, 0x40]\n\
+ bl SetMonMoveSlot\n\
+ ldr r3, [sp, 0x40]\n\
+ cmp r4, 0xDA\n\
+ bne _081A4F9C\n\
+ movs r1, 0\n\
+ add r0, sp, 0x10\n\
+ strb r1, [r0]\n\
_081A4F9C:\n\
- adds r5, 0x2\n\
- adds r7, 0x1\n\
- cmp r7, 0x3\n\
- ble _081A4F6A\n\
- ldr r0, [sp, 0x18]\n\
- movs r1, 0x64\n\
- adds r4, r0, 0\n\
- muls r4, r1\n\
- ldr r0, =gEnemyParty\n\
- adds r4, r0\n\
- adds r0, r4, 0\n\
- movs r1, 0x20\n\
- add r2, sp, 0x10\n\
- bl SetMonData\n\
- adds r0, r4, 0\n\
- bl CalculateMonStats\n\
- ldr r2, [sp, 0x2C]\n\
- str r2, [sp, 0x18]\n\
+ adds r5, 0x2\n\
+ adds r7, 0x1\n\
+ cmp r7, 0x3\n\
+ ble _081A4F6A\n\
+ ldr r0, [sp, 0x18]\n\
+ movs r1, 0x64\n\
+ adds r4, r0, 0\n\
+ muls r4, r1\n\
+ ldr r0, =gEnemyParty\n\
+ adds r4, r0\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x20\n\
+ add r2, sp, 0x10\n\
+ bl SetMonData\n\
+ adds r0, r4, 0\n\
+ bl CalculateMonStats\n\
+ ldr r2, [sp, 0x2C]\n\
+ str r2, [sp, 0x18]\n\
_081A4FC4:\n\
- ldr r4, [sp, 0x30]\n\
- ldr r3, [sp, 0x28]\n\
- str r3, [sp, 0x14]\n\
- cmp r3, 0x2\n\
- bgt _081A4FD0\n\
- b _081A4E5C\n\
+ ldr r4, [sp, 0x30]\n\
+ ldr r3, [sp, 0x28]\n\
+ str r3, [sp, 0x14]\n\
+ cmp r3, 0x2\n\
+ bgt _081A4FD0\n\
+ b _081A4E5C\n\
_081A4FD0:\n\
- add sp, 0x44\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\
+ add sp, 0x44\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\
");
}
#endif
diff --git a/src/graphics.c b/src/graphics.c
index 7c28aa7b6..2a21b610a 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1,8 +1,8 @@
#include "global.h"
-const u32 gBattleTextboxTiles[] = INCBIN_U32("graphics/interface/menu.4bpp.lz");
-const u32 gBattleTextboxPalette[] = INCBIN_U32("graphics/interface/menu.gbapal.lz");
-const u32 gBattleTextboxTilemap[] = INCBIN_U32("graphics/interface/menu_map.bin.lz");
+const u32 gBattleTextboxTiles[] = INCBIN_U32("graphics/battle_interface/textbox.4bpp.lz");
+const u32 gBattleTextboxPalette[] = INCBIN_U32("graphics/battle_interface/textbox.gbapal.lz");
+const u32 gBattleTextboxTilemap[] = INCBIN_U32("graphics/battle_interface/textbox_map.bin.lz");
const u32 gMonStillFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/front_pics/circled_question_mark_still_front_pic.4bpp.lz");
const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/back_pics/circled_question_mark_back_pic.4bpp.lz");
diff --git a/src/ground.c b/src/ground.c
index 33eb3660a..6cb7b8557 100644
--- a/src/ground.c
+++ b/src/ground.c
@@ -1,14 +1,31 @@
#include "global.h"
#include "battle_anim.h"
+#include "random.h"
+#include "scanline_effect.h"
+#include "task.h"
+#include "trig.h"
#include "constants/rgb.h"
-extern void sub_8114994(struct Sprite *);
-extern void sub_8114A7C(struct Sprite *);
-extern void sub_8114AF0(struct Sprite *);
-extern void sub_8114AF0(struct Sprite *);
-extern void sub_8114B80(struct Sprite *);
-extern void sub_81151A0(struct Sprite *);
-extern void sub_8115244(struct Sprite *);
+void AnimBonemerangProjectile(struct Sprite *);
+void AnimBoneHitProjectile(struct Sprite *);
+void AnimDirtScatter(struct Sprite *);
+void AnimMudSportDirt(struct Sprite *);
+void AnimFissureDirtPlumeParticle(struct Sprite *);
+void AnimDigDirtMound(struct Sprite *);
+static void AnimBonemerangProjectileStep(struct Sprite *);
+static void AnimBonemerangProjectileEnd(struct Sprite *);
+static void AnimMudSportDirtRising(struct Sprite *);
+static void AnimMudSportDirtFalling(struct Sprite *);
+static void sub_8114CFC(u8);
+static void sub_8114EB4(u8);
+static void sub_8114F54(u8);
+static void sub_8114FD8(u8);
+static void sub_81150E0(u8, s16, s16);
+static void AnimFissureDirtPlumeParticleStep(struct Sprite *);
+static void sub_81153AC(u8);
+static void sub_81154A4(u8);
+static void sub_8115588(struct Task *);
+static void sub_81156D0(u8);
const union AffineAnimCmd gUnknown_08597150[] =
{
@@ -40,7 +57,7 @@ const struct SpriteTemplate gUnknown_08597178 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08597170,
- .callback = sub_8114994,
+ .callback = AnimBonemerangProjectile,
};
const struct SpriteTemplate gUnknown_08597190 =
@@ -51,7 +68,7 @@ const struct SpriteTemplate gUnknown_08597190 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08597174,
- .callback = sub_8114A7C,
+ .callback = AnimBoneHitProjectile,
};
const struct SpriteTemplate gUnknown_085971A8 =
@@ -62,7 +79,7 @@ const struct SpriteTemplate gUnknown_085971A8 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8114AF0,
+ .callback = AnimDirtScatter,
};
const union AnimCmd gUnknown_085971C0[] =
@@ -84,7 +101,7 @@ const struct SpriteTemplate gUnknown_085971CC =
.anims = gUnknown_085971C8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8114AF0,
+ .callback = AnimDirtScatter,
};
const struct SpriteTemplate gUnknown_085971E4 =
@@ -95,7 +112,7 @@ const struct SpriteTemplate gUnknown_085971E4 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8114B80,
+ .callback = AnimMudSportDirt,
};
const struct SpriteTemplate gUnknown_085971FC =
@@ -106,7 +123,7 @@ const struct SpriteTemplate gUnknown_085971FC =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_81151A0,
+ .callback = AnimFissureDirtPlumeParticle,
};
const struct SpriteTemplate gUnknown_08597214 =
@@ -117,5 +134,615 @@ const struct SpriteTemplate gUnknown_08597214 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8115244,
+ .callback = AnimDigDirtMound,
};
+
+// Moves a bone projectile towards the target mon, which moves like
+// a boomerang. After hitting the target mon, it comes back to the user.
+void AnimBonemerangProjectile(struct Sprite *sprite)
+{
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
+ sprite->data[0] = 20;
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+ sprite->data[5] = -40;
+ InitAnimArcTranslation(sprite);
+ sprite->callback = AnimBonemerangProjectileStep;
+}
+
+static void AnimBonemerangProjectileStep(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ {
+ sprite->pos1.x += sprite->pos2.x;
+ sprite->pos1.y += sprite->pos2.y;
+ sprite->pos2.y = 0;
+ sprite->pos2.x = 0;
+ sprite->data[0] = 20;
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
+ sprite->data[5] = 40;
+ InitAnimArcTranslation(sprite);
+ sprite->callback = AnimBonemerangProjectileEnd;
+ }
+}
+
+static void AnimBonemerangProjectileEnd(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ DestroyAnimSprite(sprite);
+}
+
+// Moves a bone projectile towards the target mon, starting right next to
+// the target mon.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: target x pixel offset
+// arg 3: target y pixel offset
+// arg 4: duration
+void AnimBoneHitProjectile(struct Sprite *sprite)
+{
+ sub_80A6980(sprite, TRUE);
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ gBattleAnimArgs[2] = -gBattleAnimArgs[2];
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+// Moves a small dirt projectile towards the target mon.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: duration
+// arg 3: target x pixel offset
+// arg 4: target y pixel offset
+void AnimDirtScatter(struct Sprite *sprite)
+{
+ u8 targetXPos, targetYPos;
+ s16 xOffset, yOffset;
+
+ InitAnimSpritePos(sprite, 1);
+
+ targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 2);
+ targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 3);
+
+ xOffset = Random2() & 0x1F;
+ yOffset = Random2() & 0x1F;
+ if (xOffset > 16)
+ xOffset = 16 - xOffset;
+ if (yOffset > 16)
+ yOffset = 16 - yOffset;
+
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[2] = targetXPos + xOffset;
+ sprite->data[4] = targetYPos + yOffset;
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+}
+
+// Moves a particle of dirt in the Mud Sport animation.
+// The dirt can either be rising upward, or falling down.
+// arg 0: 0 = dirt is rising into the air, 1 = dirt is falling down
+// arg 1: initial x pixel offset
+// arg 2: initial y pixel offset
+void AnimMudSportDirt(struct Sprite *sprite)
+{
+ sprite->oam.tileNum++;
+ if (gBattleAnimArgs[0] == 0)
+ {
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1];
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2];
+ sprite->data[0] = gBattleAnimArgs[1] > 0 ? 1 : -1;
+ sprite->callback = AnimMudSportDirtRising;
+ }
+ else
+ {
+ sprite->pos1.x = gBattleAnimArgs[1];
+ sprite->pos1.y = gBattleAnimArgs[2];
+ sprite->pos2.y = -gBattleAnimArgs[2];
+ sprite->callback = AnimMudSportDirtFalling;
+ }
+}
+
+static void AnimMudSportDirtRising(struct Sprite *sprite)
+{
+ if (++sprite->data[1] > 1)
+ {
+ sprite->data[1] = 0;
+ sprite->pos1.x += sprite->data[0];
+ }
+
+ sprite->pos1.y -= 4;
+ if (sprite->pos1.y < -4)
+ DestroyAnimSprite(sprite);
+}
+
+static void AnimMudSportDirtFalling(struct Sprite *sprite)
+{
+ switch (sprite->data[0])
+ {
+ case 0:
+ sprite->pos2.y += 4;
+ if (sprite->pos2.y >= 0)
+ {
+ sprite->pos2.y = 0;
+ sprite->data[0]++;
+ }
+ break;
+ case 1:
+ if (++sprite->data[1] > 0)
+ {
+ sprite->data[1] = 0;
+ sprite->invisible ^= 1;
+ if (++sprite->data[2] == 10)
+ DestroyAnimSprite(sprite);
+ }
+ break;
+ }
+}
+
+void sub_8114CBC(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ if (gBattleAnimArgs[0] == 0)
+ task->func = sub_8114CFC;
+ else
+ task->func = sub_8114EB4;
+
+ task->func(taskId);
+}
+
+static void sub_8114CFC(u8 taskId)
+{
+ u8 var0;
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ task->data[10] = GetAnimBattlerSpriteId(0);
+ task->data[11] = sub_80A8364(gBattleAnimAttacker);
+ if (task->data[11] == 1)
+ {
+ task->data[12] = gBattle_BG1_X;
+ task->data[13] = gBattle_BG1_Y;
+ }
+ else
+ {
+ task->data[12] = gBattle_BG2_X;
+ task->data[13] = gBattle_BG2_Y;
+ }
+
+ var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
+ task->data[14] = var0 - 32;
+ task->data[15] = var0 + 32;
+ if (task->data[14] < 0)
+ task->data[14] = 0;
+
+ gSprites[task->data[10]].invisible = 1;
+ task->data[0]++;
+ break;
+ case 1:
+ sub_81150E0(task->data[11], task->data[14], task->data[15]);
+ task->data[0]++;
+ break;
+ case 2:
+ task->data[2] = (task->data[2] + 6) & 0x7F;
+ if (++task->data[4] > 2)
+ {
+ task->data[4] = 0;
+ task->data[3]++;
+ }
+
+ task->data[5] = task->data[3] + (gSineTable[task->data[2]] >> 4);
+ if (task->data[11] == 1)
+ gBattle_BG1_Y = task->data[13] - task->data[5];
+ else
+ gBattle_BG2_Y = task->data[13] - task->data[5];
+
+ if (task->data[5] > 63)
+ {
+ task->data[5] = 120 - task->data[14];
+ if (task->data[11] == 1)
+ gBattle_BG1_Y = task->data[13] - task->data[5];
+ else
+ gBattle_BG2_Y = task->data[13] - task->data[5];
+
+ gSprites[task->data[10]].pos2.x = 272 - gSprites[task->data[10]].pos1.x;
+ task->data[0]++;
+ }
+ break;
+ case 3:
+ gScanlineEffect.state = 3;
+ task->data[0]++;
+ break;
+ case 4:
+ DestroyAnimVisualTask(taskId);
+ gSprites[task->data[10]].invisible = 1;
+ break;
+ }
+}
+
+static void sub_8114EB4(u8 taskId)
+{
+ u8 spriteId = GetAnimBattlerSpriteId(0);
+ gSprites[spriteId].invisible = 1;
+ gSprites[spriteId].pos2.x = 0;
+ gSprites[spriteId].pos2.y = 0;
+
+ if (sub_80A8364(gBattleAnimAttacker) == 1)
+ gBattle_BG1_Y = 0;
+ else
+ gBattle_BG2_Y = 0;
+
+ DestroyAnimVisualTask(taskId);
+}
+
+void sub_8114F14(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ if (gBattleAnimArgs[0] == 0)
+ task->func = sub_8114F54;
+ else
+ task->func = sub_8114FD8;
+
+ task->func(taskId);
+}
+
+static void sub_8114F54(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ task->data[10] = GetAnimBattlerSpriteId(0);
+ gSprites[task->data[10]].invisible = 0;
+ gSprites[task->data[10]].pos2.x = 0;
+ gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y;
+ task->data[0]++;
+ break;
+ case 1:
+ DestroyAnimVisualTask(taskId);
+ }
+}
+
+static void sub_8114FD8(u8 taskId)
+{
+ u8 var0;
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ task->data[10] = GetAnimBattlerSpriteId(0);
+ task->data[11] = sub_80A8364(gBattleAnimAttacker);
+ if (task->data[11] == 1)
+ task->data[12] = gBattle_BG1_X;
+ else
+ task->data[12] = gBattle_BG2_X;
+
+ var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
+ task->data[14] = var0 - 32;
+ task->data[15] = var0 + 32;
+ task->data[0]++;
+ break;
+ case 1:
+ sub_81150E0(task->data[11], 0, task->data[15]);
+ task->data[0]++;
+ break;
+ case 2:
+ gSprites[task->data[10]].pos2.y = 96;
+ task->data[0]++;
+ break;
+ case 3:
+ gSprites[task->data[10]].pos2.y -= 8;
+ if (gSprites[task->data[10]].pos2.y == 0)
+ {
+ gScanlineEffect.state = 3;
+ task->data[0]++;
+ }
+ break;
+ case 4:
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+static void sub_81150E0(u8 useBG1, s16 y, s16 endY)
+{
+ s16 bgX;
+ struct ScanlineEffectParams scanlineParams;
+
+ if (useBG1 == 1)
+ {
+ bgX = gBattle_BG1_X;
+ scanlineParams.dmaDest = &REG_BG1HOFS;
+ }
+ else
+ {
+ bgX = gBattle_BG2_X;
+ scanlineParams.dmaDest = &REG_BG2HOFS;
+ }
+
+ if (y < 0)
+ y = 0;
+
+ while (y < endY)
+ {
+ gScanlineEffectRegBuffers[0][y] = bgX;
+ gScanlineEffectRegBuffers[1][y] = bgX;
+ y++;
+ }
+
+ while (y < 160)
+ {
+ gScanlineEffectRegBuffers[0][y] = bgX + 240;
+ gScanlineEffectRegBuffers[1][y] = bgX + 240;
+ y++;
+ }
+
+ scanlineParams.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT;
+ scanlineParams.initState = 1;
+ scanlineParams.unused9 = 0;
+ ScanlineEffect_SetParams(scanlineParams);
+}
+
+// Moves a particle of dirt in a plume of dirt. Used in Fissure and Dig.
+// arg 0: which mon (0 = attacker, 1 = target)
+// arg 1: which side of mon (0 = left, 1 = right)
+// arg 2: target x offset
+// arg 3: target y offset
+// arg 4: wave amplitude
+// arg 5: duration
+void AnimFissureDirtPlumeParticle(struct Sprite *sprite)
+{
+ s8 battler;
+ s16 xOffset;
+
+ if (gBattleAnimArgs[0] == 0)
+ battler = gBattleAnimAttacker;
+ else
+ battler = gBattleAnimTarget;
+
+ xOffset = 24;
+ if (gBattleAnimArgs[1] == 1)
+ {
+ xOffset *= -1;
+ gBattleAnimArgs[2] *= -1;
+ }
+
+ sprite->pos1.x = GetBattlerSpriteCoord(battler, 2) + xOffset;
+ sprite->pos1.y = GetBattlerYCoordWithElevation(battler) + 30;
+ sprite->data[0] = gBattleAnimArgs[5];
+ sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
+ sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
+ sprite->data[5] = gBattleAnimArgs[4];
+ InitAnimArcTranslation(sprite);
+ sprite->callback = AnimFissureDirtPlumeParticleStep;
+}
+
+static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ DestroyAnimSprite(sprite);
+}
+
+// Displays the dirt mound seen in the move Dig for set duration.
+// The dirt mound image is too large for a single sprite, so two
+// sprites are lined up next to each other.
+// arg 0: which mon (0 = attacker, 1 = target)
+// arg 1: oam tile num (0 = left half of image, 1 = right half of image)
+// arg 2: duration
+void AnimDigDirtMound(struct Sprite *sprite)
+{
+ s8 battler;
+
+ if (gBattleAnimArgs[0] == 0)
+ battler = gBattleAnimAttacker;
+ else
+ battler = gBattleAnimTarget;
+
+ sprite->pos1.x = GetBattlerSpriteCoord(battler, 0) - 16 + (gBattleAnimArgs[1] * 32);
+ sprite->pos1.y = GetBattlerYCoordWithElevation(battler) + 32;
+ sprite->oam.tileNum += gBattleAnimArgs[1] * 8;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->callback = WaitAnimForDuration;
+}
+
+void sub_81152DC(u8 taskId)
+{
+ u16 i;
+ struct Task *task = &gTasks[taskId];
+
+ if (gBattleAnimArgs[1])
+ task->data[14] = task->data[15] = gBattleAnimArgs[1] + 3;
+ else
+ task->data[14] = task->data[15] = (gAnimMovePower / 10) + 3;
+
+ task->data[3] = gBattleAnimArgs[2];
+ switch (gBattleAnimArgs[0])
+ {
+ case 5:
+ task->data[13] = gBattle_BG3_X;
+ task->func = sub_81153AC;
+ break;
+ case 4:
+ task->data[13] = 0;
+ for (i = 0; i < MAX_BATTLERS_COUNT; i++)
+ {
+ if (IsBattlerSpriteVisible(i))
+ {
+ task->data[task->data[13] + 9] = gBattlerSpriteIds[i];
+ task->data[13]++;
+ }
+ }
+ task->func = sub_81154A4;
+ break;
+ default:
+ task->data[9] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
+ if (task->data[9] == 0xFF)
+ {
+ DestroyAnimVisualTask(taskId);
+ }
+ else
+ {
+ task->data[13] = 1;
+ task->func = sub_81154A4;
+ }
+
+ break;
+ }
+}
+
+static void sub_81153AC(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ if (++task->data[1] > 1)
+ {
+ task->data[1] = 0;
+ if ((task->data[2] & 1) == 0)
+ gBattle_BG3_X = task->data[13] + task->data[15];
+ else
+ gBattle_BG3_X = task->data[13] - task->data[15];
+
+ if (++task->data[2] == task->data[3])
+ {
+ task->data[2] = 0;
+ task->data[14]--;
+ task->data[0]++;
+ }
+ }
+ break;
+ case 1:
+ if (++task->data[1] > 1)
+ {
+ task->data[1] = 0;
+ if ((task->data[2] & 1) == 0)
+ gBattle_BG3_X = task->data[13] + task->data[14];
+ else
+ gBattle_BG3_X = task->data[13] - task->data[14];
+
+ if (++task->data[2] == 4)
+ {
+ task->data[2] = 0;
+ if (--task->data[14] == 0)
+ task->data[0]++;
+ }
+ }
+ break;
+ case 2:
+ gBattle_BG3_X = task->data[13];
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+static void sub_81154A4(u8 taskId)
+{
+ u16 i;
+ struct Task *task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ if (++task->data[1] > 1)
+ {
+ task->data[1] = 0;
+ sub_8115588(task);
+ if (++task->data[2] == task->data[3])
+ {
+ task->data[2] = 0;
+ task->data[14]--;
+ task->data[0]++;
+ }
+ }
+ break;
+ case 1:
+ if (++task->data[1] > 1)
+ {
+ task->data[1] = 0;
+ sub_8115588(task);
+ if (++task->data[2] == 4)
+ {
+ task->data[2] = 0;
+ if (--task->data[14] == 0)
+ task->data[0]++;
+ }
+ }
+ break;
+ case 2:
+ for (i = 0; i < task->data[13]; i++)
+ gSprites[task->data[9 + i]].pos2.x = 0;
+
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+static void sub_8115588(struct Task *task)
+{
+ u16 i;
+ u16 xOffset;
+
+ if ((task->data[2] & 1) == 0)
+ xOffset = (task->data[14] / 2) + (task->data[14] & 1);
+ else
+ xOffset = -(task->data[14] / 2);
+
+ for (i = 0; i < task->data[13]; i++)
+ {
+ gSprites[task->data[9 + i]].pos2.x = xOffset;
+ }
+}
+
+void AnimTask_IsPowerOver99(u8 taskId)
+{
+ gBattleAnimArgs[15] = gAnimMovePower > 99;
+ DestroyAnimVisualTask(taskId);
+}
+
+void sub_8115628(u8 taskId)
+{
+ struct Task *newTask;
+ u8 battler = (gBattleAnimArgs[0] & 1) ? gBattleAnimTarget : gBattleAnimAttacker;
+
+ if (gBattleAnimArgs[0] > 1)
+ battler ^= 2;
+
+ newTask = &gTasks[CreateTask(sub_81156D0, gBattleAnimArgs[1])];
+ newTask->data[1] = (32 - GetBattlerSpriteCoord(battler, 2)) & 0x1FF;
+ newTask->data[2] = (64 - GetBattlerSpriteCoord(battler, 3)) & 0xFF;
+ gBattle_BG3_X = newTask->data[1];
+ gBattle_BG3_Y = newTask->data[2];
+ newTask->data[3] = gBattleAnimArgs[2];
+ DestroyAnimVisualTask(taskId);
+}
+
+static void sub_81156D0(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ if (gBattleAnimArgs[7] == task->data[3])
+ {
+ gBattle_BG3_X = 0;
+ gBattle_BG3_Y = 0;
+ DestroyTask(taskId);
+ }
+ else
+ {
+ gBattle_BG3_X = task->data[1];
+ gBattle_BG3_Y = task->data[2];
+ }
+}
diff --git a/src/map_name_popup.c b/src/map_name_popup.c
index 172fcc723..ab52cb37e 100644
--- a/src/map_name_popup.c
+++ b/src/map_name_popup.c
@@ -15,7 +15,6 @@
#include "task.h"
#include "text.h"
-
// enums
enum MapPopUp_Themes
{
@@ -33,7 +32,7 @@ static void ShowMapNamePopUpWindow(void);
static void LoadMapNamePopUpWindowBg(void);
// EWRAM
-static EWRAM_DATA u8 mapNamePopupTaskId = 0;
+static EWRAM_DATA u8 sPopupTaskId = 0;
// .rodata
static const u8 gMapPopUp_Table[][960] =
@@ -202,7 +201,7 @@ bool8 sub_80D47D4(void)
{
HideStartMenu();
ShowMapNamePopup();
- return 1;
+ return TRUE;
}
void ShowMapNamePopup(void)
@@ -211,16 +210,16 @@ void ShowMapNamePopup(void)
{
if (!FuncIsActiveTask(Task_MapNamePopUpWindow))
{
- mapNamePopupTaskId = CreateTask(Task_MapNamePopUpWindow, 90);
+ sPopupTaskId = CreateTask(Task_MapNamePopUpWindow, 90);
SetGpuReg(REG_OFFSET_BG0VOFS, 40);
- gTasks[mapNamePopupTaskId].data[0] = 6;
- gTasks[mapNamePopupTaskId].data[2] = 40;
+ gTasks[sPopupTaskId].data[0] = 6;
+ gTasks[sPopupTaskId].data[2] = 40;
}
else
{
- if (gTasks[mapNamePopupTaskId].data[0] != 2)
- gTasks[mapNamePopupTaskId].data[0] = 2;
- gTasks[mapNamePopupTaskId].data[3] = 1;
+ if (gTasks[sPopupTaskId].data[0] != 2)
+ gTasks[sPopupTaskId].data[0] = 2;
+ gTasks[sPopupTaskId].data[3] = 1;
}
}
}
@@ -246,7 +245,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
{
task->data[2] = 0;
task->data[0] = 1;
- gTasks[mapNamePopupTaskId].data[1] = 0;
+ gTasks[sPopupTaskId].data[1] = 0;
}
break;
case 1:
@@ -293,7 +292,7 @@ void HideMapNamePopUpWindow(void)
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
RemoveMapNamePopUpWindow();
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
- DestroyTask(mapNamePopupTaskId);
+ DestroyTask(sPopupTaskId);
}
}
@@ -304,9 +303,9 @@ static void ShowMapNamePopUpWindow(void)
u8 x;
const u8* mapDisplayHeaderSource;
- if(InBattlePyramid())
+ if (InBattlePyramid())
{
- if(gMapHeader.mapLayoutId == 0x17A)
+ if (gMapHeader.mapLayoutId == 0x17A)
{
withoutPrefixPtr = &(mapDisplayHeader[3]);
mapDisplayHeaderSource = gBattlePyramid_MapHeaderStrings[7];
@@ -333,220 +332,47 @@ static void ShowMapNamePopUpWindow(void)
CopyWindowToVram(GetMapNamePopUpWindowId(), 3);
}
-#ifdef NONMATCHING
static void sub_80D4A78(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
{
s32 i;
- for(i=0; i<=11; i++)
+ for (i = 0; i < 12; i++)
{
- FillBgTilemapBufferRect(bg, 0x21D + i, x + i - 1, y - 1, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x21D + i, i - 1 + x, y - 1, 1, 1, 0xE);
}
- FillBgTilemapBufferRect(bg, 0x229 + i, x - 1, y, 1, 1, 0xE);
- FillBgTilemapBufferRect(bg, 0x22A + i, deltaX + x, y, 1, 1, 0xE);
- FillBgTilemapBufferRect(bg, 0x22B + i, x - 1, y + 1 , 1, 1, 0xE);
- FillBgTilemapBufferRect(bg, 0x22C + i, deltaX + x, y + 1, 1, 1, 0xE);
- FillBgTilemapBufferRect(bg, 0x22D + i, x - 1, y + 2, 1, 1, 0xE);
- FillBgTilemapBufferRect(bg, 0x22E + i, deltaX + x, y + 2, 1, 1, 0xE);
- for(i=0; i<=11; i++)
+ FillBgTilemapBufferRect(bg, 0x229, x - 1, y, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22A, deltaX + x, y, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22B, x - 1, y + 1 , 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22C, deltaX + x, y + 1, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22D, x - 1, y + 2, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22E, deltaX + x, y + 2, 1, 1, 0xE);
+ for (i = 0; i < 12; i++)
{
- FillBgTilemapBufferRect(bg, 0x22F + i, x + i - 1, y + deltaY, 1, 1, 0xE);
+ FillBgTilemapBufferRect(bg, 0x22F + i, i - 1 + x, y + deltaY, 1, 1, 0xE);
}
}
-#else
-NAKED
-static void sub_80D4A78(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
-{
- 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, 0x1C\n\
- ldr r4, [sp, 0x3C]\n\
- lsls r0, 24\n\
- lsrs r7, r0, 24\n\
- lsls r1, 24\n\
- lsrs r1, 24\n\
- mov r10, r1\n\
- lsls r2, 24\n\
- lsls r3, 24\n\
- lsrs r3, 24\n\
- str r3, [sp, 0x10]\n\
- lsls r4, 24\n\
- lsrs r4, 24\n\
- str r4, [sp, 0x14]\n\
- movs r5, 0\n\
- lsls r0, r1, 24\n\
- asrs r1, r0, 24\n\
- lsrs r3, r2, 24\n\
- str r3, [sp, 0xC]\n\
- movs r6, 0xFF\n\
- lsls r6, 24\n\
- adds r6, r2\n\
- mov r8, r6\n\
- str r0, [sp, 0x18]\n\
- subs r4, r1, 0x1\n\
- _080D4AB4:\n\
- ldr r0, =0x0000021d\n\
- adds r1, r5, r0\n\
- lsls r1, 16\n\
- lsrs r1, 16\n\
- lsls r2, r4, 24\n\
- lsrs r2, 24\n\
- movs r3, 0x1\n\
- str r3, [sp]\n\
- str r3, [sp, 0x4]\n\
- movs r6, 0xE\n\
- mov r9, r6\n\
- str r6, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- mov r6, r8\n\
- lsrs r3, r6, 24\n\
- bl FillBgTilemapBufferRect\n\
- adds r4, 0x1\n\
- adds r5, 0x1\n\
- cmp r5, 0xB\n\
- ble _080D4AB4\n\
- ldr r1, =0x00000229\n\
- movs r0, 0x1\n\
- negs r0, r0\n\
- add r0, r10\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- mov r8, r0\n\
- movs r5, 0x1\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r2, r9\n\
- str r2, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- mov r2, r8\n\
- ldr r3, [sp, 0xC]\n\
- bl FillBgTilemapBufferRect\n\
- ldr r1, =0x0000022a\n\
- ldr r6, [sp, 0x10]\n\
- add r6, r10\n\
- lsls r6, 24\n\
- lsrs r6, 24\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r3, r9\n\
- str r3, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- adds r2, r6, 0\n\
- ldr r3, [sp, 0xC]\n\
- bl FillBgTilemapBufferRect\n\
- ldr r1, =0x0000022b\n\
- ldr r4, [sp, 0xC]\n\
- adds r4, 0x1\n\
- lsls r4, 24\n\
- lsrs r4, 24\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r0, r9\n\
- str r0, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- mov r2, r8\n\
- adds r3, r4, 0\n\
- bl FillBgTilemapBufferRect\n\
- movs r1, 0x8B\n\
- lsls r1, 2\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r2, r9\n\
- str r2, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- adds r2, r6, 0\n\
- adds r3, r4, 0\n\
- bl FillBgTilemapBufferRect\n\
- ldr r1, =0x0000022d\n\
- ldr r4, [sp, 0xC]\n\
- adds r4, 0x2\n\
- lsls r4, 24\n\
- lsrs r4, 24\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r3, r9\n\
- str r3, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- mov r2, r8\n\
- adds r3, r4, 0\n\
- bl FillBgTilemapBufferRect\n\
- ldr r1, =0x0000022e\n\
- str r5, [sp]\n\
- str r5, [sp, 0x4]\n\
- mov r0, r9\n\
- str r0, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- adds r2, r6, 0\n\
- adds r3, r4, 0\n\
- bl FillBgTilemapBufferRect\n\
- movs r5, 0\n\
- ldr r1, [sp, 0xC]\n\
- ldr r2, [sp, 0x14]\n\
- adds r0, r1, r2\n\
- lsls r4, r0, 24\n\
- movs r6, 0x1\n\
- _080D4B8A:\n\
- ldr r3, =0x0000022f\n\
- adds r1, r5, r3\n\
- lsls r1, 16\n\
- lsrs r1, 16\n\
- subs r0, r5, 0x1\n\
- ldr r3, [sp, 0x18]\n\
- asrs r2, r3, 24\n\
- adds r2, r0\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- str r6, [sp]\n\
- str r6, [sp, 0x4]\n\
- movs r0, 0xE\n\
- str r0, [sp, 0x8]\n\
- adds r0, r7, 0\n\
- lsrs r3, r4, 24\n\
- bl FillBgTilemapBufferRect\n\
- adds r5, 0x1\n\
- cmp r5, 0xB\n\
- ble _080D4B8A\n\
- add sp, 0x1C\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
static void LoadMapNamePopUpWindowBg(void)
{
- u8 popupWindowId;
- u16 regionMapSectionId;
u8 popUpThemeId;
+ u8 popupWindowId = GetMapNamePopUpWindowId();
+ u16 regionMapSectionId = gMapHeader.regionMapSectionId;
- popupWindowId = GetMapNamePopUpWindowId();
- regionMapSectionId = gMapHeader.regionMapSectionId;
- if(regionMapSectionId > MAPSEC_DYNAMIC)
+ if (regionMapSectionId > MAPSEC_DYNAMIC)
{
- if(regionMapSectionId > MAPSEC_SPECIAL_AREA)
+ if (regionMapSectionId > MAPSEC_SPECIAL_AREA)
regionMapSectionId -= (MAPSEC_SPECIAL_AREA - MAPSEC_DYNAMIC);
else
- regionMapSectionId = 0; //discard kanto region sections
+ regionMapSectionId = 0; // Discard kanto region sections;
}
popUpThemeId = gRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId];
- LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), &(gMapPopUp_Outline_Table[popUpThemeId][0]), 0x400, 0x21D);
+ LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), gMapPopUp_Outline_Table[popUpThemeId], 0x400, 0x21D);
CallWindowFunction(popupWindowId, sub_80D4A78);
PutWindowTilemap(popupWindowId);
if(gMapHeader.weather == WEATHER_BUBBLES)
LoadPalette(&gUnknown_0857F444, 0xE0, 0x20);
else
- LoadPalette(&(gMapPopUp_Palette_Table[popUpThemeId][0]), 0xE0, 0x20);
- BlitBitmapToWindow(popupWindowId, &(gMapPopUp_Table[popUpThemeId][0]), 0, 0, 80, 24);
+ LoadPalette(gMapPopUp_Palette_Table[popUpThemeId], 0xE0, 0x20);
+ BlitBitmapToWindow(popupWindowId, gMapPopUp_Table[popUpThemeId], 0, 0, 80, 24);
}
diff --git a/src/poison.c b/src/poison.c
index f0d8ec553..efa89ec13 100644
--- a/src/poison.c
+++ b/src/poison.c
@@ -1,14 +1,19 @@
#include "global.h"
#include "battle_anim.h"
+#include "trig.h"
#include "constants/rgb.h"
extern void sub_80A77C8(struct Sprite *);
-extern void sub_810DBAC(struct Sprite *);
-extern void sub_810DC2C(struct Sprite *);
-extern void sub_810DCD0(struct Sprite *);
-extern void sub_810DD50(struct Sprite *);
-extern void sub_810DDC4(struct Sprite *);
-extern void sub_810DDC4(struct Sprite *);
+
+void sub_810DBAC(struct Sprite *);
+void sub_810DC2C(struct Sprite *);
+void sub_810DCD0(struct Sprite *);
+void sub_810DD50(struct Sprite *);
+void AnimBubbleEffect(struct Sprite *);
+static void sub_810DC10(struct Sprite *);
+static void sub_810DCB4(struct Sprite *);
+static void sub_810DD24(struct Sprite *);
+static void AnimBubbleEffectStep(struct Sprite *);
extern const union AnimCmd *const gUnknown_08595200[];
@@ -170,7 +175,7 @@ const struct SpriteTemplate gPoisonBubbleSpriteTemplate =
.anims = gUnknown_08596164,
.images = NULL,
.affineAnims = gUnknown_0859623C,
- .callback = sub_810DDC4,
+ .callback = AnimBubbleEffect,
};
const struct SpriteTemplate gWaterBubbleSpriteTemplate =
@@ -181,5 +186,138 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate =
.anims = gUnknown_08595200,
.images = NULL,
.affineAnims = gUnknown_0859623C,
- .callback = sub_810DDC4,
+ .callback = AnimBubbleEffect,
};
+
+void sub_810DBAC(struct Sprite *sprite)
+{
+ if (!gBattleAnimArgs[3])
+ StartSpriteAnim(sprite, 2);
+
+ InitAnimSpritePos(sprite, 1);
+
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
+ sprite->data[5] = -30;
+
+ InitAnimArcTranslation(sprite);
+
+ sprite->callback = sub_810DC10;
+}
+
+static void sub_810DC10(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ DestroyAnimSprite(sprite);
+}
+
+void sub_810DC2C(struct Sprite *sprite)
+{
+ s16 l1, l2;
+ if (!gBattleAnimArgs[3])
+ StartSpriteAnim(sprite, 2);
+
+ InitAnimSpritePos(sprite, 1);
+ SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2);
+
+ if (GetBattlerSide(gBattleAnimAttacker))
+ gBattleAnimArgs[4] = -gBattleAnimArgs[4];
+
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[2] = l1 + gBattleAnimArgs[4];
+ sprite->data[4] = l2 + gBattleAnimArgs[5];
+ sprite->data[5] = -30;
+
+ InitAnimArcTranslation(sprite);
+
+ sprite->callback = sub_810DCB4;
+}
+
+static void sub_810DCB4(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ DestroyAnimSprite(sprite);
+}
+
+void sub_810DCD0(struct Sprite *sprite)
+{
+ sprite->data[0] = gBattleAnimArgs[2];
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[0];
+ sprite->data[3] = sprite->pos1.y;
+ sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[1];
+
+ InitSpriteDataForLinearTranslation(sprite);
+
+ sprite->data[5] = sprite->data[1] / gBattleAnimArgs[2];
+ sprite->data[6] = sprite->data[2] / gBattleAnimArgs[2];
+
+ sprite->callback = sub_810DD24;
+}
+
+static void sub_810DD24(struct Sprite *sprite)
+{
+ sub_80A656C(sprite);
+
+ sprite->data[1] -= sprite->data[5];
+ sprite->data[2] -= sprite->data[6];
+
+ if (!sprite->data[0])
+ DestroyAnimSprite(sprite);
+}
+
+void sub_810DD50(struct Sprite *sprite)
+{
+ SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
+
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+
+ sprite->pos1.x += gBattleAnimArgs[0];
+ sprite->pos1.y += gBattleAnimArgs[1];
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
+ sprite->data[4] = sprite->pos1.y + sprite->data[0];
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+// Animates a bubble by rising upward, swaying side to side, and
+// enlarging the sprite. This is used as an after-effect by poison-type
+// moves, along with MOVE_BUBBLE, and MOVE_BUBBLEBEAM.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: 0 = single-target, 1 = multi-target
+void AnimBubbleEffect(struct Sprite *sprite)
+{
+ if (!gBattleAnimArgs[2])
+ {
+ sub_80A6980(sprite, TRUE);
+ }
+ else
+ {
+ SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
+
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ gBattleAnimArgs[0] = -gBattleAnimArgs[0];
+
+ sprite->pos1.x += gBattleAnimArgs[0];
+ sprite->pos1.y += gBattleAnimArgs[1];
+ }
+
+ sprite->callback = AnimBubbleEffectStep;
+}
+
+static void AnimBubbleEffectStep(struct Sprite *sprite)
+{
+ sprite->data[0] = (sprite->data[0] + 0xB) & 0xFF;
+ sprite->pos2.x = Sin(sprite->data[0], 4);
+ sprite->data[1] += 0x30;
+ sprite->pos2.y = -(sprite->data[1] >> 8);
+
+ if (sprite->affineAnimEnded)
+ DestroyAnimSprite(sprite);
+}
diff --git a/src/pokeball.c b/src/pokeball.c
index 09e7ac639..ad839e6af 100644
--- a/src/pokeball.c
+++ b/src/pokeball.c
@@ -402,7 +402,7 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
gSprites[ballSpriteId].data[2] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_X);
gSprites[ballSpriteId].data[4] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_Y) - 16;
gSprites[ballSpriteId].data[5] = -40;
- sub_80A68D4(&gSprites[ballSpriteId]);
+ InitAnimArcTranslation(&gSprites[ballSpriteId]);
gSprites[ballSpriteId].oam.affineParam = taskId;
gTasks[taskId].tOpponentBattler = gBattlerTarget;
gTasks[taskId].func = TaskDummy;
@@ -898,7 +898,7 @@ static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite)
sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, 3) + 24;
sprite->data[5] = -30;
sprite->oam.affineParam = sprite->sBattler;
- sub_80A68D4(sprite);
+ InitAnimArcTranslation(sprite);
sprite->callback = SpriteCB_PlayerMonSendOut_2;
}
diff --git a/src/pokedex.c b/src/pokedex.c
index 1405393c1..66a68f0bd 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "battle_main.h"
#include "bg.h"
#include "data2.h"
#include "decompress.h"
@@ -87,35 +88,6 @@ struct UnknownStruct4
u8 unk9;
};
-//TO BE CONVERTED TO C
-
-extern const u8 gUnknown_0855D30C[];
-extern struct BgTemplate gUnknown_0856E630[];
-extern struct WindowTemplate gUnknown_0856E640[];
-extern const u16 gUnknown_0856E610[16];
-extern const struct PokedexEntry gPokedexEntries[];
-extern struct BgTemplate gUnknown_0856E668[];
-extern struct WindowTemplate gUnknown_0856E670[];
-extern const u8 *gMonFootprintTable[];
-extern u8 gUnknown_0856ED08[][4];
-extern struct BgTemplate gUnknown_0856EFF8[];
-extern struct WindowTemplate gUnknown_0856F008[];
-extern const u8 gUnknown_0856ED9C[][4];
-extern const u8 gUnknown_0856EDB8[][4];
-extern const u8 gUnknown_0856EDD4[][4];
-extern const u8 gUnknown_0856EDF0[][4];
-extern const struct UnknownStruct1 gUnknown_0856EFC8[];
-extern const struct UnknownStruct3 gUnknown_0856ED30[];
-extern const struct UnknownStruct4 gUnknown_0856ED48[];
-extern const struct UnknownStruct2 gUnknown_0856EE0C[];
-extern const struct UnknownStruct2 gUnknown_0856EE5C[];
-extern const struct UnknownStruct2 gUnknown_0856EEB4[];
-extern const struct UnknownStruct2 gUnknown_0856EF14[];
-extern const struct UnknownStruct2 gUnknown_0856EE24[];
-extern const u8 gUnknown_0856EFAC[];
-extern const u8 gUnknown_0856EFAE[];
-extern const u8 gUnknown_0856EFB4[];
-
#define HOENN_DEX_COUNT 202
#define NATIONAL_DEX_COUNT 386
@@ -654,7 +626,7 @@ static const union AnimCmd *const sSpriteAnimTable_855D190[] =
sSpriteAnim_855D10C
};
-const struct SpriteTemplate gUnknown_0855D194 =
+static const struct SpriteTemplate gUnknown_0855D194 =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -665,7 +637,7 @@ const struct SpriteTemplate gUnknown_0855D194 =
.callback = sub_80BE604,
};
-const struct SpriteTemplate gUnknown_0855D1AC =
+static const struct SpriteTemplate gUnknown_0855D1AC =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -676,7 +648,7 @@ const struct SpriteTemplate gUnknown_0855D1AC =
.callback = sub_80BE658,
};
-const struct SpriteTemplate gUnknown_0855D1C4 =
+static const struct SpriteTemplate gUnknown_0855D1C4 =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -687,7 +659,7 @@ const struct SpriteTemplate gUnknown_0855D1C4 =
.callback = sub_80BE758,
};
-const struct SpriteTemplate gUnknown_0855D1DC =
+static const struct SpriteTemplate gUnknown_0855D1DC =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -698,7 +670,7 @@ const struct SpriteTemplate gUnknown_0855D1DC =
.callback = sub_80BE780,
};
-const struct SpriteTemplate gUnknown_0855D1F4 =
+static const struct SpriteTemplate gUnknown_0855D1F4 =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -709,7 +681,7 @@ const struct SpriteTemplate gUnknown_0855D1F4 =
.callback = sub_80BE44C,
};
-const struct SpriteTemplate gUnknown_0855D20C =
+static const struct SpriteTemplate gUnknown_0855D20C =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -720,7 +692,7 @@ const struct SpriteTemplate gUnknown_0855D20C =
.callback = sub_80BE44C,
};
-const struct SpriteTemplate gUnknown_0855D224 =
+static const struct SpriteTemplate gUnknown_0855D224 =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -731,7 +703,7 @@ const struct SpriteTemplate gUnknown_0855D224 =
.callback = sub_80BE44C,
};
-const struct SpriteTemplate gUnknown_0855D23C =
+static const struct SpriteTemplate gUnknown_0855D23C =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -742,7 +714,7 @@ const struct SpriteTemplate gUnknown_0855D23C =
.callback = sub_80BE44C,
};
-const struct SpriteTemplate gUnknown_0855D254 =
+static const struct SpriteTemplate gUnknown_0855D254 =
{
.tileTag = 4096,
.paletteTag = 4096,
@@ -753,22 +725,22 @@ const struct SpriteTemplate gUnknown_0855D254 =
.callback = sub_80BE834,
};
-const struct CompressedSpriteSheet gSpriteSheets_0855D26C[] =
+static const struct CompressedSpriteSheet gSpriteSheets_0855D26C[] =
{
{gPokedexMenu2_Gfx, 0x2000, 4096},
{0}
};
-const struct SpritePalette gSpritePalettes_0855D26C[] =
+static const struct SpritePalette gSpritePalettes_0855D26C[] =
{
{gPokedexText_Pal, 4096},
{0}
};
-const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20};
-const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1};
+static const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20};
+static const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1};
-const struct BgTemplate gBgTemplates_0855D298[] =
+static const struct BgTemplate gBgTemplates_0855D298[] =
{
{
.bg = 0,
@@ -808,15 +780,447 @@ const struct BgTemplate gBgTemplates_0855D298[] =
}
};
-const struct WindowTemplate sWindowTemplates_0855D2A8[] =
+static const struct WindowTemplate sWindowTemplates_0855D2A8[] =
{
- {2, 0, 0, 0x20, 0x20, 0, 1},
+ {
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 0,
+ .width = 32,
+ .height = 32,
+ .paletteNum = 0,
+ .baseBlock = 1,
+ },
DUMMY_WIN_TEMPLATE
};
-const u8 gUnknown_0855D2B8[] = _("{NO}000");
-const u8 gUnknown_0855D2BE[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp");
-const u8 sText_TenDashes[] = _("----------");
+static const u8 gUnknown_0855D2B8[] = _("{NO}000");
+static const u8 gUnknown_0855D2BE[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp");
+static const u8 sText_TenDashes[] = _("----------");
+
+ALIGNED(4) static const u8 gExpandedPlaceholder_PokedexDescription[] = _("");
+
+#include "data/pokemon/pokedex_text.h"
+#include "data/pokemon/pokedex_entries.h"
+
+static const u16 gUnknown_0856E610[] = INCBIN_U16("graphics/pokedex/black.gbapal");
+
+static const struct BgTemplate gUnknown_0856E630[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 12,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 13,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 14,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 15,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ }
+};
+
+static const struct WindowTemplate gUnknown_0856E640[] =
+{
+ {
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 0,
+ .width = 32,
+ .height = 20,
+ .paletteNum = 0,
+ .baseBlock = 0x0001,
+ },
+ {
+ .bg = 2,
+ .tilemapLeft = 25,
+ .tilemapTop = 8,
+ .width = 2,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x0281,
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 0,
+ .tilemapTop = 12,
+ .width = 32,
+ .height = 7,
+ .paletteNum = 8,
+ .baseBlock = 0x0285,
+ },
+ {
+ .bg = 2,
+ .tilemapLeft = 18,
+ .tilemapTop = 3,
+ .width = 10,
+ .height = 8,
+ .paletteNum = 9,
+ .baseBlock = 0x0365,
+ },
+ DUMMY_WIN_TEMPLATE
+};
+
+static const struct BgTemplate gUnknown_0856E668[] =
+{
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 14,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 15,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ },
+};
+
+static const struct WindowTemplate gUnknown_0856E670[] =
+{
+ {
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 0,
+ .width = 32,
+ .height = 20,
+ .paletteNum = 0,
+ .baseBlock = 0x0001,
+ },
+ {
+ .bg = 2,
+ .tilemapLeft = 25,
+ .tilemapTop = 8,
+ .width = 2,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x0281,
+ },
+ DUMMY_WIN_TEMPLATE
+};
+
+static const u8 sText_TenDashes2[] = _("----------");
+
+#include "data/pokemon_graphics/footprint_table.h"
+
+static const u8 gUnknown_0856ED08[][4] =
+{
+ {0x00, 0x00, 0x00, 0x00},
+ {0xbb, 0x03, 0xd5, 0x03},
+ {0xbe, 0x03, 0xd8, 0x03},
+ {0xc1, 0x03, 0xdb, 0x03},
+ {0xc4, 0x03, 0xde, 0x03},
+ {0xc7, 0x03, 0xe1, 0x03},
+ {0xca, 0x03, 0xe4, 0x03},
+ {0xcd, 0x03, 0xe7, 0x03},
+ {0xd0, 0x03, 0xea, 0x03},
+ {0xd3, 0x02, 0xed, 0x02},
+};
+
+static const struct UnknownStruct3 gUnknown_0856ED30[] =
+{
+ {
+ .text = gUnknown_085E87A5,
+ .unk4 = 0,
+ .unk5 = 0,
+ .unk6 = 5,
+ },
+ {
+ .text = gUnknown_085E87D6,
+ .unk4 = 6,
+ .unk5 = 0,
+ .unk6 = 5,
+ },
+ {
+ .text = gUnknown_085E87EF,
+ .unk4 = 12,
+ .unk5 = 0,
+ .unk6 = 5,
+ },
+};
+
+static const struct UnknownStruct4 gUnknown_0856ED48[] =
+{
+ {
+ .text = gUnknown_085E8840,
+ .unk4 = 0,
+ .unk5 = 2,
+ .unk6 = 5,
+ .unk7 = 5,
+ .unk8 = 2,
+ .unk9 = 12,
+ },
+ {
+ .text = gUnknown_085E887C,
+ .unk4 = 0,
+ .unk5 = 4,
+ .unk6 = 5,
+ .unk7 = 5,
+ .unk8 = 4,
+ .unk9 = 12,
+ },
+ {
+ .text = gUnknown_085E88A6,
+ .unk4 = 0,
+ .unk5 = 6,
+ .unk6 = 5,
+ .unk7 = 5,
+ .unk8 = 6,
+ .unk9 = 6,
+ },
+ {
+ .text = gUnknown_085E88A6,
+ .unk4 = 0,
+ .unk5 = 6,
+ .unk6 = 5,
+ .unk7 = 11,
+ .unk8 = 6,
+ .unk9 = 6,
+ },
+ {
+ .text = gUnknown_085E881F,
+ .unk4 = 0,
+ .unk5 = 8,
+ .unk6 = 5,
+ .unk7 = 5,
+ .unk8 = 8,
+ .unk9 = 12,
+ },
+ {
+ .text = gUnknown_085E8806,
+ .unk4 = 0,
+ .unk5 = 10,
+ .unk6 = 5,
+ .unk7 = 5,
+ .unk8 = 10,
+ .unk9 = 12,
+ },
+ {
+ .text = gUnknown_085E88C8,
+ .unk4 = 0,
+ .unk5 = 12,
+ .unk6 = 5,
+ .unk7 = 0,
+ .unk8 = 0,
+ .unk9 = 0,
+ },
+};
+
+static const u8 gUnknown_0856ED9C[][4] =
+{
+ {0xFF, 0xFF, 0xFF, 1},
+ {0xFF, 0xFF, 0, 2},
+ {0xFF, 3, 1, 4},
+ { 2, 0xFF, 1, 4},
+ {0xFF, 0xFF, 2, 5},
+ {0xFF, 0xFF, 4, 6},
+ {0xFF, 0xFF, 5, 0xFF},
+};
+
+static const u8 gUnknown_0856EDB8[][4] =
+{
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 5},
+ {0xFF, 0xFF, 4, 6},
+ {0xFF, 0xFF, 5, 0xFF},
+};
+
+static const u8 gUnknown_0856EDD4[][4] =
+{
+ {0xFF, 0xFF, 0xFF, 1},
+ {0xFF, 0xFF, 0, 2},
+ {0xFF, 3, 1, 4},
+ { 2, 0xFF, 1, 4},
+ {0xFF, 0xFF, 2, 6},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 4, 0xFF},
+};
+
+static const u8 gUnknown_0856EDF0[][4] =
+{
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 0xFF, 6},
+ {0xFF, 0xFF, 0xFF, 0xFF},
+ {0xFF, 0xFF, 4, 0xFF},
+};
+
+static const struct UnknownStruct2 gUnknown_0856EE0C[] =
+{
+ {gUnknown_085E89A4, gUnknown_085E88DF},
+ {gUnknown_085E89BB, gUnknown_085E88E9},
+ {NULL, NULL},
+};
+
+static const struct UnknownStruct2 gUnknown_0856EE24[] =
+{
+ {gUnknown_085E89D4, gUnknown_085E88F6},
+ {gUnknown_085E8A02, gUnknown_085E8905},
+ {gUnknown_085E8A37, gUnknown_085E8911},
+ {gUnknown_085E8A73, gUnknown_085E891F},
+ {gUnknown_085E8AAF, gUnknown_085E892D},
+ {gUnknown_085E8AEA, gUnknown_085E893A},
+ {NULL, NULL},
+};
+
+static const struct UnknownStruct2 gUnknown_0856EE5C[] =
+{
+ {gUnknown_085E8B25, gUnknown_085E8B26},
+ {gUnknown_085E8B25, gUnknown_085E8948},
+ {gUnknown_085E8B25, gUnknown_085E894C},
+ {gUnknown_085E8B25, gUnknown_085E8950},
+ {gUnknown_085E8B25, gUnknown_085E8954},
+ {gUnknown_085E8B25, gUnknown_085E8958},
+ {gUnknown_085E8B25, gUnknown_085E895C},
+ {gUnknown_085E8B25, gUnknown_085E8960},
+ {gUnknown_085E8B25, gUnknown_085E8964},
+ {gUnknown_085E8B25, gUnknown_085E8968},
+ {NULL, NULL},
+};
+
+static const struct UnknownStruct2 gUnknown_0856EEB4[] =
+{
+ {gUnknown_085E8B25, gUnknown_085E8B26},
+ {gUnknown_085E8B25, gUnknown_085E896B},
+ {gUnknown_085E8B25, gUnknown_085E896F},
+ {gUnknown_085E8B25, gUnknown_085E8974},
+ {gUnknown_085E8B25, gUnknown_085E897B},
+ {gUnknown_085E8B25, gUnknown_085E8981},
+ {gUnknown_085E8B25, gUnknown_085E8987},
+ {gUnknown_085E8B25, gUnknown_085E898D},
+ {gUnknown_085E8B25, gUnknown_085E8994},
+ {gUnknown_085E8B25, gUnknown_085E8999},
+ {gUnknown_085E8B25, gUnknown_085E899F},
+ {NULL, NULL},
+};
+
+static const struct UnknownStruct2 gUnknown_0856EF14[] =
+{
+ {gUnknown_085E8B25, gUnknown_085E8B35},
+ {gUnknown_085E8B25, gTypeNames[TYPE_NORMAL]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_FIGHTING]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_FLYING]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_POISON]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_GROUND]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_ROCK]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_BUG]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_GHOST]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_STEEL]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_FIRE]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_WATER]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_GRASS]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_ELECTRIC]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_PSYCHIC]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_ICE]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_DRAGON]},
+ {gUnknown_085E8B25, gTypeNames[TYPE_DARK]},
+ {NULL, NULL},
+};
+
+static const u8 gUnknown_0856EFAC[] = {0x00, 0x01};
+static const u8 gUnknown_0856EFAE[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
+static const u8 gUnknown_0856EFB4[] = {0xFF, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17};
+
+static const struct UnknownStruct1 gUnknown_0856EFC8[] =
+{
+ {gUnknown_0856EE5C, 6, 7, 10},
+ {gUnknown_0856EEB4, 8, 9, 11},
+ {gUnknown_0856EF14, 10,11, 18},
+ {gUnknown_0856EF14, 12, 13, 18},
+ {gUnknown_0856EE24, 4, 5, 6},
+ {gUnknown_0856EE0C, 2, 3, 2},
+};
+
+static const struct BgTemplate gUnknown_0856EFF8[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 12,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 13,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 14,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 15,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+static const struct WindowTemplate gUnknown_0856F008[] =
+{
+ {
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 0,
+ .width = 32,
+ .height = 20,
+ .paletteNum = 0,
+ .baseBlock = 0x0001,
+ },
+ DUMMY_WIN_TEMPLATE
+};
// .text
@@ -3514,7 +3918,7 @@ void sub_80C020C(u32 num, u32 value, u32 c, u32 d)
if (c)
text3 = gPokedexEntries[num].description;
else
- text3 = gUnknown_0855D30C;
+ text3 = gExpandedPlaceholder_PokedexDescription;
sub_80BE8DC(text3, GetStringCenterAlignXOffset(1, text3, 0xF0), 0x5F);
}
diff --git a/src/rock.c b/src/rock.c
index 83af52865..3b8e505d8 100644
--- a/src/rock.c
+++ b/src/rock.c
@@ -1,22 +1,37 @@
#include "global.h"
#include "battle_anim.h"
+#include "gpu_regs.h"
+#include "graphics.h"
+#include "palette.h"
+#include "sound.h"
+#include "task.h"
+#include "trig.h"
#include "constants/rgb.h"
-
-extern void sub_81109F0(struct Sprite *);
-extern void sub_8110AB4(struct Sprite *);
-extern void sub_8110B38(struct Sprite *);
-extern void sub_8110E4C(struct Sprite *);
-extern void sub_8110F30(struct Sprite *);
-extern void sub_811131C(struct Sprite *);
-extern void sub_8111388(struct Sprite *);
-extern void sub_8111418(struct Sprite *);
-extern void sub_8111444(struct Sprite *);
-extern void sub_80FF268(struct Sprite *);
-extern void sub_80A8EE4(struct Sprite *);
+#include "constants/songs.h"
extern const union AnimCmd *const gUnknown_085950E0[];
extern const union AnimCmd *const gUnknown_085954D0[];
+extern void AnimMoveTwisterParticle(struct Sprite *);
+
+void sub_81109F0(struct Sprite *);
+void sub_8110AB4(struct Sprite *);
+void AnimDirtParticleAcrossScreen(struct Sprite *);
+void AnimRaiseSprite(struct Sprite *);
+void sub_81110A4(u8 taskId);
+void sub_811131C(struct Sprite *);
+void sub_8111388(struct Sprite *);
+void sub_8111418(struct Sprite *);
+void sub_8111444(struct Sprite *);
+void sub_8110B38(struct Sprite *);
+static void sub_8110A70(struct Sprite *);
+static void sub_8110B80(struct Sprite *sprite);
+static void sub_8110CB0(u8 taskId);
+static void sub_8111214(struct Task *task);
+static u8 sub_811135C(void);
+static void sub_81113C8(struct Sprite *sprite);
+static void sub_811149C(struct Sprite *sprite);
+
const union AnimCmd gUnknown_08596AE0[] =
{
ANIMCMD_FRAME(32, 1),
@@ -118,7 +133,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596BA0 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8110E4C,
+ .callback = AnimDirtParticleAcrossScreen,
};
const struct Subsprite gUnknown_08596BB8[] =
@@ -194,7 +209,7 @@ const struct SpriteTemplate gUnknown_08596C10 =
.anims = gUnknown_08596BF8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
- .callback = sub_8110F30,
+ .callback = AnimRaiseSprite,
};
const struct SpriteTemplate gUnknown_08596C28 =
@@ -278,7 +293,7 @@ const struct SpriteTemplate gUnknown_08596CC8 =
.anims = gUnknown_08596C08,
.images = NULL,
.affineAnims = gUnknown_08596C90,
- .callback = sub_80FF268,
+ .callback = AnimMoveTwisterParticle,
};
const struct SpriteTemplate gUnknown_08596CE0 =
@@ -291,3 +306,573 @@ const struct SpriteTemplate gUnknown_08596CE0 =
.affineAnims = gUnknown_08596C90,
.callback = sub_80A8EE4,
};
+
+void sub_81109F0(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[3] != 0)
+ SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
+
+ sprite->pos1.x += gBattleAnimArgs[0];
+ sprite->pos1.y += 14;
+
+ StartSpriteAnim(sprite, gBattleAnimArgs[1]);
+ AnimateSprite(sprite);
+
+ sprite->data[0] = 0;
+ sprite->data[1] = 0;
+ sprite->data[2] = 4;
+ sprite->data[3] = 16;
+ sprite->data[4] = -70;
+ sprite->data[5] = gBattleAnimArgs[2];
+
+ StoreSpriteCallbackInData6(sprite, sub_8110A70);
+ sprite->callback = sub_80A6450;
+ sprite->callback(sprite);
+}
+
+static void sub_8110A70(struct Sprite *sprite)
+{
+ sprite->pos1.x += sprite->data[5];
+
+ sprite->data[0] = 192;
+ sprite->data[1] = sprite->data[5];
+ sprite->data[2] = 4;
+ sprite->data[3] = 32;
+ sprite->data[4] = -24;
+
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+ sprite->callback = sub_80A6450;
+ sprite->callback(sprite);
+}
+
+void sub_8110AB4(struct Sprite *sprite)
+{
+ StartSpriteAnim(sprite, gBattleAnimArgs[5]);
+ AnimateSprite(sprite);
+
+ if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ sprite->pos1.x -= gBattleAnimArgs[0];
+ else
+ sprite->pos1.x += gBattleAnimArgs[0];
+
+ sprite->pos1.y += gBattleAnimArgs[1];
+
+ sprite->data[0] = gBattleAnimArgs[4];
+ sprite->data[1] = sprite->pos1.x;
+ sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
+ sprite->data[3] = sprite->pos1.y;
+ sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
+
+ InitSpriteDataForLinearTranslation(sprite);
+ sprite->data[3] = 0;
+ sprite->data[4] = 0;
+
+ sprite->callback = sub_80A656C;
+ StoreSpriteCallbackInData6(sprite, move_anim_8074EE0);
+}
+
+void sub_8110B38(struct Sprite *sprite)
+{
+ if (gBattleAnimArgs[6] == 0)
+ InitAnimSpritePos(sprite, 0);
+ else
+ sub_80A6980(sprite, FALSE);
+
+ sprite->data[0] = gBattleAnimArgs[3];
+ sprite->data[1] = gBattleAnimArgs[2];
+ sprite->data[2] = gBattleAnimArgs[4];
+ sprite->data[3] = gBattleAnimArgs[5];
+
+ sprite->callback = sub_8110B80;
+}
+
+static void sub_8110B80(struct Sprite *sprite)
+{
+ sprite->data[4] += sprite->data[1];
+ sprite->pos2.y = -(sprite->data[4] >> 8);
+ sprite->pos2.x = Sin(sprite->data[5], sprite->data[3]);
+ sprite->data[5] = (sprite->data[5] + sprite->data[2]) & 0xFF;
+
+ if (--sprite->data[0] == -1)
+ {
+ DestroyAnimSprite(sprite);
+ }
+}
+
+void AnimTask_LoadSandstormBackground(u8 taskId)
+{
+ int var0;
+ struct UnknownAnimStruct2 unknownStruct;
+
+ var0 = 0;
+ SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
+ SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
+ SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
+ SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 0);
+
+ if (!IsContest())
+ SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
+
+ gBattle_BG1_X = 0;
+ gBattle_BG1_Y = 0;
+ SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
+ SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
+
+ sub_80A6B30(&unknownStruct);
+ sub_80A6CC0(unknownStruct.bgId, gUnknown_08D8D58C, unknownStruct.tilesOffset);
+ sub_80A6D60(&unknownStruct, gUnknown_08D8D410, 0);
+ LoadCompressedPalette(&gBattleAnimSpritePalette_261, unknownStruct.unk8 * 16, 32);
+
+ if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ var0 = 1;
+
+ gTasks[taskId].data[0] = var0;
+ gTasks[taskId].func = sub_8110CB0;
+}
+
+static void sub_8110CB0(u8 taskId)
+{
+ struct UnknownAnimStruct2 unknownStruct;
+
+ if (gTasks[taskId].data[0] == 0)
+ gBattle_BG1_X += -6;
+ else
+ gBattle_BG1_X += 6;
+
+ gBattle_BG1_Y += -1;
+
+ switch (gTasks[taskId].data[12])
+ {
+ case 0:
+ if (++gTasks[taskId].data[10] == 4)
+ {
+ gTasks[taskId].data[10] = 0;
+ gTasks[taskId].data[11]++;
+ SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
+ if (gTasks[taskId].data[11] == 7)
+ {
+ gTasks[taskId].data[12]++;
+ gTasks[taskId].data[11] = 0;
+ }
+ }
+ break;
+ case 1:
+ if (++gTasks[taskId].data[11] == 101)
+ {
+ gTasks[taskId].data[11] = 7;
+ gTasks[taskId].data[12]++;
+ }
+ break;
+ case 2:
+ if (++gTasks[taskId].data[10] == 4)
+ {
+ gTasks[taskId].data[10] = 0;
+ gTasks[taskId].data[11]--;
+ SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
+ if (gTasks[taskId].data[11] == 0)
+ {
+ gTasks[taskId].data[12]++;
+ gTasks[taskId].data[11] = 0;
+ }
+ }
+ break;
+ case 3:
+ sub_80A6B30(&unknownStruct);
+ sub_80A6C68(unknownStruct.bgId);
+ gTasks[taskId].data[12]++;
+ break;
+ case 4:
+ if (!IsContest())
+ SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
+
+ gBattle_BG1_X = 0;
+ gBattle_BG1_Y = 0;
+ SetGpuReg(REG_OFFSET_BLDCNT, 0);
+ SetGpuReg(REG_OFFSET_BLDALPHA, 0);
+ SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+// Animates the sprites that fly diagonally across the screen
+// in Sandstorm and Heat Wave.
+// arg 0: initial y pixel offset
+// arg 1: projectile speed
+// arg 2: y pixel drop
+// arg 3: ??? unknown (possibly a color bit)
+void AnimDirtParticleAcrossScreen(struct Sprite *sprite)
+{
+ if (sprite->data[0] == 0)
+ {
+ if (gBattleAnimArgs[3] != 0 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
+ {
+ sprite->pos1.x = 304;
+ gBattleAnimArgs[1] = -gBattleAnimArgs[1];
+ sprite->data[5] = 1;
+ sprite->oam.matrixNum = 8;
+ }
+ else
+ {
+ sprite->pos1.x = -64;
+ }
+
+ sprite->pos1.y = gBattleAnimArgs[0];
+ SetSubspriteTables(sprite, gUnknown_08596BC0);
+ sprite->data[1] = gBattleAnimArgs[1];
+ sprite->data[2] = gBattleAnimArgs[2];
+ sprite->data[0]++;
+ }
+ else
+ {
+ sprite->data[3] += sprite->data[1];
+ sprite->data[4] += sprite->data[2];
+ sprite->pos2.x += (sprite->data[3] >> 8);
+ sprite->pos2.y += (sprite->data[4] >> 8);
+ sprite->data[3] &= 0xFF;
+ sprite->data[4] &= 0xFF;
+
+ if (sprite->data[5] == 0)
+ {
+ if (sprite->pos1.x + sprite->pos2.x > 272)
+ {
+ sprite->callback = DestroyAnimSprite;
+ }
+ }
+ else if (sprite->pos1.x + sprite->pos2.x < -32)
+ {
+ sprite->callback = DestroyAnimSprite;
+ }
+ }
+}
+
+// Animates the rising rocks in Ancient Power.
+// arg 0: initial x pixel offset
+// arg 1: initial y pixel offset
+// arg 2: terminal y offset
+// arg 3: duration
+// arg 4: sprite size [1,5]
+void AnimRaiseSprite(struct Sprite *sprite)
+{
+ StartSpriteAnim(sprite, gBattleAnimArgs[4]);
+ InitAnimSpritePos(sprite, 0);
+
+ sprite->data[0] = gBattleAnimArgs[3];
+ sprite->data[2] = sprite->pos1.x;
+ sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[2];
+
+ sprite->callback = StartAnimLinearTranslation;
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+}
+
+void sub_8110F74(u8 taskId)
+{
+ u16 var0, var1, var2, var3;
+ u8 var4;
+ int var5;
+ s16 pan1, pan2;
+ struct Task *task;
+
+ task = &gTasks[taskId];
+
+ var0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
+ var1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 24;
+ var2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
+ var3 = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 24;
+
+ if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget)
+ var3 = var1;
+
+ var4 = sub_811135C();
+ if (var4 == 1)
+ task->data[8] = 32;
+ else
+ task->data[8] = 48 - (var4 * 8);
+
+ task->data[0] = 0;
+ task->data[11] = 0;
+ task->data[9] = 0;
+ task->data[12] = 1;
+
+ var5 = task->data[8];
+ if (var5 < 0)
+ var5 += 7;
+
+ task->data[10] = (var5 >> 3) - 1;
+
+ task->data[2] = var0 * 8;
+ task->data[3] = var1 * 8;
+ task->data[4] = ((var2 - var0) * 8) / task->data[8];
+ task->data[5] = ((var3 - var1) * 8) / task->data[8];
+ task->data[6] = 0;
+ task->data[7] = 0;
+
+ pan1 = BattleAnimAdjustPanning(-64);
+ pan2 = BattleAnimAdjustPanning(63);
+
+ task->data[13] = pan1;
+ task->data[14] = (pan2 - pan1) / task->data[8];
+ task->data[1] = var4;
+ task->data[15] = GetAnimBattlerSpriteId(0);
+
+ task->func = sub_81110A4;
+}
+
+void sub_81110A4(u8 taskId)
+{
+ struct Task *task;
+
+ task = &gTasks[taskId];
+
+ switch (task->data[0])
+ {
+ case 0:
+ task->data[6] -= task->data[4];
+ task->data[7] -= task->data[5];
+ gSprites[task->data[15]].pos2.x = task->data[6] >> 3;
+ gSprites[task->data[15]].pos2.y = task->data[7] >> 3;
+
+ if (++task->data[9] == 10)
+ {
+ task->data[11] = 20;
+ task->data[0]++;
+ }
+
+ PlaySE12WithPanning(SE_W029, task->data[13]);
+ break;
+ case 1:
+ if (--task->data[11] == 0)
+ task->data[0]++;
+ break;
+ case 2:
+ if (--task->data[9] != 0)
+ {
+ task->data[6] += task->data[4];
+ task->data[7] += task->data[5];
+ }
+ else
+ {
+ task->data[6] = 0;
+ task->data[7] = 0;
+ task->data[0]++;
+ }
+
+ gSprites[task->data[15]].pos2.x = task->data[6] >> 3;
+ gSprites[task->data[15]].pos2.y = task->data[7] >> 3;
+ break;
+ case 3:
+ task->data[2] += task->data[4];
+ task->data[3] += task->data[5];
+ if (++task->data[9] >= task->data[10])
+ {
+ task->data[9] = 0;
+ sub_8111214(task);
+ task->data[13] += task->data[14];
+ PlaySE12WithPanning(SE_W091, task->data[13]);
+ }
+
+ if (--task->data[8] == 0)
+ {
+ task->data[0]++;
+ }
+ break;
+ case 4:
+ if (task->data[11] == 0)
+ DestroyAnimVisualTask(taskId);
+ break;
+ }
+}
+
+static void sub_8111214(struct Task *task)
+{
+ const struct SpriteTemplate *spriteTemplate;
+ int var0;
+ u16 x, y;
+ u8 spriteId;
+
+ switch (task->data[1])
+ {
+ case 1:
+ spriteTemplate = &gUnknown_08596C28;
+ var0 = 0;
+ break;
+ case 2:
+ case 3:
+ spriteTemplate = &gUnknown_08596C40;
+ var0 = 80;
+ break;
+ case 4:
+ spriteTemplate = &gUnknown_08596C40;
+ var0 = 64;
+ break;
+ case 5:
+ spriteTemplate = &gUnknown_08596C40;
+ var0 = 48;
+ break;
+ default:
+ return;
+ }
+
+ x = task->data[2] >> 3;
+ y = task->data[3] >> 3;
+ x += (task->data[12] * 4);
+
+ spriteId = CreateSprite(spriteTemplate, x, y, 35);
+ if (spriteId != MAX_SPRITES)
+ {
+ gSprites[spriteId].data[0] = 18;
+ gSprites[spriteId].data[2] = ((task->data[12] * 20) + x) + (task->data[1] * 3);
+ gSprites[spriteId].data[4] = y;
+ gSprites[spriteId].data[5] = -16 - (task->data[1] * 2);
+ gSprites[spriteId].oam.tileNum += var0;
+
+ InitAnimArcTranslation(&gSprites[spriteId]);
+ task->data[11]++;
+ }
+
+ task->data[12] *= -1;
+}
+
+void sub_811131C(struct Sprite *sprite)
+{
+ if (TranslateAnimArc(sprite))
+ {
+ u8 taskId = FindTaskIdByFunc(sub_81110A4);
+ if (taskId != 0xFF)
+ gTasks[taskId].data[11]--;
+
+ DestroySprite(sprite);
+ }
+}
+
+static u8 sub_811135C(void)
+{
+ u8 retVal = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer;
+ u8 var0 = retVal - 1;
+ if (var0 > 4)
+ retVal = 1;
+
+ return retVal;
+}
+
+void sub_8111388(struct Sprite *sprite)
+{
+ StartSpriteAnim(sprite, gBattleAnimArgs[4]);
+
+ sprite->pos2.x = gBattleAnimArgs[0];
+ sprite->data[2] = gBattleAnimArgs[1];
+ sprite->data[3] -= gBattleAnimArgs[2];
+ sprite->data[0] = 3;
+ sprite->data[1] = gBattleAnimArgs[3];
+ sprite->callback = sub_81113C8;
+ sprite->invisible = 1;
+}
+
+static void sub_81113C8(struct Sprite *sprite)
+{
+ sprite->invisible = 0;
+ if (sprite->data[3] != 0)
+ {
+ sprite->pos2.y = sprite->data[2] + sprite->data[3];
+ sprite->data[3] += sprite->data[0];
+ sprite->data[0]++;
+ if (sprite->data[3] > 0)
+ {
+ sprite->data[3] = 0;
+ }
+ }
+ else
+ {
+ if (--sprite->data[1] == 0)
+ DestroyAnimSprite(sprite);
+ }
+}
+
+void sub_8111418(struct Sprite *sprite)
+{
+ if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
+ StartSpriteAffineAnim(sprite, 1);
+
+ TranslateAnimSpriteToTargetMonLocation(sprite);
+}
+
+void sub_8111444(struct Sprite *sprite)
+{
+ sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
+ sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
+ sprite->pos1.x += gBattleAnimArgs[0];
+ sprite->pos1.y += gBattleAnimArgs[1];
+
+ sprite->data[1] = gBattleAnimArgs[0];
+ sprite->data[2] = gBattleAnimArgs[1];
+ sprite->data[5] = gBattleAnimArgs[2];
+
+ StartSpriteAnim(sprite, gBattleAnimArgs[3]);
+ sprite->callback = sub_811149C;
+}
+
+static void sub_811149C(struct Sprite *sprite)
+{
+ sprite->data[0] += 8;
+ sprite->data[3] += sprite->data[1];
+ sprite->data[4] += sprite->data[2];
+
+ sprite->pos2.x += sprite->data[3] / 40;
+ sprite->pos2.y -= Sin(sprite->data[0], sprite->data[5]);
+
+ if (sprite->data[0] > 140)
+ DestroyAnimSprite(sprite);
+}
+
+void AnimTask_GetSeismicTossDamageLevel(u8 taskId)
+{
+ if (gAnimMoveDmg < 33)
+ gBattleAnimArgs[7] = 0;
+ if ((u32)gAnimMoveDmg - 33 < 33)
+ gBattleAnimArgs[7] = 1;
+ if (gAnimMoveDmg > 65)
+ gBattleAnimArgs[7] = 2;
+
+ DestroyAnimVisualTask(taskId);
+}
+
+void sub_811152C(u8 taskId)
+{
+ if (gTasks[taskId].data[0] == 0)
+ {
+ sub_80A6DAC(0);
+ gTasks[taskId].data[1] = 200;
+ }
+
+ gBattle_BG3_Y += gTasks[taskId].data[1] / 10;
+ gTasks[taskId].data[1] -= 3;
+
+ if (gTasks[taskId].data[0] == 120)
+ {
+ sub_80A6DAC(1);
+ DestroyAnimVisualTask(taskId);
+ }
+
+ gTasks[taskId].data[0]++;
+}
+
+void sub_8111590(u8 taskId)
+{
+ if (gTasks[taskId].data[0] == 0)
+ {
+ sub_80A6DAC(0);
+ gTasks[taskId].data[0]++;
+ gTasks[taskId].data[2] = gBattle_BG3_Y;
+ }
+
+ gTasks[taskId].data[1] += 80;
+ gTasks[taskId].data[1] &= 0xFF;
+ gBattle_BG3_Y = gTasks[taskId].data[2] + Cos(4, gTasks[taskId].data[1]);
+
+ if (gBattleAnimArgs[7] == 0xFFF)
+ {
+ gBattle_BG3_Y = 0;
+ sub_80A6DAC(1);
+ DestroyAnimVisualTask(taskId);
+ }
+}
diff --git a/src/rom_8011DC0.c b/src/rom_8011DC0.c
index bf16a20fc..b7ca087fd 100644
--- a/src/rom_8011DC0.c
+++ b/src/rom_8011DC0.c
@@ -1784,7 +1784,7 @@ void sub_801440C(u8 taskId)
ScriptContext2_Disable();
}
-extern u8 gUnknown_0203CEF8[];
+extern u8 gSelectedOrderFromParty[];
void sub_8014790(u8 taskId)
{
@@ -1802,8 +1802,8 @@ void sub_8014790(u8 taskId)
gLinkPlayers[0].linkType = 0x2211;
gLinkPlayers[0].id = 0;
gLinkPlayers[1].id = 2;
- sendBuff[0] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[0] - 1], MON_DATA_SPECIES);
- sendBuff[1] = GetMonData(&gPlayerParty[gUnknown_0203CEF8[1] - 1], MON_DATA_SPECIES, NULL);
+ sendBuff[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES);
+ sendBuff[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL);
gMain.savedCallback = NULL;
data[0] = 4;
sub_800E3A8();
diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c
new file mode 100755
index 000000000..7fc61f953
--- /dev/null
+++ b/src/script_pokemon_util_80F87D8.c
@@ -0,0 +1,707 @@
+#include "global.h"
+#include "battle.h"
+#include "battle_gfx_sfx_util.h"
+#include "berry.h"
+#include "contest.h"
+#include "contest_link_80F57C4.h"
+#include "contest_painting.h"
+#include "daycare.h"
+#include "decompress.h"
+#include "event_data.h"
+#include "event_object_movement.h"
+#include "international_string_util.h"
+#include "link.h"
+#include "link_rfu.h"
+#include "main.h"
+#include "menu.h"
+#include "overworld.h"
+#include "palette.h"
+#include "party_menu.h"
+#include "pokedex.h"
+#include "pokemon.h"
+#include "random.h"
+#include "script.h"
+#include "script_menu.h"
+#include "sprite.h"
+#include "string_util.h"
+#include "tv.h"
+#include "constants/event_objects.h"
+#include "constants/items.h"
+#include "constants/species.h"
+#include "constants/vars.h"
+
+extern const u16 gEventObjectPalette8[];
+extern const u16 gEventObjectPalette17[];
+extern const u16 gEventObjectPalette33[];
+extern const u16 gEventObjectPalette34[];
+extern const struct CompressedSpriteSheet gMonFrontPicTable[];
+
+extern u8 gSelectedOrderFromParty[];
+
+static const u8 gUnknown_0858D8EC[] = { 3, 4, 5, 14 };
+
+static void sub_80F8EE8(u8 taskId);
+static void sub_80F9088(u8 taskId);
+static void sub_80F9460(void);
+static void sub_80F94B8(void);
+
+void SetContestTrainerGfxIds(void)
+{
+ gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_0 - VARS_START] = gContestMons[0].trainerGfxId;
+ gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_1 - VARS_START] = gContestMons[1].trainerGfxId;
+ gSaveBlock1Ptr->vars[VAR_OBJ_GFX_ID_2 - VARS_START] = gContestMons[2].trainerGfxId;
+}
+
+void sub_80F8814(void)
+{
+ u16 var1;
+ u8 var0 = gSpecialVar_0x8005;
+ switch (var0)
+ {
+ case 0:
+ var1 = 3;
+ break;
+ case 1:
+ var1 = 4;
+ break;
+ case 2:
+ var1 = 5;
+ break;
+ default:
+ var1 = 100;
+ break;
+ }
+
+ gSpecialVar_0x8004 = var1;
+}
+
+void sub_80F8850(void)
+{
+ sub_80F8264();
+ sub_80F8290();
+ sub_80F8438();
+}
+
+void sub_80F8864(void)
+{
+ int contestWinner;
+ switch (gSpecialVar_ContestCategory)
+ {
+ case CONTEST_CATEGORY_COOL:
+ contestWinner = 8;
+ break;
+ case CONTEST_CATEGORY_BEAUTY:
+ contestWinner = 9;
+ break;
+ case CONTEST_CATEGORY_CUTE:
+ contestWinner = 10;
+ break;
+ case CONTEST_CATEGORY_SMART:
+ contestWinner = 11;
+ break;
+ case CONTEST_CATEGORY_TOUGH:
+ default:
+ contestWinner = 12;
+ break;
+ }
+
+ if (!gSaveBlock1Ptr->contestWinners[contestWinner].species)
+ gSpecialVar_0x8004 = 0;
+ else
+ gSpecialVar_0x8004 = 1;
+}
+
+void sub_80F88DC(void)
+{
+ sub_80DEDA8(0xFF);
+}
+
+void sub_80F88E8(void)
+{
+ if (gContestFinalStandings[gContestPlayerMonIndex] == 0
+ && gSpecialVar_ContestRank == 3
+ && gUnknown_02039F08[gContestPlayerMonIndex] >= 800)
+ {
+ gSpecialVar_0x8004 = 1;
+ }
+ else
+ {
+ gSpecialVar_0x8004 = 0;
+ }
+}
+
+u8 sub_80F8940(void)
+{
+ int i;
+ u8 var0 = 0;
+
+ for (i = 0; i < 5; i++)
+ {
+ if (gSaveBlock1Ptr->contestWinners[8 + i].species)
+ var0++;
+ }
+
+ return var0;
+}
+
+void sub_80F8970(void)
+{
+ s16 sp[4];
+ int i, j;
+ s16 condition;
+ s8 var0;
+ u8 var2;
+ u8 r8;
+ u8 r7;
+
+ for (i = 0; i < 4; i++)
+ sp[i] = gContestMonConditions[i];
+
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 3; j > i; j--)
+ {
+ if (sp[j - 1] < sp[j])
+ {
+ int temp = sp[j];
+ sp[j] = sp[j - 1];
+ sp[j - 1] = temp;
+ }
+ }
+ }
+
+ condition = sp[gSpecialVar_0x8006];
+ var0 = 0;
+ r8 = 0;
+ for (i = 0; i < 4; i++)
+ {
+ if (sp[i] == condition)
+ {
+ var0++;
+ if (i == gSpecialVar_0x8006)
+ r8 = var0;
+ }
+ }
+
+ for (i = 0; i < 4; i++)
+ {
+ if (sp[i] == condition)
+ break;
+ }
+
+ r7 = i;
+ var2 = r8;
+ for (i = 0; i < 4; i++)
+ {
+ if (condition == gContestMonConditions[i])
+ {
+ if (var2 == 1)
+ break;
+ var2--;
+ }
+ }
+
+ StringCopy(gStringVar1, gContestMons[i].nickname);
+ StringCopy(gStringVar2, gContestMons[i].trainerName);
+ sub_81DB5AC(gStringVar2);
+
+ if (var0 == 1)
+ gSpecialVar_0x8006 = r7;
+ else if (r8 == var0)
+ gSpecialVar_0x8006 = r7;
+ else
+ gSpecialVar_0x8006 = r7 + 4;
+}
+
+static void ShowContestWinnerCleanup(void)
+{
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
+}
+
+void ShowContestWinner(void)
+{
+ SetMainCallback2(sub_812FDEC);
+ gMain.savedCallback = ShowContestWinnerCleanup;
+}
+
+void sub_80F8AFC(void)
+{
+ int i;
+
+ if (gIsLinkContest & 1)
+ {
+ for (i = 0; i < gUnknown_02039F30; i++)
+ {
+ int version = (u8)gLinkPlayers[i].version;
+ if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
+ {
+ if (gLinkPlayers[i].gender == MALE)
+ gContestMons[i].trainerGfxId = EVENT_OBJ_GFX_LINK_RS_BRENDAN;
+ else
+ gContestMons[i].trainerGfxId = EVENT_OBJ_GFX_LINK_RS_MAY;
+ }
+ }
+
+ VarSet(VAR_OBJ_GFX_ID_0, gContestMons[0].trainerGfxId);
+ VarSet(VAR_OBJ_GFX_ID_1, gContestMons[1].trainerGfxId);
+ VarSet(VAR_OBJ_GFX_ID_2, gContestMons[2].trainerGfxId);
+ VarSet(VAR_OBJ_GFX_ID_3, gContestMons[3].trainerGfxId);
+ }
+}
+
+void sub_80F8B94(void)
+{
+ int i;
+ u8 eventObjectId;
+ int version;
+ struct Sprite *sprite;
+
+ gReservedSpritePaletteCount = 12;
+ if (gIsLinkContest & 1)
+ {
+ for (i = 0; i < gUnknown_02039F30; i++)
+ {
+ eventObjectId = GetEventObjectIdByLocalIdAndMap(gUnknown_0858D8EC[i], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
+ sprite = &gSprites[gEventObjects[eventObjectId].spriteId];
+ sprite->oam.paletteNum = 6 + i;
+ version = (u8)gLinkPlayers[i].version;
+ if (version == VERSION_RUBY || version == VERSION_SAPPHIRE)
+ {
+ if (gLinkPlayers[i].gender == MALE)
+ LoadPalette(gEventObjectPalette33, 0x160 + i * 0x10, 0x20);
+ else
+ LoadPalette(gEventObjectPalette34, 0x160 + i * 0x10, 0x20);
+ }
+ else
+ {
+ if (gLinkPlayers[i].gender == MALE)
+ LoadPalette(gEventObjectPalette8, 0x160 + i * 0x10, 0x20);
+ else
+ LoadPalette(gEventObjectPalette17, 0x160 + i * 0x10, 0x20);
+ }
+ }
+ }
+}
+
+u8 GiveMonArtistRibbon(void)
+{
+ u8 hasArtistRibbon;
+
+ hasArtistRibbon = GetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON);
+ if (!hasArtistRibbon && gContestFinalStandings[gContestPlayerMonIndex] == 0 && gSpecialVar_ContestRank == 3
+ && gUnknown_02039F08[gContestPlayerMonIndex] >= 800)
+ {
+ hasArtistRibbon = 1;
+ SetMonData(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON, &hasArtistRibbon);
+ if (GetRibbonCount(&gPlayerParty[gUnknown_02039F24]) > 4)
+ sub_80EE4DC(&gPlayerParty[gUnknown_02039F24], MON_DATA_ARTIST_RIBBON);
+
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+u8 sub_80F8D24(void)
+{
+ return 0;
+}
+
+void ShowContestEntryMonPic(void)
+{
+ const struct CompressedSpritePalette *palette;
+ u32 personality, otId;
+ u16 species;
+ u8 spriteId;
+ u8 taskId;
+ u8 left, top;
+
+ if (FindTaskIdByFunc(sub_80F8EE8) == 0xFF)
+ {
+ AllocateMonSpritesGfx();
+ left = 10;
+ top = 3;
+ species = gContestMons[gSpecialVar_0x8006].species;
+ personality = gContestMons[gSpecialVar_0x8006].personality;
+ otId = gContestMons[gSpecialVar_0x8006].otId;
+ taskId = CreateTask(sub_80F8EE8, 0x50);
+ gTasks[taskId].data[0] = 0;
+ gTasks[taskId].data[1] = species;
+ if (gSpecialVar_0x8006 == gContestPlayerMonIndex)
+ HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
+ else
+ HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
+
+ palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
+ LoadCompressedObjectPalette(palette);
+ SetMultiuseSpriteTemplateToPokemon(species, 1);
+ gMultiuseSpriteTemplate.paletteTag = palette->tag;
+ spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0);
+
+ if (gIsLinkContest & 1)
+ {
+ if (!(gIsLinkContest & 4))
+ DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0);
+ }
+ else
+ {
+ DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0);
+ }
+
+ gTasks[taskId].data[2] = spriteId;
+ gTasks[taskId].data[3] = left;
+ gTasks[taskId].data[4] = top;
+ gSprites[spriteId].callback = SpriteCallbackDummy;
+ gSprites[spriteId].oam.priority = 0;
+ }
+}
+
+void sub_80F8EB8(void)
+{
+ u8 taskId = FindTaskIdByFunc(sub_80F8EE8);
+ if (taskId != 0xFF)
+ {
+ gTasks[taskId].data[0]++;
+ FreeMonSpritesGfx();
+ }
+}
+
+static void sub_80F8EE8(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ struct Sprite *sprite;
+
+ switch(task->data[0])
+ {
+ case 0:
+ task->data[0]++;
+ break;
+ case 1:
+ task->data[5] = CreateWindowFromRect(10, 3, 8, 8);
+ SetStandardWindowBorderStyle(task->data[5], 1);
+ task->data[0]++;
+ break;
+ case 2:
+ break;
+ case 3:
+ sprite = &gSprites[task->data[2]];
+ FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(sprite->oam.paletteNum));
+
+ if(sprite->oam.affineMode)
+ FreeOamMatrix(sprite->oam.matrixNum);
+
+ DestroySprite(sprite);
+ task->data[0]++;
+ break;
+ case 4:
+ sub_80E2A78(gTasks[taskId].data[5]);
+ DestroyTask(taskId);
+ break;
+ }
+}
+
+void ScriptGetMultiplayerId(void)
+{
+ if ((gIsLinkContest & 1) && gUnknown_02039F30 == 4 && !(gIsLinkContest & 2))
+ gSpecialVar_Result = GetMultiplayerId();
+ else
+ gSpecialVar_Result = 4;
+}
+
+void ScriptRandom(void)
+{
+ u16 random;
+ u16 *scriptPtr;
+
+ if (gIsLinkContest & 1)
+ {
+ gContestRngValue = 1103515245 * gContestRngValue + 24691;
+ random = gContestRngValue >> 16;
+ scriptPtr = &gSpecialVar_Result;
+ }
+ else
+ {
+ scriptPtr = &gSpecialVar_Result;
+ random = Random();
+ }
+ *scriptPtr = random % *scriptPtr;
+}
+
+u16 sub_80F903C(void)
+{
+ gContestRngValue = 1103515245 * gContestRngValue + 24691;
+ return gContestRngValue >> 16;
+}
+
+u8 sub_80F905C(void)
+{
+ if (gIsLinkContest & 2)
+ {
+ CreateTask(sub_80F9088, 5);
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+static void sub_80F9088(u8 taskId)
+{
+ switch (gTasks[taskId].data[0])
+ {
+ case 0:
+ if (sub_800A520())
+ {
+ sub_800ADF8();
+ gTasks[taskId].data[0]++;
+ }
+ break;
+ case 1:
+ gTasks[taskId].data[0]++;
+ break;
+ default:
+ if (sub_800A520() == 1)
+ {
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+ break;
+ }
+}
+
+void sub_80F90DC(void)
+{
+ if (gIsLinkContest & 2)
+ {
+ if (gReceivedRemoteLinkPlayers)
+ {
+ sub_800E0E8();
+ CreateWirelessStatusIndicatorSprite(8, 8);
+ }
+ }
+}
+
+void sub_80F910C(void)
+{
+ if (gIsLinkContest & 2)
+ {
+ if (gReceivedRemoteLinkPlayers)
+ sub_800E084();
+ }
+}
+
+u8 sub_80F9134(void)
+{
+ if (gIsLinkContest & 4)
+ return 1;
+ else
+ return 0;
+}
+
+void sub_80F9154(void)
+{
+ gIsLinkContest = 0;
+}
+
+u8 sub_80F9160(void)
+{
+ if (gIsLinkContest & 2)
+ return 1;
+ else
+ return 0;
+}
+
+void HealPlayerParty(void)
+{
+ u8 i, j;
+ u8 ppBonuses;
+ u8 arg[4];
+
+ // restore HP.
+ for(i = 0; i < gPlayerPartyCount; i++)
+ {
+ u16 maxHP = GetMonData(&gPlayerParty[i], MON_DATA_MAX_HP);
+ arg[0] = maxHP;
+ arg[1] = maxHP >> 8;
+ SetMonData(&gPlayerParty[i], MON_DATA_HP, arg);
+ ppBonuses = GetMonData(&gPlayerParty[i], MON_DATA_PP_BONUSES);
+
+ // restore PP.
+ for(j = 0; j < 4; j++)
+ {
+ arg[0] = CalculatePPWithBonus(GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + j), ppBonuses, j);
+ SetMonData(&gPlayerParty[i], MON_DATA_PP1 + j, arg);
+ }
+
+ // since status is u32, the four 0 assignments here are probably for safety to prevent undefined data from reaching SetMonData.
+ arg[0] = 0;
+ arg[1] = 0;
+ arg[2] = 0;
+ arg[3] = 0;
+ SetMonData(&gPlayerParty[i], MON_DATA_STATUS, arg);
+ }
+}
+
+u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 unused3)
+{
+ u16 nationalDexNum;
+ int sentToPc;
+ u8 heldItem[2];
+ struct Pokemon mon;
+
+ CreateMon(&mon, species, level, 32, 0, 0, 0, 0);
+ heldItem[0] = item;
+ heldItem[1] = item >> 8;
+ SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem);
+ sentToPc = GiveMonToPlayer(&mon);
+ nationalDexNum = SpeciesToNationalPokedexNum(species);
+
+ switch(sentToPc)
+ {
+ case 0:
+ case 1:
+ GetSetPokedexFlag(nationalDexNum, 2);
+ GetSetPokedexFlag(nationalDexNum, 3);
+ break;
+ }
+ return sentToPc;
+}
+
+u8 ScriptGiveEgg(u16 species)
+{
+ struct Pokemon mon;
+ u8 isEgg;
+
+ CreateEgg(&mon, species, TRUE);
+ isEgg = TRUE;
+ SetMonData(&mon, MON_DATA_IS_EGG, &isEgg);
+
+ return GiveMonToPlayer(&mon);
+}
+
+void HasEnoughMonsForDoubleBattle(void)
+{
+ switch (GetMonsStateToDoubles())
+ {
+ case 0:
+ gSpecialVar_Result = 0;
+ break;
+ case 1:
+ gSpecialVar_Result = 1;
+ break;
+ case 2:
+ gSpecialVar_Result = 2;
+ break;
+ }
+}
+
+static bool8 CheckPartyMonHasHeldItem(u16 item)
+{
+ int i;
+
+ for(i = 0; i < PARTY_SIZE; i++)
+ {
+ u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
+ if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool8 sub_80F9370(void)
+{
+ bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY);
+ if (hasItem == TRUE)
+ GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY), gStringVar1);
+
+ return hasItem;
+}
+
+void CreateScriptedWildMon(u16 species, u8 level, u16 item)
+{
+ u8 heldItem[2];
+
+ ZeroEnemyPartyMons();
+ CreateMon(&gEnemyParty[0], species, level, 0x20, 0, 0, 0, 0);
+ if (item)
+ {
+ heldItem[0] = item;
+ heldItem[1] = item >> 8;
+ SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, heldItem);
+ }
+}
+
+void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot)
+{
+ if (monIndex > PARTY_SIZE)
+ monIndex = gPlayerPartyCount - 1;
+
+ SetMonMoveSlot(&gPlayerParty[monIndex], move, slot);
+}
+
+void sub_80F9438(void)
+{
+ gMain.savedCallback = sub_80F9460;
+ VarSet(VAR_FRONTIER_FACILITY, 9); // this isn't a valid frontier facility id (??)
+ sub_81B8518(0);
+}
+
+static void sub_80F9460(void)
+{
+ switch (gSelectedOrderFromParty[0])
+ {
+ case 0:
+ gSpecialVar_Result = 0;
+ break;
+ default:
+ gSpecialVar_Result = 1;
+ break;
+ }
+
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
+}
+
+void sub_80F9490(void)
+{
+ gMain.savedCallback = sub_80F94B8;
+ sub_81B8518(gSpecialVar_0x8004 + 1);
+}
+
+static void sub_80F94B8(void)
+{
+ switch (gSelectedOrderFromParty[0])
+ {
+ case 0:
+ gSpecialVar_Result = 0;
+ break;
+ default:
+ gSpecialVar_Result = 1;
+ break;
+ }
+
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
+}
+
+void ReducePlayerPartyToSelectedMons(void)
+{
+ struct Pokemon party[4];
+ int i;
+
+ CpuFill32(0, party, sizeof party);
+
+ // copy the selected pokemon according to the order.
+ for (i = 0; i < 4; i++)
+ if (gSelectedOrderFromParty[i]) // as long as the order keeps going (did the player select 1 mon? 2? 3?), do not stop
+ party[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1]; // index is 0 based, not literal
+
+ CpuFill32(0, gPlayerParty, sizeof gPlayerParty);
+
+ // overwrite the first 4 with the order copied to.
+ for (i = 0; i < 4; i++)
+ gPlayerParty[i] = party[i];
+
+ CalculatePlayerPartyCount();
+}
diff --git a/src/strings.c b/src/strings.c
index 72aedde6e..5dcf97e2b 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -1,9 +1,7 @@
#include "global.h"
#include "strings.h"
-// Yes, all the aligns are absolutely necessary.
-// Until someone can come up with a better way to align byte arrays in C, this is what we're doing.
-asm(".align 2");
+ALIGNED(4)
const u8 gExpandedPlaceholder_Empty[] = _("");
const u8 gExpandedPlaceholder_Kun[] = _("");
const u8 gExpandedPlaceholder_Chan[] = _("");
@@ -49,24 +47,12 @@ const u8 gUnknown_085E8504[] = _("SELECT");
const u8 gUnknown_085E850B[] = _("+ Control Pad");
const u8 gUnknown_085E8519[] = _("L Button R Button");
const u8 gUnknown_085E852C[] = _("CONTROLS");
-
-asm(".align 2");
-const u8 gUnknown_085E8538[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK");
-
-asm(".align 2");
-const u8 gUnknown_085E8544[] = _("{A_BUTTON}NEXT");
-
-asm(".align 2");
-const u8 gUnknown_085E854C[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK");
-
-asm(".align 2");
-const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL");
-
-asm(".align 2");
-const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL");
-
-asm(".align 2");
-const u8 gText_UnkCtrlF800Exit[] = _("{A_BUTTON}EXIT");
+ALIGNED(4) const u8 gUnknown_085E8538[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK");
+ALIGNED(4) const u8 gUnknown_085E8544[] = _("{A_BUTTON}NEXT");
+ALIGNED(4) const u8 gUnknown_085E854C[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK");
+ALIGNED(4) const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL");
+ALIGNED(4) const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL");
+ALIGNED(4) const u8 gText_UnkCtrlF800Exit[] = _("{A_BUTTON}EXIT");
const u8 gText_BirchBoy[] = _("BOY");
const u8 gText_BirchGirl[] = _("GIRL");
const u8 gText_DefaultNameStu[] = _("STU");
@@ -486,30 +472,14 @@ const u8 gText_EscapeFromHere[] = _("Want to escape from here and return\nto {ST
const u8 gText_ReturnToHealingSpot[] = _("Want to return to the healing spot\nused last in {STR_VAR_1}?");
const u8 gText_PauseUntilPress[] = _("{PAUSE_UNTIL_PRESS}");
const u8 gJPText_PutVar1IntoSpinner[] = _("{STR_VAR_1}を ぐるぐるこうかんに\nだして よろしいですか?");
-
-asm(".align 2");
-const u8 gText_OnlyPkmnForBattle[] = _("That’s your only\nPOKéMON for battle.");
-
-asm(".align 2");
-const u8 gText_PkmnCantBeTradedNow[] = _("That POKéMON can’t be traded\nnow.");
-
-asm(".align 2");
-const u8 gText_EggCantBeTradedNow[] = _("An EGG can’t be traded now.");
-
-asm(".align 2");
-const u8 gText_OtherTrainersPkmnCantBeTraded[] = _("The other TRAINER’s POKéMON\ncan’t be traded now.");
-
-asm(".align 2");
-const u8 gText_OtherTrainerCantAcceptPkmn[] = _("The other TRAINER can’t accept\nthat POKéMON now.");
-
-asm(".align 2");
-const u8 gText_CantTradeWithTrainer[] = _("You can’t trade with that\nTRAINER now.");
-
-asm(".align 2");
-const u8 gText_NotPkmnOtherTrainerWants[] = _("That isn’t the type of POKéMON\nthat the other TRAINER wants.");
-
-asm(".align 2");
-const u8 gText_ThatIsntAnEgg[] = _("That isn’t an EGG.");
+ALIGNED(4) const u8 gText_OnlyPkmnForBattle[] = _("That’s your only\nPOKéMON for battle.");
+ALIGNED(4) const u8 gText_PkmnCantBeTradedNow[] = _("That POKéMON can’t be traded\nnow.");
+ALIGNED(4) const u8 gText_EggCantBeTradedNow[] = _("An EGG can’t be traded now.");
+ALIGNED(4) const u8 gText_OtherTrainersPkmnCantBeTraded[] = _("The other TRAINER’s POKéMON\ncan’t be traded now.");
+ALIGNED(4) const u8 gText_OtherTrainerCantAcceptPkmn[] = _("The other TRAINER can’t accept\nthat POKéMON now.");
+ALIGNED(4) const u8 gText_CantTradeWithTrainer[] = _("You can’t trade with that\nTRAINER now.");
+ALIGNED(4) const u8 gText_NotPkmnOtherTrainerWants[] = _("That isn’t the type of POKéMON\nthat the other TRAINER wants.");
+ALIGNED(4) const u8 gText_ThatIsntAnEgg[] = _("That isn’t an EGG.");
const u8 gText_Register[] = _("REGISTER");
const u8 gText_Attack3[] = _("ATTACK");
const u8 gText_Defense3[] = _("DEFENSE");
@@ -1251,20 +1221,11 @@ const u8 gText_BattleArena[] = _("BATTLE ARENA");
const u8 gText_BattlePike[] = _("BATTLE PIKE");
const u8 gText_BattlePyramid[] = _("BATTLE PYRAMID");
-asm(".align 2");
-const u8 gUnknown_085ED164[] = _("{STR_VAR_1} SINGLE");
-
-asm(".align 2");
-const u8 gUnknown_085ED170[] = _("{STR_VAR_1} DOUBLE");
-
-asm(".align 2");
-const u8 gUnknown_085ED17C[] = _("{STR_VAR_1} MULTI");
-
-asm(".align 2");
-const u8 gUnknown_085ED188[] = _("{STR_VAR_1} LINK");
-
-asm(".align 2");
-const u8 gUnknown_085ED190[] = _("{STR_VAR_1}");
+ALIGNED(4) const u8 gUnknown_085ED164[] = _("{STR_VAR_1} SINGLE");
+ALIGNED(4) const u8 gUnknown_085ED170[] = _("{STR_VAR_1} DOUBLE");
+ALIGNED(4) const u8 gUnknown_085ED17C[] = _("{STR_VAR_1} MULTI");
+ALIGNED(4) const u8 gUnknown_085ED188[] = _("{STR_VAR_1} LINK");
+ALIGNED(4) const u8 gUnknown_085ED190[] = _("{STR_VAR_1}");
const u8 gText_Give[] = _("Give");
const u8 gText_NoNeed[] = _("No need");
@@ -1332,93 +1293,35 @@ const u8 gMatchCall_MaySelfIntroductionText_Line1[] = _("My POKéMON and I help"
const u8 gMatchCall_MaySelfIntroductionText_Line2[] = _("my father’s research.");
const u8 gText_HatchedFromEgg[] = _("{STR_VAR_1} hatched from the EGG!");
const u8 gText_NickHatchPrompt[] = _("Would you like to nickname the newly\nhatched {STR_VAR_1}?");
-
-asm(".align 2");
-const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p");
-
-asm(".align 2");
-const u8 gText_WaitForAllChooseBerry[] = _("Please wait while each member\nchooses a BERRY.");
-
-asm(".align 2");
-const u8 gText_EndedWithXUnitsPowder[] = _("{PAUSE_MUSIC}{PLAY_BGM MUS_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");
-
-asm(".align 2");
-const u8 gText_RecordingGameResults[] = _("Recording your game results in the\nsave file.\lPlease wait.");
-
-asm(".align 2");
-const u8 gText_PlayBerryCrushAgain[] = _("Want to play BERRY CRUSH again?");
-
-asm(".align 2");
-const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game will be canceled.");
-
-asm(".align 2");
-const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled.");
-
-asm(".align 2");
-const u8 gText_TimesUpNoGoodPowder[] = _("Time’s up.\pGood BERRY POWDER could not be\nmade…\p");
-
-asm(".align 2");
-const u8 gText_CommunicationStandby2[] = _("Communication standby…");
-
-asm(".align 2");
-const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}");
-
-asm(".align 2");
-const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}");
-
-asm(".align 2");
-const u8 gText_SpaceTimes2[] = _(" time(s)");
-
-asm(".align 2");
-const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY");
-
-asm(".align 2");
-const u8 gText_TimeColon[] = _("Time:");
-
-asm(".align 2");
-const u8 gText_PressingSpeed[] = _("Pressing Speed:");
-
-asm(".align 2");
-const u8 gText_Silkiness[] = _("Silkiness:");
-
-asm(".align 2");
-const u8 gText_StrVar1[] = _("{STR_VAR_1}");
-
-asm(".align 2");
-const u8 gText_SpaceMin[] = _(" min. ");
-
-asm(".align 2");
-const u8 gText_XDotY2[] = _("{STR_VAR_1}.{STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_SpaceSec[] = _(" sec.");
-
-asm(".align 2");
-const u8 gText_XDotY3[] = _("{STR_VAR_1}.{STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_TimesPerSec[] = _(" Times/sec.");
-
-asm(".align 2");
-const u8 gText_Var1Percent[] = _("{STR_VAR_1}%");
-
-asm(".align 2");
-const u8 gText_PressesRankings[] = _("No. of Presses Rankings");
-
-asm(".align 2");
-const u8 gText_CrushingResults[] = _("Crushing Results");
-
-asm(".align 2");
-const u8 gText_NeatnessRankings[] = _("Neatness Rankings");
-
-asm(".align 2");
-const u8 gText_CoopRankings[] = _("Cooperative Rankings");
-
-asm(".align 2");
-const u8 gText_PressingPowerRankings[] = _("Pressing-Power Rankings");
+ALIGNED(4) const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p");
+ALIGNED(4) const u8 gText_WaitForAllChooseBerry[] = _("Please wait while each member\nchooses a BERRY.");
+ALIGNED(4) const u8 gText_EndedWithXUnitsPowder[] = _("{PAUSE_MUSIC}{PLAY_BGM MUS_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");
+ALIGNED(4) const u8 gText_RecordingGameResults[] = _("Recording your game results in the\nsave file.\lPlease wait.");
+ALIGNED(4) const u8 gText_PlayBerryCrushAgain[] = _("Want to play BERRY CRUSH again?");
+ALIGNED(4) const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game will be canceled.");
+ALIGNED(4) const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled.");
+ALIGNED(4) const u8 gText_TimesUpNoGoodPowder[] = _("Time’s up.\pGood BERRY POWDER could not be\nmade…\p");
+ALIGNED(4) const u8 gText_CommunicationStandby2[] = _("Communication standby…");
+ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}");
+ALIGNED(4) const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}");
+ALIGNED(4) const u8 gText_SpaceTimes2[] = _(" time(s)");
+ALIGNED(4) const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}");
+ALIGNED(4) const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY");
+ALIGNED(4) const u8 gText_TimeColon[] = _("Time:");
+ALIGNED(4) const u8 gText_PressingSpeed[] = _("Pressing Speed:");
+ALIGNED(4) const u8 gText_Silkiness[] = _("Silkiness:");
+ALIGNED(4) const u8 gText_StrVar1[] = _("{STR_VAR_1}");
+ALIGNED(4) const u8 gText_SpaceMin[] = _(" min. ");
+ALIGNED(4) const u8 gText_XDotY2[] = _("{STR_VAR_1}.{STR_VAR_2}");
+ALIGNED(4) const u8 gText_SpaceSec[] = _(" sec.");
+ALIGNED(4) const u8 gText_XDotY3[] = _("{STR_VAR_1}.{STR_VAR_2}");
+ALIGNED(4) const u8 gText_TimesPerSec[] = _(" Times/sec.");
+ALIGNED(4) const u8 gText_Var1Percent[] = _("{STR_VAR_1}%");
+ALIGNED(4) const u8 gText_PressesRankings[] = _("No. of Presses Rankings");
+ALIGNED(4) const u8 gText_CrushingResults[] = _("Crushing Results");
+ALIGNED(4) const u8 gText_NeatnessRankings[] = _("Neatness Rankings");
+ALIGNED(4) const u8 gText_CoopRankings[] = _("Cooperative Rankings");
+ALIGNED(4) const u8 gText_PressingPowerRankings[] = _("Pressing-Power Rankings");
const u8 gText_BerryCrush2[] = _("BERRY CRUSH");
const u8 gText_PressingSpeedRankings[] = _("Pressing-Speed Rankings");
const u8 gText_Var1Players[] = _("{STR_VAR_1} PLAYERS");
@@ -1548,29 +1451,15 @@ const u8 gText_KOsInARow[] = _("KOs in a row: {STR_VAR_1}");
const u8 gText_TimesVar1[] = _("Times: {STR_VAR_1}");
const u8 gText_FloorsCleared[] = _("Floors cleared: {STR_VAR_1}");
-asm(".align 2");
-const u8 gText_RecordsLv50[] = _("LV. 50");
-
-asm(".align 2");
-const u8 gText_RecordsOpenLevel[] = _("OPEN LEVEL");
-
-asm(".align 2");
-const u8 gText_FrontierFacilityWinStreak[] = _("Win streak: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_RecordsLv50[] = _("LV. 50");
+ALIGNED(4) const u8 gText_RecordsOpenLevel[] = _("OPEN LEVEL");
+ALIGNED(4) const u8 gText_FrontierFacilityWinStreak[] = _("Win streak: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_FrontierFacilityClearStreak[] = _("Clear streak: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_FrontierFacilityRoomsCleared[] = _("Rooms cleared: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_FrontierFacilityKOsStreak[] = _("KOs in a row: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_FrontierFacilityFloorsCleared[] = _("Floors cleared: {STR_VAR_2}");
+ALIGNED(4) const u8 gText_123Dot[][3] = {_("1."), _("2."), _("3.")};
-asm(".align 2");
-const u8 gText_FrontierFacilityClearStreak[] = _("Clear streak: {STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_FrontierFacilityRoomsCleared[] = _("Rooms cleared: {STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_FrontierFacilityKOsStreak[] = _("KOs in a row: {STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_FrontierFacilityFloorsCleared[] = _("Floors cleared: {STR_VAR_2}");
-
-asm(".align 2");
-const u8 gText_123Dot[][3] = {_("1."), _("2."), _("3.")};
const u8 gText_SavingDontTurnOff2[] = _("SAVING…\nDON’T TURN OFF THE POWER.");
const u8 gText_BlenderMaxSpeedRecord[] = _("BERRY BLENDER\nMAXIMUM SPEED RECORD!");
const u8 gText_234Players[] = _("2 PLAYERS\n3 PLAYERS\n4 PLAYERS");
@@ -1769,185 +1658,66 @@ const u8 *const gTextTable_Players[] = {
gText_F703Players
};
-asm(".align 2");
-const u8 gText_WonderCards[] = _("WONDER CARDS");
-
-asm(".align 2");
-const u8 gText_WonderNews[] = _("WONDER NEWS");
-
-asm(".align 2");
-const u8 gText_WirelessCommunication[] = _("WIRELESS COMMUNICATION");
-
-asm(".align 2");
-const u8 gText_Friend2[] = _("FRIEND");
-
-asm(".align 2");
-const u8 gText_Exit3[] = _("EXIT");
-
-asm(".align 2");
-const u8 gText_Receive[] = _("RECEIVE");
-
-asm(".align 2");
-const u8 gText_Send[] = _("SEND");
-
-asm(".align 2");
-const u8 gText_Toss[] = _("TOSS");
-
-asm(".align 2");
-const u8 gText_VarietyOfEventsImportedWireless[] = _("A variety of events will be imported\nover Wireless Communication.");
-
-asm(".align 2");
-const u8 gText_WonderCardsInPossession[] = _("Read the WONDER CARDS in your\npossession.");
-
-asm(".align 2");
-const u8 gText_ReadNewsThatArrived[] = _("Read the NEWS that arrived.");
-
-asm(".align 2");
-const u8 gText_ReturnToTitle[] = _("Return to the title screen.");
-
-asm(".align 2");
-const u8 gText_DontHaveCardNewOneInput[] = _("You don’t have a WONDER CARD,\nso a new CARD will be input.");
-
-asm(".align 2");
-const u8 gText_DontHaveNewsNewOneInput[] = _("You don’t have any WONDER NEWS,\nso new NEWS will be input.");
-
-asm(".align 2");
-const u8 gText_WhereShouldCardBeAccessed[] = _("Where should the WONDER CARD\nbe accessed?");
-
-asm(".align 2");
-const u8 gText_WhereShouldNewsBeAccessed[] = _("Where should the WONDER NEWS\nbe accessed?");
-
-asm(".align 2");
-const u8 gUnknown_085EEFC0[] = _("Communication standby…\nB Button: Cancel");
-
-asm(".align 2");
-const u8 gText_Communicating[] = _("Communicating…");
-
-asm(".align 2");
-const u8 gText_CommunicationCompleted[] = _("Communication completed.");
-
-asm(".align 2");
-const u8 gText_CommunicationError[] = _("Communication error.");
-
-asm(".align 2");
-const u8 gText_CommunicationCanceled[] = _("Communication has been canceled.");
-
-asm(".align 2");
-const u8 gText_ThrowAwayWonderCard[] = _("Throw away the WONDER CARD\nand input a new CARD?");
-
-asm(".align 2");
-const u8 gText_HaventReceivedCardsGift[] = _("You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?");
-
-asm(".align 2");
-const u8 gText_WonderCardReceivedFrom[] = _("A WONDER CARD has been received\nfrom {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_WonderNewsReceivedFrom[] = _("A WONDER NEWS item has been\nreceived from {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_WonderCardReceived[] = _("A new WONDER CARD has been\nreceived.");
-
-asm(".align 2");
-const u8 gText_WonderNewsReceived[] = _("A new WONDER NEWS item has been\nreceived.");
-
-asm(".align 2");
-const u8 gText_NewStampReceived[] = _("A new STAMP has been received.");
-
-asm(".align 2");
-const u8 gText_NewTrainerReceived[] = _("A new TRAINER has arrived.");
-
-asm(".align 2");
-const u8 gText_AlreadyHadCard[] = _("You already had that\nWONDER CARD.");
-
-asm(".align 2");
-const u8 gText_AlreadyHadNews[] = _("You already had that\nWONDER NEWS item.");
-
-asm(".align 2");
-const u8 gText_AlreadyHadStamp[] = _("You already had that\nSTAMP.");
-
-asm(".align 2");
-const u8 gText_NoMoreRoomForStamps[] = _("There’s no more room for adding\nSTAMPS.");
-
-asm(".align 2");
-const u8 gText_RecordUploadedViaWireless[] = _("Your record has been uploaded via\nWIRELESS COMMUNICATION.");
-
-asm(".align 2");
-const u8 gText_CantAcceptCardFromTrainer[] = _("You can’t accept a WONDER CARD\nfrom this TRAINER.");
-
-asm(".align 2");
-const u8 gText_CantAcceptNewsFromTrainer[] = _("You can’t accept WONDER NEWS\nfrom this TRAINER.");
-
-asm(".align 2");
-const u8 gText_NothingSentOver[] = _("Nothing was sent over…");
-
-asm(".align 2");
-const u8 gText_WhatToDoWithCards[] = _("What would you like to do\nwith the WONDER CARDS?");
-
-asm(".align 2");
-const u8 gText_WhatToDoWithNews[] = _("What would you like to do\nwith the WONDER NEWS?");
-
-asm(".align 2");
-const u8 gText_SendingWonderCard[] = _("Sending your WONDER CARD…");
-
-asm(".align 2");
-const u8 gText_SendingWonderNews[] = _("Sending your WONDER NEWS item…");
-
-asm(".align 2");
-const u8 gText_WonderCardSentTo[] = _("Your WONDER CARD has been sent\nto {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_WonderNewsSentTo[] = _("Your WONDER NEWS item has been\nsent to {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_StampSentTo[] = _("A STAMP has been sent to {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_GiftSentTo[] = _("A GIFT has been sent to {STR_VAR_1}.");
-
-asm(".align 2");
-const u8 gText_OtherTrainerHasCard[] = _("The other TRAINER has the same\nWONDER CARD already.");
-
-asm(".align 2");
-const u8 gText_OtherTrainerHasNews[] = _("The other TRAINER has the same\nWONDER NEWS already.");
-
-asm(".align 2");
-const u8 gText_OtherTrainerHasStamp[] = _("The other TRAINER has the same\nSTAMP already.");
-
-asm(".align 2");
-const u8 gText_OtherTrainerCanceled[] = _("The other TRAINER canceled\ncommunication.");
-
-asm(".align 2");
-const u8 gText_CantSendGiftToTrainer[] = _("You can’t send a MYSTERY GIFT to\nthis TRAINER.");
-
-asm(".align 2");
-const u8 gText_IfThrowAwayCardEventWontHappen[] = _("If you throw away the CARD,\nits event won’t happen. Okay?");
-
-asm(".align 2");
-const u8 gText_OkayToDiscardNews[] = _("Is it okay to discard this\nNEWS item?");
-
-asm(".align 2");
-const u8 gText_HaventReceivedGiftOkayToDiscard[] = _("You haven’t received the\nGIFT. Is it okay to discard?");
-
-asm(".align 2");
-const u8 gText_DataWillBeSaved[] = _("Data will be saved.\nPlease wait.");
-
-asm(".align 2");
-const u8 gText_SaveCompletedPressA[] = _("Save completed.\nPlease press the A Button.");
-
-asm(".align 2");
-const u8 gText_WonderCardThrownAway[] = _("The WONDER CARD was thrown away.");
-
-asm(".align 2");
-const u8 gText_WonderNewsThrownAway[] = _("The WONDER NEWS was thrown away.");
-
-asm(".align 2");
-const u8 gText_MysteryGift[] = _("MYSTERY GIFT");
-
-asm(".align 2");
-const u8 gText_PickOKExit[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}EXIT");
-
-asm(".align 2");
-const u8 gText_PickOKCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}CANCEL");
+ALIGNED(4) const u8 gText_WonderCards[] = _("WONDER CARDS");
+ALIGNED(4) const u8 gText_WonderNews[] = _("WONDER NEWS");
+ALIGNED(4) const u8 gText_WirelessCommunication[] = _("WIRELESS COMMUNICATION");
+ALIGNED(4) const u8 gText_Friend2[] = _("FRIEND");
+ALIGNED(4) const u8 gText_Exit3[] = _("EXIT");
+ALIGNED(4) const u8 gText_Receive[] = _("RECEIVE");
+ALIGNED(4) const u8 gText_Send[] = _("SEND");
+ALIGNED(4) const u8 gText_Toss[] = _("TOSS");
+ALIGNED(4) const u8 gText_VarietyOfEventsImportedWireless[] = _("A variety of events will be imported\nover Wireless Communication.");
+ALIGNED(4) const u8 gText_WonderCardsInPossession[] = _("Read the WONDER CARDS in your\npossession.");
+ALIGNED(4) const u8 gText_ReadNewsThatArrived[] = _("Read the NEWS that arrived.");
+ALIGNED(4) const u8 gText_ReturnToTitle[] = _("Return to the title screen.");
+ALIGNED(4) const u8 gText_DontHaveCardNewOneInput[] = _("You don’t have a WONDER CARD,\nso a new CARD will be input.");
+ALIGNED(4) const u8 gText_DontHaveNewsNewOneInput[] = _("You don’t have any WONDER NEWS,\nso new NEWS will be input.");
+ALIGNED(4) const u8 gText_WhereShouldCardBeAccessed[] = _("Where should the WONDER CARD\nbe accessed?");
+ALIGNED(4) const u8 gText_WhereShouldNewsBeAccessed[] = _("Where should the WONDER NEWS\nbe accessed?");
+ALIGNED(4) const u8 gUnknown_085EEFC0[] = _("Communication standby…\nB Button: Cancel");
+ALIGNED(4) const u8 gText_Communicating[] = _("Communicating…");
+ALIGNED(4) const u8 gText_CommunicationCompleted[] = _("Communication completed.");
+ALIGNED(4) const u8 gText_CommunicationError[] = _("Communication error.");
+ALIGNED(4) const u8 gText_CommunicationCanceled[] = _("Communication has been canceled.");
+ALIGNED(4) const u8 gText_ThrowAwayWonderCard[] = _("Throw away the WONDER CARD\nand input a new CARD?");
+ALIGNED(4) const u8 gText_HaventReceivedCardsGift[] = _("You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?");
+ALIGNED(4) const u8 gText_WonderCardReceivedFrom[] = _("A WONDER CARD has been received\nfrom {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_WonderNewsReceivedFrom[] = _("A WONDER NEWS item has been\nreceived from {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_WonderCardReceived[] = _("A new WONDER CARD has been\nreceived.");
+ALIGNED(4) const u8 gText_WonderNewsReceived[] = _("A new WONDER NEWS item has been\nreceived.");
+ALIGNED(4) const u8 gText_NewStampReceived[] = _("A new STAMP has been received.");
+ALIGNED(4) const u8 gText_NewTrainerReceived[] = _("A new TRAINER has arrived.");
+ALIGNED(4) const u8 gText_AlreadyHadCard[] = _("You already had that\nWONDER CARD.");
+ALIGNED(4) const u8 gText_AlreadyHadNews[] = _("You already had that\nWONDER NEWS item.");
+ALIGNED(4) const u8 gText_AlreadyHadStamp[] = _("You already had that\nSTAMP.");
+ALIGNED(4) const u8 gText_NoMoreRoomForStamps[] = _("There’s no more room for adding\nSTAMPS.");
+ALIGNED(4) const u8 gText_RecordUploadedViaWireless[] = _("Your record has been uploaded via\nWIRELESS COMMUNICATION.");
+ALIGNED(4) const u8 gText_CantAcceptCardFromTrainer[] = _("You can’t accept a WONDER CARD\nfrom this TRAINER.");
+ALIGNED(4) const u8 gText_CantAcceptNewsFromTrainer[] = _("You can’t accept WONDER NEWS\nfrom this TRAINER.");
+ALIGNED(4) const u8 gText_NothingSentOver[] = _("Nothing was sent over…");
+ALIGNED(4) const u8 gText_WhatToDoWithCards[] = _("What would you like to do\nwith the WONDER CARDS?");
+ALIGNED(4) const u8 gText_WhatToDoWithNews[] = _("What would you like to do\nwith the WONDER NEWS?");
+ALIGNED(4) const u8 gText_SendingWonderCard[] = _("Sending your WONDER CARD…");
+ALIGNED(4) const u8 gText_SendingWonderNews[] = _("Sending your WONDER NEWS item…");
+ALIGNED(4) const u8 gText_WonderCardSentTo[] = _("Your WONDER CARD has been sent\nto {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_WonderNewsSentTo[] = _("Your WONDER NEWS item has been\nsent to {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_StampSentTo[] = _("A STAMP has been sent to {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_GiftSentTo[] = _("A GIFT has been sent to {STR_VAR_1}.");
+ALIGNED(4) const u8 gText_OtherTrainerHasCard[] = _("The other TRAINER has the same\nWONDER CARD already.");
+ALIGNED(4) const u8 gText_OtherTrainerHasNews[] = _("The other TRAINER has the same\nWONDER NEWS already.");
+ALIGNED(4) const u8 gText_OtherTrainerHasStamp[] = _("The other TRAINER has the same\nSTAMP already.");
+ALIGNED(4) const u8 gText_OtherTrainerCanceled[] = _("The other TRAINER canceled\ncommunication.");
+ALIGNED(4) const u8 gText_CantSendGiftToTrainer[] = _("You can’t send a MYSTERY GIFT to\nthis TRAINER.");
+ALIGNED(4) const u8 gText_IfThrowAwayCardEventWontHappen[] = _("If you throw away the CARD,\nits event won’t happen. Okay?");
+ALIGNED(4) const u8 gText_OkayToDiscardNews[] = _("Is it okay to discard this\nNEWS item?");
+ALIGNED(4) const u8 gText_HaventReceivedGiftOkayToDiscard[] = _("You haven’t received the\nGIFT. Is it okay to discard?");
+ALIGNED(4) const u8 gText_DataWillBeSaved[] = _("Data will be saved.\nPlease wait.");
+ALIGNED(4) const u8 gText_SaveCompletedPressA[] = _("Save completed.\nPlease press the A Button.");
+ALIGNED(4) const u8 gText_WonderCardThrownAway[] = _("The WONDER CARD was thrown away.");
+ALIGNED(4) const u8 gText_WonderNewsThrownAway[] = _("The WONDER NEWS was thrown away.");
+ALIGNED(4) const u8 gText_MysteryGift[] = _("MYSTERY GIFT");
+ALIGNED(4) const u8 gText_PickOKExit[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}EXIT");
+ALIGNED(4) const u8 gText_PickOKCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK {B_BUTTON}CANCEL");
const u8 gText_PlayersBattleResults[] = _("{PLAYER}’s BATTLE RESULTS");
const u8 gText_TotalRecordWLD[] = _("TOTAL RECORD W:{STR_VAR_1} L:{STR_VAR_2} D:{STR_VAR_3}");
const u8 gText_WinLoseDraw[] = _("{CLEAR_TO 0x53}WIN{CLEAR_TO 0x80}LOSE{CLEAR_TO 0xB0}DRAW");
diff --git a/src/text.c b/src/text.c
index b134bcacd..ecd3a3095 100644
--- a/src/text.c
+++ b/src/text.c
@@ -29,7 +29,8 @@ u8 gUnknown_03002F84;
struct Struct_03002F90 gUnknown_03002F90;
TextFlags gTextFlags;
-const u8 gFontHalfRowOffsets[] = {
+const u8 gFontHalfRowOffsets[] =
+{
0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x03, 0x06, 0x07, 0x08, 0x06, 0x00, 0x01, 0x02, 0x00,
0x09, 0x0A, 0x0B, 0x09, 0x0C, 0x0D, 0x0E, 0x0C, 0x0F, 0x10, 0x11, 0x0F, 0x09, 0x0A, 0x0B, 0x09,
0x12, 0x13, 0x14, 0x12, 0x15, 0x16, 0x17, 0x15, 0x18, 0x19, 0x1A, 0x18, 0x12, 0x13, 0x14, 0x12,
@@ -55,7 +56,8 @@ const u8 gUnusedFRLGDownArrow[] = INCBIN_U8("data/graphics/fonts/unused_frlg_dow
const u8 gDownArrowYCoords[] = { 0x0, 0x1, 0x2, 0x1 };
const u8 gWindowVerticalScrollSpeeds[] = { 0x1, 0x2, 0x4, 0x0 };
-const struct GlyphWidthFunc gGlyphWidthFuncs[] = {
+const struct GlyphWidthFunc gGlyphWidthFuncs[] =
+{
{ 0x0, GetGlyphWidthFont0 },
{ 0x1, GetGlyphWidthFont1 },
{ 0x2, GetGlyphWidthFont2 },
@@ -67,7 +69,8 @@ const struct GlyphWidthFunc gGlyphWidthFuncs[] = {
{ 0x8, GetGlyphWidthFont8 }
};
-const struct KeypadIcon gKeypadIcons[] = {
+const struct KeypadIcon gKeypadIcons[] =
+{
{ 0x0, 0x8, 0xC },
{ 0x1, 0x8, 0xC },
{ 0x2, 0x10, 0xC },
@@ -85,7 +88,8 @@ const struct KeypadIcon gKeypadIcons[] = {
const u8 gKeypadIconTiles[] = INCBIN_U8("data/graphics/fonts/keypad_icons.4bpp");
-const struct FontInfo gFontInfos[] = {
+const struct FontInfo gFontInfos[] =
+{
{ Font0Func, 0x5, 0xC, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
{ Font1Func, 0x6, 0x10, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
{ Font2Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
@@ -98,7 +102,8 @@ const struct FontInfo gFontInfos[] = {
{ NULL, 0x8, 0x8, 0x0, 0x0, 0x0, 0x1, 0x2, 0xF }
};
-const u8 gMenuCursorDimensions[][2] = {
+const u8 gMenuCursorDimensions[][2] =
+{
{ 0x8, 0xC },
{ 0x8, 0xF },
{ 0x8, 0xE },
@@ -211,25 +216,25 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
void RunTextPrinters(void)
{
int i;
- u16 temp;
if (gUnknown_03002F84 == 0)
{
for (i = 0; i < 0x20; ++i)
{
- if (gTextPrinters[i].active != 0)
+ if (gTextPrinters[i].active)
{
- temp = RenderFont(&gTextPrinters[i]);
- switch (temp) {
- case 0:
- CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, 2);
- case 3:
- if (gTextPrinters[i].callback != 0)
- gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp);
- break;
- case 1:
- gTextPrinters[i].active = 0;
- break;
+ u16 temp = RenderFont(&gTextPrinters[i]);
+ switch (temp)
+ {
+ case 0:
+ CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, 2);
+ case 3:
+ if (gTextPrinters[i].callback != 0)
+ gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp);
+ break;
+ case 1:
+ gTextPrinters[i].active = 0;
+ break;
}
}
}
@@ -252,584 +257,156 @@ u32 RenderFont(struct TextPrinter *textPrinter)
}
}
-#ifdef NONMATCHING
void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor)
{
- u16* current = gFontHalfRowLookupTable;
+ u32 fg12, bg12, shadow12;
+ u32 temp;
+
+ u16 *current = gFontHalfRowLookupTable;
gLastTextBgColor = bgColor;
gLastTextFgColor = fgColor;
gLastTextShadowColor = shadowColor;
- *(current++) = (bgColor << 12) | (bgColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (bgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (bgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (bgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (bgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (fgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (fgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (fgColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (fgColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (shadowColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (shadowColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | bgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (shadowColor << 4) | bgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (bgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (bgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (bgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (bgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (fgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (fgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (fgColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (fgColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (shadowColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (shadowColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | fgColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (shadowColor << 4) | fgColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (bgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (bgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (bgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (bgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (fgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (fgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (fgColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (fgColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (bgColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (bgColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (bgColor << 8) | (shadowColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (fgColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (fgColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (fgColor << 8) | (shadowColor << 4) | shadowColor;
-
- *(current++) = (bgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (fgColor << 12) | (shadowColor << 8) | (shadowColor << 4) | shadowColor;
- *(current++) = (shadowColor << 12) | (shadowColor << 8) | (shadowColor << 4) | shadowColor;
-}
-#else
-NAKED
-void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor)
-{
- asm("push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, #0x24\n\
- lsl r0, #24\n\
- lsr r0, #24\n\
- lsl r1, #24\n\
- lsr r1, #24\n\
- lsl r2, #24\n\
- lsr r2, #24\n\
- ldr r3, =gFontHalfRowLookupTable\n\
- ldr r4, =gLastTextBgColor\n\
- strh r1, [r4]\n\
- ldr r4, =gLastTextFgColor\n\
- strh r0, [r4]\n\
- ldr r4, =gLastTextShadowColor\n\
- strh r2, [r4]\n\
- lsl r5, r1, #12\n\
- lsl r6, r0, #12\n\
- lsl r4, r2, #12\n\
- mov r8, r4\n\
- lsl r7, r1, #8\n\
- str r7, [sp]\n\
- lsl r4, r1, #4\n\
- mov r9, r4\n\
- orr r7, r4\n\
- str r7, [sp, #0x4]\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- lsl r7, r0, #8\n\
- mov r10, r7\n\
- mov r4, r10\n\
- mov r7, r9\n\
- orr r4, r7\n\
- str r4, [sp, #0x8]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- lsl r7, r2, #8\n\
- mov r12, r7\n\
- mov r4, r12\n\
- mov r7, r9\n\
- orr r4, r7\n\
- str r4, [sp, #0xC]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- lsl r7, r0, #4\n\
- mov r9, r7\n\
- ldr r4, [sp]\n\
- orr r4, r7\n\
- str r4, [sp, #0x10]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- mov r7, r10\n\
- add r4, r7, #0\n\
- mov r7, r9\n\
- orr r4, r7\n\
- str r4, [sp, #0x14]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- mov r7, r12\n\
- add r4, r7, #0\n\
- mov r7, r9\n\
- orr r4, r7\n\
- str r4, [sp, #0x18]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- lsl r7, r2, #4\n\
- mov r9, r7\n\
- mov r4, r9\n\
- ldr r7, [sp]\n\
- orr r7, r4\n\
- str r7, [sp, #0x1C]\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- mov r7, r9\n\
- mov r4, r10\n\
- orr r4, r7\n\
- str r4, [sp, #0x20]\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r4, r5, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- add r4, r6, #0\n\
- orr r4, r7\n\
- strh r4, [r3]\n\
- add r3, #0x2\n\
- mov r4, r8\n\
- orr r7, r4\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- mov r4, r12\n\
- mov r7, r9\n\
- orr r4, r7\n\
- add r7, r4, #0\n\
- orr r7, r1\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x4]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x8]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0xC]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x10]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x14]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x18]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x1C]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- ldr r7, [sp, #0x20]\n\
- orr r7, r0\n\
- add r1, r5, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- add r1, r6, #0\n\
- orr r1, r7\n\
- strh r1, [r3]\n\
- add r3, #0x2\n\
- mov r1, r8\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r4, #0\n\
- orr r7, r0\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r0, [sp, #0x4]\n\
- orr r7, r0\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- orr r7, r1\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x8]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0xC]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x10]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x14]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x18]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x1C]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- ldr r1, [sp, #0x20]\n\
- orr r7, r1\n\
- add r0, r5, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- add r0, r6, #0\n\
- orr r0, r7\n\
- strh r0, [r3]\n\
- add r3, #0x2\n\
- mov r0, r8\n\
- orr r7, r0\n\
- strh r7, [r3]\n\
- add r3, #0x2\n\
- add r7, r2, #0\n\
- orr r7, r4\n\
- orr r5, r7\n\
- strh r5, [r3]\n\
- add r3, #0x2\n\
- orr r6, r7\n\
- strh r6, [r3]\n\
- orr r0, r7\n\
- strh r0, [r3, #0x2]\n\
- add sp, #0x24\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");
+ bg12 = bgColor << 12;
+ fg12 = fgColor << 12;
+ shadow12 = shadowColor << 12;
+
+ temp = (bgColor << 8) | (bgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (bgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (bgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (fgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (fgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (fgColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (shadowColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (shadowColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (shadowColor << 4) | bgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (bgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (bgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (bgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (fgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (fgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (fgColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (shadowColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (shadowColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (shadowColor << 4) | fgColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (bgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (bgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (bgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (fgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (fgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (fgColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (bgColor << 8) | (shadowColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (fgColor << 8) | (shadowColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
+
+ temp = (shadowColor << 8) | (shadowColor << 4) | shadowColor;
+ *(current++) = (bg12) | temp;
+ *(current++) = (fg12) | temp;
+ *(current++) = (shadow12) | temp;
}
-#endif
void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
{
@@ -843,207 +420,49 @@ void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
GenerateFontHalfRowLookupTable(*fgColor, *bgColor, *shadowColor);
}
-#ifdef NONMATCHING
-void DecompressGlyphTile(const u16 *src, u16 *dest)
+void DecompressGlyphTile(const void *src_, void *dest_)
{
u32 temp;
+ const u16 *src = src_;
+ u32 *dest = dest_;
- temp = src[0];
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
- temp = src[1];
- src += 2;
- dest[1] = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
- dest++;
temp = *(src++);
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
+ *(dest)++ = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
temp = *(src++);
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
temp = *(src++);
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
temp = *(src++);
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]];
- *(dest++) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[src[0] & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[src[0] >> 8]];
- *(dest) = (gFontHalfRowLookupTable[gFontHalfRowOffsets[src[1] & 0xFF]] << 16) | gFontHalfRowLookupTable[gFontHalfRowOffsets[src[1] >> 8]];
-}
-#else
-NAKED
-void DecompressGlyphTile(const u16 *src, u16 *dest)
-{
- asm("push {r4-r7,lr}\n\
- mov r7, r8\n\
- push {r7}\n\
- ldrh r7, [r0]\n\
- ldr r5, =gFontHalfRowLookupTable\n\
- ldr r4, =gFontHalfRowOffsets\n\
- mov r2, #0xFF\n\
- mov r8, r2\n\
- add r2, r7, #0\n\
- mov r3, r8\n\
- and r2, r3\n\
- add r2, r4\n\
- ldrb r2, [r2]\n\
- lsl r2, #1\n\
- add r2, r5\n\
- ldrh r3, [r2]\n\
- lsl r3, #16\n\
- lsr r2, r7, #8\n\
- add r2, r4\n\
- ldrb r2, [r2]\n\
- lsl r2, #1\n\
- add r2, r5\n\
- ldrh r2, [r2]\n\
- orr r3, r2\n\
- add r6, r1, #0\n\
- stmia r6!, {r3}\n\
- ldrh r7, [r0, #0x2]\n\
- add r0, #0x4\n\
- add r2, r7, #0\n\
- mov r3, r8\n\
- and r2, r3\n\
- add r2, r4\n\
- ldrb r2, [r2]\n\
- lsl r2, #1\n\
- add r2, r5\n\
- ldrh r3, [r2]\n\
- lsl r3, #16\n\
- lsr r2, r7, #8\n\
- add r2, r4\n\
- ldrb r2, [r2]\n\
- lsl r2, #1\n\
- add r2, r5\n\
- ldrh r2, [r2]\n\
- orr r3, r2\n\
- str r3, [r1, #0x4]\n\
- add r6, #0x4\n\
- ldrh r7, [r0]\n\
- add r0, #0x2\n\
- add r1, r7, #0\n\
- mov r2, r8\n\
- and r1, r2\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r2, [r1]\n\
- lsl r2, #16\n\
- lsr r1, r7, #8\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r1, [r1]\n\
- orr r2, r1\n\
- stmia r6!, {r2}\n\
- ldrh r7, [r0]\n\
- add r0, #0x2\n\
- add r1, r7, #0\n\
- mov r3, r8\n\
- and r1, r3\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r2, [r1]\n\
- lsl r2, #16\n\
- lsr r1, r7, #8\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r1, [r1]\n\
- orr r2, r1\n\
- stmia r6!, {r2}\n\
- ldrh r7, [r0]\n\
- add r0, #0x2\n\
- add r1, r7, #0\n\
- and r1, r3\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r2, [r1]\n\
- lsl r2, #16\n\
- lsr r1, r7, #8\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r1, [r1]\n\
- orr r2, r1\n\
- stmia r6!, {r2}\n\
- ldrh r7, [r0]\n\
- add r0, #0x2\n\
- add r1, r7, #0\n\
- and r1, r3\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r2, [r1]\n\
- lsl r2, #16\n\
- lsr r1, r7, #8\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r1, [r1]\n\
- orr r2, r1\n\
- stmia r6!, {r2}\n\
- ldrh r7, [r0]\n\
- add r1, r7, #0\n\
- and r1, r3\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r2, [r1]\n\
- lsl r2, #16\n\
- lsr r1, r7, #8\n\
- add r1, r4\n\
- ldrb r1, [r1]\n\
- lsl r1, #1\n\
- add r1, r5\n\
- ldrh r1, [r1]\n\
- orr r2, r1\n\
- stmia r6!, {r2}\n\
- ldrh r7, [r0, #0x2]\n\
- add r0, r7, #0\n\
- and r0, r3\n\
- add r0, r4\n\
- ldrb r0, [r0]\n\
- lsl r0, #1\n\
- add r0, r5\n\
- ldrh r1, [r0]\n\
- lsl r1, #16\n\
- lsr r0, r7, #8\n\
- add r0, r4\n\
- ldrb r0, [r0]\n\
- lsl r0, #1\n\
- add r0, r5\n\
- ldrh r0, [r0]\n\
- orr r1, r0\n\
- str r1, [r6]\n\
- pop {r3}\n\
- mov r8, r3\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .pool");
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
+ temp = *(src++);
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
+ temp = *(src++);
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
+ temp = *(src++);
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
+
+ temp = *(src++);
+ *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
}
-#endif
u8 GetLastTextColor(u8 colorType)
{
switch (colorType)
{
- case 0:
- return gLastTextFgColor;
- case 2:
- return gLastTextBgColor;
- case 1:
- return gLastTextShadowColor;
- default:
- return 0;
+ case 0:
+ return gLastTextFgColor;
+ case 2:
+ return gLastTextBgColor;
+ case 1:
+ return gLastTextShadowColor;
+ default:
+ return 0;
}
}
@@ -2802,8 +2221,8 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
if (isJapanese == 1)
{
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40)); // gUnknown_03002F90 + 0x40
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
gUnknown_03002F90.unk81 = 12; // gGlyphHeight
}
@@ -2814,15 +2233,15 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
if (gUnknown_03002F90.unk80 <= 8)
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
}
else
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
- DecompressGlyphTile(glyphs + 0x18, (u16 *)(gUnknown_03002F90.unk60));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
+ DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
}
gUnknown_03002F90.unk81 = 13;
@@ -2845,8 +2264,8 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
{
int eff;
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40)); // gUnknown_03002F90 + 0x40
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
gUnknown_03002F90.unk81 = 15; // gGlyphHeight
}
@@ -2857,15 +2276,15 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
if (gUnknown_03002F90.unk80 <= 8)
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
}
else
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
- DecompressGlyphTile(glyphs + 0x18, (u16 *)(gUnknown_03002F90.unk60));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
+ DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
}
gUnknown_03002F90.unk81 = 15;
@@ -2887,8 +2306,8 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
if (isJapanese == TRUE)
{
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40)); // gUnknown_03002F90 + 0x40
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
gUnknown_03002F90.unk81 = 12; // gGlyphHeight
}
@@ -2899,15 +2318,15 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
if (gUnknown_03002F90.unk80 <= 8)
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
}
else
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
- DecompressGlyphTile(glyphs + 0x18, (u16 *)(gUnknown_03002F90.unk60));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
+ DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
}
gUnknown_03002F90.unk81 = 12;
@@ -2929,10 +2348,10 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
if (isJapanese == TRUE)
{
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20)); // gUnknown_03002F90 + 0x40
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40)); // gUnknown_03002F90 + 0x20
- DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90.unk60)); // gUnknown_03002F90 + 0x60
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20); // gUnknown_03002F90 + 0x40
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x20
+ DecompressGlyphTile(glyphs + 0x88, gUnknown_03002F90.unk60); // gUnknown_03002F90 + 0x60
gUnknown_03002F90.unk80 = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
gUnknown_03002F90.unk81 = 14; // gGlyphHeight
}
@@ -2943,15 +2362,15 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
if (gUnknown_03002F90.unk80 <= 8)
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
}
else
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
- DecompressGlyphTile(glyphs + 0x18, (u16 *)(gUnknown_03002F90.unk60));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
+ DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
}
gUnknown_03002F90.unk81 = 14;
@@ -2974,8 +2393,8 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
{
int eff;
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40)); // gUnknown_03002F90 + 0x40
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
gUnknown_03002F90.unk81 = 15; // gGlyphHeight
}
@@ -2986,15 +2405,15 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
if (gUnknown_03002F90.unk80 <= 8)
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
}
else
{
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
- DecompressGlyphTile(glyphs + 0x10, (u16 *)(gUnknown_03002F90.unk40));
- DecompressGlyphTile(glyphs + 0x18, (u16 *)(gUnknown_03002F90.unk60));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
+ DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
+ DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
}
gUnknown_03002F90.unk81 = 15;
@@ -3014,8 +2433,8 @@ void DecompressGlyphFont9(u16 glyphId)
const u16* glyphs;
glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
- DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
- DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40));
+ DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
+ DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40);
gUnknown_03002F90.unk80 = 8;
gUnknown_03002F90.unk81 = 12;
}