summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2019-08-02 00:45:49 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2019-08-02 00:45:49 +0200
commit9306c142b3d566c1309caae9cd54b11ea433a570 (patch)
tree9dabdb5b4128510d23da9d5ac72a1ef1c93689bd /src
parent4d2d8779bfb56385b5e35d3010d28a248780f134 (diff)
parent242bed733fb960743701e0ab088e5b2bc1d92e79 (diff)
Merge dodrio with master
Diffstat (limited to 'src')
-rw-r--r--src/battle_anim_effects_1.c39
-rwxr-xr-xsrc/battle_anim_effects_3.c28
-rw-r--r--src/contest_link_80F57C4.c918
-rw-r--r--src/contest_painting.c2
-rw-r--r--src/data/region_map/city_map_entries.h113
-rw-r--r--src/data/region_map/city_map_tilemaps.h22
-rw-r--r--src/data/text/gift_ribbon_descriptions.h115
-rw-r--r--src/data/text/match_call_messages.h476
-rw-r--r--src/data/text/ribbon_descriptions.h48
-rw-r--r--src/fldeff_flash.c8
-rw-r--r--src/pokenav_unk_10.c71
-rw-r--r--src/pokenav_unk_2.c255
-rwxr-xr-xsrc/pokenav_unk_3.c9
-rwxr-xr-xsrc/pokenav_unk_4.c198
-rwxr-xr-xsrc/pokenav_unk_5.c133
-rw-r--r--src/pokenav_unk_7.c116
-rw-r--r--src/pokenav_unk_8.c78
-rw-r--r--src/pokenav_unk_9.c74
-rw-r--r--src/text.c103
19 files changed, 1956 insertions, 850 deletions
diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c
index 15b73a1e0..b3a67a509 100644
--- a/src/battle_anim_effects_1.c
+++ b/src/battle_anim_effects_1.c
@@ -5315,21 +5315,19 @@ static void sub_8102D8C(s16 a, s16 b, s16* c, s16* d, s8 e)
static void sub_8102DE4(struct Sprite* sprite)
{
- int b;
- s16 a;
- int c;
+ s16 y, yDelta;
u8 index;
+
sprite->data[0]++;
- b = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8);
+ yDelta = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8);
sprite->data[4] += sprite->data[6];
sprite->data[5] += sprite->data[7];
sprite->pos1.x = sprite->data[4] >> 4;
sprite->pos1.y = sprite->data[5] >> 4;
- sprite->pos2.y = Sin(b, 15);
- a = (u16)sprite->pos1.y;
- c = (u16)sprite->pos1.x;
+ sprite->pos2.y = Sin(yDelta, 15);
- if ((u32)((c + 16) << 16) > (0x110) << 16 || a < -16 || a > 0x80)
+ y = sprite->pos1.y;
+ if (sprite->pos1.x < -16 || sprite->pos1.x > 256 || y < -16 || y > 128)
{
DestroySpriteAndMatrix(sprite);
}
@@ -5350,12 +5348,8 @@ static void sub_8102DE4(struct Sprite* sprite)
void sub_8102EB0(struct Sprite* sprite)
{
- int a;
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
- {
- a = gBattleAnimArgs[1];
- *(u16 *)&gBattleAnimArgs[1] = -a;
- }
+ gBattleAnimArgs[1] *= -1;
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1];
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2];
@@ -5541,8 +5535,8 @@ static void sub_8103300(struct Sprite* sprite)
static void sub_8103320(struct Sprite* sprite)
{
- s16 temp;
- s16 temp2;
+ s16 x1, x2;
+
sprite->data[1] += 4;
if (sprite->data[1] > 254)
{
@@ -5564,20 +5558,21 @@ static void sub_8103320(struct Sprite* sprite)
if (sprite->data[1] > 0x9F)
sprite->subpriority = sprite->data[2];
- temp = gSineTable[sprite->data[1]];
- sprite->pos2.x = (temp2 = temp >> 3) + (temp2 >> 1);
+ x1 = gSineTable[sprite->data[1]];
+ x2 = x1 >> 3;
+ sprite->pos2.x = (x1 >> 3) + (x2 >> 1);
}
void sub_8103390(struct Sprite* sprite)
{
- u8 bank;
+ u8 battler;
if (gBattleAnimArgs[0] == 0)
- bank = gBattleAnimAttacker;
+ battler = gBattleAnimAttacker;
else
- bank = gBattleAnimTarget;
+ battler = gBattleAnimTarget;
- sub_810310C(bank, sprite);
- if (GetBattlerSide(bank) == B_SIDE_PLAYER)
+ sub_810310C(battler, sprite);
+ if (GetBattlerSide(battler) == B_SIDE_PLAYER)
{
StartSpriteAnim(sprite, 0);
sprite->data[0] = 2;
diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c
index ab765b8c1..5d79a9e6b 100755
--- a/src/battle_anim_effects_3.c
+++ b/src/battle_anim_effects_3.c
@@ -2504,13 +2504,10 @@ void sub_815BE04(struct Sprite *sprite)
static void sub_815BF44(struct Sprite *sprite)
{
- int var0;
- s8 var1;
-
- var0 = (u16)sprite->data[2] + (u16)sprite->data[3];
- var1 = var0 >> 8;
- sprite->pos2.y -= var1;
- sprite->data[3] = var0 & 0xFF;
+ s16 delta = sprite->data[3] + sprite->data[2];
+ sprite->pos2.y -= delta >> 8;
+ sprite->data[3] += sprite->data[2];
+ sprite->data[3] &= 0xFF;
if (sprite->data[4] == 0 && sprite->pos2.y < -8)
{
gSprites[sprite->data[6]].invisible = 0;
@@ -2543,19 +2540,12 @@ static void sub_815BFF4(struct Sprite *sprite)
static void sub_815C050(struct Sprite *sprite)
{
- u16 d2;
- register u16 d3 asm("r1");
- int var0;
- s8 var1;
-
if (!sprite->invisible)
{
- d2 = sprite->data[2];
- d3 = sprite->data[3];
- var0 = d2 + d3;
- var1 = var0 >> 8;
- sprite->pos2.y -= var1;
- sprite->data[3] = var0 & 0xFF;
+ s16 delta = sprite->data[3] + sprite->data[2];
+ sprite->pos2.y -= delta >> 8;
+ sprite->data[3] += sprite->data[2];
+ sprite->data[3] &= 0xFF;
if (--sprite->data[1] == -1)
{
sprite->invisible = 1;
@@ -4322,7 +4312,7 @@ static void AnimSmellingSaltExclamationStep(struct Sprite *sprite)
// Claps a hand several times.
// arg 0: which hand
-// arg 1:
+// arg 1:
void AnimHelpingHandClap(struct Sprite *sprite)
{
if (gBattleAnimArgs[0] == 0)
diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c
index bae7859b5..a0a29f0ad 100644
--- a/src/contest_link_80F57C4.c
+++ b/src/contest_link_80F57C4.c
@@ -71,15 +71,10 @@ struct ContestLinkUnk14
u8 unk12;
};
-struct ContestLinkUnk4
-{
- struct ContestLinkUnk14 unk0[4];
-};
-
struct ContestLink80F57C4
{
struct ContestLinkUnk0 *unk0;
- struct ContestLinkUnk4 *unk4;
+ struct ContestLinkUnk14 (*unk4)[4];
u8 *unk8;
u8 *unkC[4];
u8 *unk1C;
@@ -205,9 +200,7 @@ void sub_80F57C4(void)
void sub_80F591C(void)
{
int i, j;
- s8 var0;
- s8 var1;
- int var2;
+ s8 var0, var1;
u16 tile1, tile2;
LZDecompressVram(gUnknown_08C19588, (void *)BG_CHAR_ADDR(0));
@@ -228,11 +221,7 @@ void sub_80F591C(void)
if (j < var0)
tile1 += 2;
- var2 = var1;
- if (var1 < 0)
- var2 = -var2;
-
- if (j < var2)
+ if (j < abs(var1))
{
tile2 = 0x60A4;
if (var1 < 0)
@@ -719,7 +708,7 @@ static void sub_80F6404(u8 taskId)
if (top > 80)
top = 80;
- gBattle_WIN0V = (top << 8) | (160 - top);;
+ gBattle_WIN0V = (top << 8) | (160 - top);
if (top == 80)
gTasks[taskId].data[0]++;
}
@@ -737,8 +726,7 @@ static void sub_80F6404(u8 taskId)
static void sub_80F66B4(u8 taskId)
{
- int i;
- u16 nationalDexNum;
+ int i, nationalDexNum;
if (gMain.newKeys & A_BUTTON)
{
@@ -859,13 +847,13 @@ static void sub_80F68F0(u8 taskId)
void sub_80F69B8(u16 species, u8 monIndex, u8 srcOffset, u8 useDmaNow, u32 personality)
{
- u8 frameNum;
const u8 *iconPtr;
- u16 var0;
- u16 var1;
+ u16 var0, var1, frameNum;
- u8 *contestPlayerMonIndex = &gContestPlayerMonIndex; // fake match
- frameNum = (monIndex == *contestPlayerMonIndex) ? 1 : 0;
+ if (monIndex == gContestPlayerMonIndex)
+ frameNum = 1;
+ else
+ frameNum = 0;
iconPtr = GetMonIconPtr(species, personality, frameNum);
iconPtr += srcOffset * 0x200 + 0x80;
@@ -892,13 +880,12 @@ static void LoadAllContestMonIcons(u8 srcOffset, u8 useDmaNow)
static void sub_80F6A9C(void)
{
- int i;
- register u16 species asm("r0");
+ int i, species;
for (i = 0; i < 4; i++)
{
- species = GetIconSpecies(gContestMons[i].species, 0);
- LoadPalette(gMonIconPalettes[gMonIconPaletteIndices[species]], i * 0x10 + 0xA0, 0x20);
+ species = gContestMons[i].species;
+ LoadPalette(gMonIconPalettes[gMonIconPaletteIndices[GetIconSpecies(species, 0)]], i * 0x10 + 0xA0, 0x20);
}
}
@@ -1335,11 +1322,11 @@ static void sub_80F6F40(struct Sprite *sprite)
static void sub_80F6F68(struct Sprite *sprite)
{
int i;
- s16 var0;
- var0 = (u16)sprite->data[7] + (u16)sprite->data[6];
- sprite->pos1.x -= var0 >> 8;
- sprite->data[7] = (sprite->data[6] + sprite->data[7]) & 0xFF;
+ s16 delta = sprite->data[7] + sprite->data[6];
+ sprite->pos1.x -= delta >> 8;
+ sprite->data[7] += sprite->data[6];
+ sprite->data[7] &= 0xFF;
if (sprite->pos1.x < sprite->data[4])
sprite->pos1.x = sprite->data[4];
@@ -1366,11 +1353,12 @@ static void sub_80F6FDC(struct Sprite *sprite)
static void sub_80F7014(struct Sprite *sprite)
{
int i;
- s16 var0;
+ s16 delta;
- var0 = (u16)sprite->data[7] + (u16)sprite->data[6];
- sprite->pos1.x -= var0 >> 8;
- sprite->data[7] = (sprite->data[6] + sprite->data[7]) & 0xFF;
+ delta = sprite->data[7] + sprite->data[6];
+ sprite->pos1.x -= delta >> 8;
+ sprite->data[7] += sprite->data[6];
+ sprite->data[7] &= 0xFF;
for (i = 0; i < 3; i++)
{
struct Sprite *sprite2 = &gSprites[sprite->data[i]];
@@ -1487,14 +1475,11 @@ static void sub_80F71C8(void)
CopyToBgTilemapBufferRect_ChangePalette(2, gUnknown_0203A034->unkC[2], 0, 0, 32, 4, palette);
}
-// fakematching?
u8 sub_80F7310(u8 monIndex, u8 arg1)
{
- u32 var0;
- u32 var1;
+ u32 var0 = gContestMonConditions[monIndex] << 16;
+ u32 var1 = var0 / 0x3F;
- var0 = gContestMonConditions[monIndex] << 16;
- var1 = var0 / 0x3F;
if (var1 & 0xFFFF)
var1 += 0x10000;
@@ -1510,8 +1495,7 @@ u8 sub_80F7310(u8 monIndex, u8 arg1)
s8 sub_80F7364(u8 arg0, u8 arg1)
{
- u32 r4;
- u32 r2;
+ u32 r4, r2;
s16 val;
s8 ret;
@@ -1607,9 +1591,10 @@ static void sub_80F75A8(struct Sprite *sprite)
}
else
{
- s16 delta = (u16)sprite->data[1] + 0x600;
+ s16 delta = sprite->data[1] + 0x600;
sprite->pos1.x -= delta >> 8;
- sprite->data[1] = (sprite->data[1] + 0x600) & 0xFF;
+ sprite->data[1] += 0x600;
+ sprite->data[1] &= 0xFF;
if (sprite->pos1.x < 120)
sprite->pos1.x = 120;
@@ -1624,9 +1609,10 @@ static void sub_80F75A8(struct Sprite *sprite)
static void sub_80F7620(struct Sprite *sprite)
{
- s16 delta = (u16)sprite->data[1] + 0x600;
+ s16 delta = sprite->data[1] + 0x600;
sprite->pos1.x -= delta >> 8;
- sprite->data[1] = (sprite->data[1] + 0x600) & 0xFF;
+ sprite->data[1] += + 0x600;
+ sprite->data[1] &= 0xFF;
if (sprite->pos1.x < -32)
{
sprite->callback = SpriteCallbackDummy;
@@ -1657,14 +1643,15 @@ static void sub_80F7670(u8 taskId)
void sub_80F7768(struct Sprite *sprite)
{
- register s16 var0 asm("r1");
+ s16 delta;
sprite->data[3] += sprite->data[0];
sprite->pos2.x = Sin(sprite->data[3] >> 8, sprite->data[1]);
- var0 = sprite->data[4] + sprite->data[2];
- sprite->pos1.x += var0 >> 8;
- var0 = var0 & 0xFF;
- sprite->data[4] = var0;
+ delta = sprite->data[4] + sprite->data[2];
+ sprite->pos1.x += delta >> 8;
+ sprite->data[4] += sprite->data[2];
+ sprite->data[4] &= 0xff;
+
sprite->pos1.y++;
if (gUnknown_0203A034->unk0->unk9)
sprite->invisible = 1;
@@ -1695,705 +1682,145 @@ static void sub_80F7824(u8 taskId)
}
}
-// static void sub_80F7880(void)
-// {
-// int i;
-// int var0;
-// int var1;
-// int var2;
-// int var3;
-// u32 var4;
-// int var5;
-// int var6;
-// s16 var7;
-// s16 var8;
-// s16 r2;
-
-// r2 = gUnknown_02039F08[0];
-// for (i = 1; i < 4; i++)
-// {
-// if (r2 < gUnknown_02039F08[i])
-// r2 = gUnknown_02039F08[i];
-// }
-
-// if (r2 < 0)
-// {
-// r2 = gUnknown_02039F08[0];
-// for (i = 1; i < 4; i++)
-// {
-// if (r2 > gUnknown_02039F08[i])
-// r2 = gUnknown_02039F08[i];
-// }
-// }
-
-// // _080F78E4
-// for (i = 0; i < 4; i++)
-// {
-// var0 = gContestMonConditions[i] * 1000;
-// var1 = r2;
-// if (r2 < 0)
-// var1 = -var1;
-
-// var2 = var0 / var1;
-// if (var2 % 10 > 4)
-// var2 += 10;
-
-// gUnknown_0203A034->unk4->unk0[i].unk0 = var2 / 10;
-// var3 = gUnknown_02039F18[i];
-// if (var3 < 0)
-// var3 = -var3;
-
-// var0 = var3 * 1000;
-// var1 = r2;
-// if (r2 < 0)
-// var1 = -var1;
-
-// var2 = var0 / var1;
-// if (var2 % 10 > 4)
-// var2 += 10;
-
-// // _080F7966
-// gUnknown_0203A034->unk4->unk0[i].unk4 = var2 / 10;
-// if (gUnknown_02039F18[i] < 0)
-// gUnknown_0203A034->unk4->unk0[i].unk10 = 1;
-
-// var4 = gUnknown_0203A034->unk4->unk0[i].unk0 * 22528 / 100;
-// if ((var4 & 0xFF) > 0x7F)
-// var4 += 0x100;
-
-// gUnknown_0203A034->unk4->unk0[i].unk8 = var4 >> 8;
-// var4 = gUnknown_0203A034->unk4->unk0[i].unk4 * 22528 / 100;
-// if ((var4 & 0xFF) > 0x7F)
-// var4 += 0x100;
-
-// gUnknown_0203A034->unk4->unk0[i].unkC = var4 >> 8;
-// gUnknown_0203A034->unk4->unk0[i].unk11 = sub_80F7310(i, 1);
-// var5 = sub_80F7364(i, 1);
-// if (var5 < 0)
-// var5 = -var5;
-
-// gUnknown_0203A034->unk4->unk0[i].unk12 = var5;
-// if (gContestFinalStandings[i])
-// {
-// var7 = gUnknown_0203A034->unk4->unk0[i].unk8;
-// var8 = gUnknown_0203A034->unk4->unk0[i].unkC;
-// if (gUnknown_0203A034->unk4->unk0[i].unk10)
-// var8 = -var8;
-
-// if (var7 + var8 == 88)
-// {
-// if (var8 > 0)
-// gUnknown_0203A034->unk4->unk0[i].unkC--;
-// else if (var7 > 0)
-// gUnknown_0203A034->unk4->unk0[i].unk8--;
-// }
-// }
-// }
-// }
-
-NAKED
static void sub_80F7880(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, 0x4\n\
- ldr r0, =gUnknown_02039F08\n\
- ldrh r2, [r0]\n\
- adds r4, r0, 0\n\
- adds r3, r4, 0x2\n\
- movs r0, 0x2\n\
- mov r8, r0\n\
-_080F7898:\n\
- lsls r0, r2, 16\n\
- asrs r0, 16\n\
- movs r5, 0\n\
- ldrsh r1, [r3, r5]\n\
- cmp r0, r1\n\
- bge _080F78A6\n\
- ldrh r2, [r3]\n\
-_080F78A6:\n\
- adds r3, 0x2\n\
- movs r0, 0x1\n\
- negs r0, r0\n\
- add r8, r0\n\
- mov r1, r8\n\
- cmp r1, 0\n\
- bge _080F7898\n\
- lsls r0, r2, 16\n\
- str r0, [sp]\n\
- cmp r0, 0\n\
- bge _080F78E4\n\
- ldrh r2, [r4]\n\
- adds r3, r4, 0x2\n\
- movs r4, 0x2\n\
- mov r8, r4\n\
-_080F78C4:\n\
- lsls r0, r2, 16\n\
- asrs r0, 16\n\
- movs r5, 0\n\
- ldrsh r1, [r3, r5]\n\
- cmp r0, r1\n\
- ble _080F78D2\n\
- ldrh r2, [r3]\n\
-_080F78D2:\n\
- adds r3, 0x2\n\
- movs r0, 0x1\n\
- negs r0, r0\n\
- add r8, r0\n\
- lsls r1, r2, 16\n\
- str r1, [sp]\n\
- mov r4, r8\n\
- cmp r4, 0\n\
- bge _080F78C4\n\
-_080F78E4:\n\
- movs r5, 0\n\
- mov r8, r5\n\
- mov r10, r5\n\
-_080F78EA:\n\
- ldr r0, =gContestMonConditions\n\
- mov r1, r8\n\
- lsls r7, r1, 1\n\
- adds r0, r7, r0\n\
- movs r2, 0\n\
- ldrsh r1, [r0, r2]\n\
- lsls r0, r1, 5\n\
- subs r0, r1\n\
- lsls r0, 2\n\
- adds r0, r1\n\
- lsls r0, 3\n\
- ldr r4, [sp]\n\
- asrs r5, r4, 16\n\
- adds r1, r5, 0\n\
- cmp r5, 0\n\
- bge _080F790C\n\
- negs r1, r5\n\
-_080F790C:\n\
- bl __divsi3\n\
- adds r4, r0, 0\n\
- movs r1, 0xA\n\
- bl __modsi3\n\
- cmp r0, 0x4\n\
- ble _080F791E\n\
- adds r4, 0xA\n\
-_080F791E:\n\
- ldr r0, =gUnknown_0203A034\n\
- mov r9, r0\n\
- ldr r0, [r0]\n\
- ldr r0, [r0, 0x4]\n\
- mov r1, r10\n\
- adds r6, r1, r0\n\
- adds r0, r4, 0\n\
- movs r1, 0xA\n\
- bl __divsi3\n\
- str r0, [r6]\n\
- ldr r0, =gUnknown_02039F18\n\
- adds r7, r0\n\
- movs r2, 0\n\
- ldrsh r1, [r7, r2]\n\
- cmp r1, 0\n\
- bge _080F7942\n\
- negs r1, r1\n\
-_080F7942:\n\
- lsls r0, r1, 5\n\
- subs r0, r1\n\
- lsls r0, 2\n\
- adds r0, r1\n\
- lsls r0, 3\n\
- adds r1, r5, 0\n\
- cmp r1, 0\n\
- bge _080F7954\n\
- negs r1, r1\n\
-_080F7954:\n\
- bl __divsi3\n\
- adds r4, r0, 0\n\
- movs r1, 0xA\n\
- bl __modsi3\n\
- cmp r0, 0x4\n\
- ble _080F7966\n\
- adds r4, 0xA\n\
-_080F7966:\n\
- adds r0, r4, 0\n\
- movs r1, 0xA\n\
- bl __divsi3\n\
- str r0, [r6, 0x4]\n\
- movs r4, 0\n\
- ldrsh r0, [r7, r4]\n\
- cmp r0, 0\n\
- bge _080F797C\n\
- movs r0, 0x1\n\
- strb r0, [r6, 0x10]\n\
-_080F797C:\n\
- mov r5, r9\n\
- ldr r0, [r5]\n\
- ldr r0, [r0, 0x4]\n\
- mov r1, r10\n\
- adds r4, r1, r0\n\
- ldr r1, [r4]\n\
- lsls r0, r1, 1\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- subs r0, r1\n\
- lsls r0, 11\n\
- movs r1, 0x64\n\
- bl __divsi3\n\
- adds r1, r0, 0\n\
- movs r5, 0xFF\n\
- ands r0, r5\n\
- cmp r0, 0x7F\n\
- bls _080F79A8\n\
- movs r2, 0x80\n\
- lsls r2, 1\n\
- adds r1, r2\n\
-_080F79A8:\n\
- lsrs r0, r1, 8\n\
- str r0, [r4, 0x8]\n\
- ldr r1, [r4, 0x4]\n\
- lsls r0, r1, 1\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- subs r0, r1\n\
- lsls r0, 11\n\
- movs r1, 0x64\n\
- bl __divsi3\n\
- adds r1, r0, 0\n\
- ands r0, r5\n\
- cmp r0, 0x7F\n\
- bls _080F79CC\n\
- movs r5, 0x80\n\
- lsls r5, 1\n\
- adds r1, r5\n\
-_080F79CC:\n\
- lsrs r0, r1, 8\n\
- str r0, [r4, 0xC]\n\
- mov r0, r8\n\
- lsls r4, r0, 24\n\
- lsrs r4, 24\n\
- adds r0, r4, 0\n\
- movs r1, 0x1\n\
- bl sub_80F7310\n\
- mov r2, r9\n\
- ldr r1, [r2]\n\
- ldr r1, [r1, 0x4]\n\
- add r1, r10\n\
- strb r0, [r1, 0x11]\n\
- adds r0, r4, 0\n\
- movs r1, 0x1\n\
- bl sub_80F7364\n\
- mov r4, r9\n\
- ldr r1, [r4]\n\
- ldr r1, [r1, 0x4]\n\
- add r1, r10\n\
- lsls r0, 24\n\
- asrs r0, 24\n\
- cmp r0, 0\n\
- bge _080F7A02\n\
- negs r0, r0\n\
-_080F7A02:\n\
- strb r0, [r1, 0x12]\n\
- ldr r0, =gContestFinalStandings\n\
- add r0, r8\n\
- ldrb r0, [r0]\n\
- cmp r0, 0\n\
- beq _080F7A60\n\
- mov r5, r9\n\
- ldr r0, [r5]\n\
- ldr r0, [r0, 0x4]\n\
- mov r2, r10\n\
- adds r1, r2, r0\n\
- ldr r5, [r1, 0x8]\n\
- ldrh r3, [r1, 0x8]\n\
- ldr r4, [r1, 0xC]\n\
- ldrh r2, [r1, 0xC]\n\
- ldrb r0, [r1, 0x10]\n\
- cmp r0, 0\n\
- beq _080F7A2C\n\
- lsls r0, r2, 16\n\
- negs r0, r0\n\
- lsrs r2, r0, 16\n\
-_080F7A2C:\n\
- lsls r0, r3, 16\n\
- asrs r3, r0, 16\n\
- lsls r0, r2, 16\n\
- asrs r2, r0, 16\n\
- adds r0, r3, r2\n\
- cmp r0, 0x58\n\
- bne _080F7A60\n\
- cmp r2, 0\n\
- ble _080F7A58\n\
- subs r0, r4, 0x1\n\
- str r0, [r1, 0xC]\n\
- b _080F7A60\n\
- .pool\n\
-_080F7A58:\n\
- cmp r3, 0\n\
- ble _080F7A60\n\
- subs r0, r5, 0x1\n\
- str r0, [r1, 0x8]\n\
-_080F7A60:\n\
- movs r4, 0x14\n\
- add r10, r4\n\
- movs r5, 0x1\n\
- add r8, r5\n\
- mov r0, r8\n\
- cmp r0, 0x3\n\
- bgt _080F7A70\n\
- b _080F78EA\n\
-_080F7A70:\n\
- add sp, 0x4\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0");
-}
-
-// static void sub_80F7A80(u8 arg0, u8 arg1)
-// {
-// int i;
-// u8 taskId;
-// u8 sp8, spC;
-
-// sp8 = 0;
-// spC = 0;
-// if (!arg0)
-// {
-// u32 var0;
-// for (i = 0; i < 4; i++)
-// {
-// int var1 = gUnknown_0203A034->unk4->unk0[i].unk11;
-// if (arg1 < var1)
-// {
-// int x = var1 + 19;
-// x -= arg1;
-// x--;
-// FillBgTilemapBufferRect_Palette0(1, 0x60B3, x, i * 3 + 5, 1, 1);
-// taskId = CreateTask(sub_80F7CA8, 10);
-// var0 = ((gUnknown_0203A034->unk4->unk0[i].unk8 << 16) / gUnknown_0203A034->unk4->unk0[i].unk11) * (arg1 + 1);
-// var0 &= 0xFFFF;
-// if (var0 > 0x7FFF)
-// var0 += 0x10000;
-
-// gTasks[taskId].data[0] = i;
-// gTasks[taskId].data[1] = var0 >> 16;
-// gUnknown_0203A034->unk0->unk14++;
-// sp8++;
-// }
-// }
-// }
-// else
-// {
-// u32 var0;
-// for (i = 0; i < 4; i++)
-// {
-// int tile;
-// s8 var1 = gUnknown_0203A034->unk4->unk0[i].unk12;
-// tile = gUnknown_0203A034->unk4->unk0[i].unk10 ? 0x60A5 : 0x60A3;
-// if (arg1 < var1)
-// {
-// int thing = ((s8)arg1 - 19);
-// int x = var1 - thing;
-// x--;
-// FillBgTilemapBufferRect_Palette0(1, tile, x, i * 3 + 6, 1, 1);
-// taskId = CreateTask(sub_80F7CA8, 10);
-// var0 = ((gUnknown_0203A034->unk4->unk0[i].unkC << 16) / gUnknown_0203A034->unk4->unk0[i].unk12) * (arg1 + 1);
-// var0 &= 0xFFFF;
-// if (var0 > 0x7FFF)
-// var0 += 0x10000;
-
-// gTasks[taskId].data[0] = i;
-// if (gUnknown_0203A034->unk4->unk0[i].unk10)
-// {
-// gTasks[taskId].data[2] = 1;
-// spC++;
-// }
-// else
-// {
-// sp8++;
-// }
-
-// if (gUnknown_0203A034->unk4->unk0[i].unk10)
-// gTasks[taskId].data[1] = gUnknown_0203A034->unk4->unk0[i].unk8 - (var0 >> 16);
-// else
-// gTasks[taskId].data[1] = gUnknown_0203A034->unk4->unk0[i].unk8 + (var0 >> 16);
-
-// gUnknown_0203A034->unk0->unk14++;
-// }
-// }
-// }
-
-// if (spC)
-// PlaySE(SE_PIN);
-
-// if (sp8)
-// PlaySE(SE_BAN);
-// }
+ int i, r4;
+ u32 r1;
+ s16 r2;
+ s8 var;
+
+ r2 = gUnknown_02039F08[0];
+ for (i = 1; i < 4; i++)
+ {
+ if (r2 < gUnknown_02039F08[i])
+ r2 = gUnknown_02039F08[i];
+ }
+
+ if (r2 < 0)
+ {
+ r2 = gUnknown_02039F08[0];
+ for (i = 1; i < 4; i++)
+ {
+ if (r2 > gUnknown_02039F08[i])
+ r2 = gUnknown_02039F08[i];
+ }
+ }
+
+ for (i = 0; i < 4; i++)
+ {
+ r4 = (gContestMonConditions[i] * 1000) / abs(r2);
+ if (r4 % 10 > 4)
+ r4 += 10;
+ (*gUnknown_0203A034->unk4)[i].unk0 = r4 / 10;
+
+ r4 = (abs(gUnknown_02039F18[i]) * 1000) / abs(r2);
+ if (r4 % 10 > 4)
+ r4 += 10;
+ (*gUnknown_0203A034->unk4)[i].unk4 = r4 / 10;
+
+ if (gUnknown_02039F18[i] < 0)
+ (*gUnknown_0203A034->unk4)[i].unk10 = 1;
+
+ r1 = ((*gUnknown_0203A034->unk4)[i].unk0 * 22528) / 100;
+ if ((r1 & 0xFF) > 0x7F)
+ r1 += 0x100;
+ (*gUnknown_0203A034->unk4)[i].unk8 = r1 >> 8;
+
+ r1 = ((*gUnknown_0203A034->unk4)[i].unk4 * 22528) / 100;
+ if ((r1 & 0xFF) > 0x7F)
+ r1 += 0x100;
+ (*gUnknown_0203A034->unk4)[i].unkC = r1 >> 8;
+
+ (*gUnknown_0203A034->unk4)[i].unk11 = sub_80F7310(i, 1);
+ var = sub_80F7364(i, 1);
+ (*gUnknown_0203A034->unk4)[i].unk12 = abs(var);
+
+ if (gContestFinalStandings[i])
+ {
+ s16 var1 = (*gUnknown_0203A034->unk4)[i].unk8;
+ s16 var2 = (*gUnknown_0203A034->unk4)[i].unkC;
+
+ if ((*gUnknown_0203A034->unk4)[i].unk10)
+ var2 *= -1;
+
+ if (var1 + var2 == 88)
+ {
+ if (var2 > 0)
+ (*gUnknown_0203A034->unk4)[i].unkC--;
+ else if (var1 > 0)
+ (*gUnknown_0203A034->unk4)[i].unk8--;
+ }
+ }
+ }
+}
-NAKED
static void sub_80F7A80(u8 arg0, u8 arg1)
{
- 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, 0x14\n\
- lsls r0, 24\n\
- lsls r1, 24\n\
- lsrs r1, 24\n\
- mov r8, r1\n\
- movs r1, 0\n\
- str r1, [sp, 0x8]\n\
- movs r3, 0\n\
- str r3, [sp, 0xC]\n\
- cmp r0, 0\n\
- bne _080F7B5C\n\
- mov r9, r3\n\
- ldr r4, =gUnknown_0203A034\n\
- mov r10, r4\n\
- movs r7, 0xA0\n\
- lsls r7, 19\n\
- movs r6, 0\n\
-_080F7AAC:\n\
- mov r1, r10\n\
- ldr r0, [r1]\n\
- ldr r0, [r0, 0x4]\n\
- adds r0, r6, r0\n\
- ldrb r2, [r0, 0x11]\n\
- cmp r8, r2\n\
- bcs _080F7B2E\n\
- adds r2, 0x13\n\
- mov r3, r8\n\
- subs r2, r3\n\
- subs r2, 0x1\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- lsrs r3, r7, 24\n\
- movs r0, 0x1\n\
- str r0, [sp]\n\
- str r0, [sp, 0x4]\n\
- ldr r1, =0x000060b3\n\
- bl FillBgTilemapBufferRect_Palette0\n\
- ldr r0, =sub_80F7CA8\n\
- movs r1, 0xA\n\
- bl CreateTask\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
- mov r0, r10\n\
- ldr r4, [r0]\n\
- ldr r1, [r4, 0x4]\n\
- adds r1, r6, r1\n\
- ldr r0, [r1, 0x8]\n\
- lsls r0, 16\n\
- ldrb r1, [r1, 0x11]\n\
- bl __udivsi3\n\
- mov r1, r8\n\
- adds r1, 0x1\n\
- adds r3, r0, 0\n\
- muls r3, r1\n\
- ldr r0, =0x0000ffff\n\
- ands r0, r3\n\
- ldr r1, =0x00007fff\n\
- cmp r0, r1\n\
- bls _080F7B0A\n\
- movs r1, 0x80\n\
- lsls r1, 9\n\
- adds r3, r1\n\
-_080F7B0A:\n\
- ldr r1, =gTasks\n\
- lsls r0, r5, 2\n\
- adds r0, r5\n\
- lsls r0, 3\n\
- adds r0, r1\n\
- mov r1, r9\n\
- strh r1, [r0, 0x8]\n\
- lsrs r1, r3, 16\n\
- strh r1, [r0, 0xA]\n\
- ldr r1, [r4]\n\
- ldrb r0, [r1, 0x14]\n\
- adds r0, 0x1\n\
- strb r0, [r1, 0x14]\n\
- ldr r0, [sp, 0x8]\n\
- adds r0, 0x1\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- str r0, [sp, 0x8]\n\
-_080F7B2E:\n\
- movs r3, 0xC0\n\
- lsls r3, 18\n\
- adds r7, r3\n\
- adds r6, 0x14\n\
- movs r4, 0x1\n\
- add r9, r4\n\
- mov r0, r9\n\
- cmp r0, 0x3\n\
- ble _080F7AAC\n\
- b _080F7C7E\n\
- .pool\n\
-_080F7B5C:\n\
- movs r1, 0\n\
- mov r9, r1\n\
- mov r10, r1\n\
- movs r3, 0xC0\n\
- lsls r3, 19\n\
- str r3, [sp, 0x10]\n\
-_080F7B68:\n\
- ldr r4, =gUnknown_0203A034\n\
- ldr r0, [r4]\n\
- ldr r0, [r0, 0x4]\n\
- add r0, r10\n\
- ldrb r2, [r0, 0x12]\n\
- ldrb r0, [r0, 0x10]\n\
- ldr r1, =0x000060a3\n\
- cmp r0, 0\n\
- beq _080F7B7C\n\
- adds r1, 0x2\n\
-_080F7B7C:\n\
- lsls r0, r2, 24\n\
- asrs r0, 24\n\
- cmp r8, r0\n\
- bge _080F7C64\n\
- mov r3, r8\n\
- lsls r2, r3, 24\n\
- asrs r2, 24\n\
- subs r2, 0x13\n\
- subs r2, r0, r2\n\
- subs r2, 0x1\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- ldr r4, [sp, 0x10]\n\
- lsrs r3, r4, 24\n\
- movs r7, 0x1\n\
- str r7, [sp]\n\
- str r7, [sp, 0x4]\n\
- movs r0, 0x1\n\
- bl FillBgTilemapBufferRect_Palette0\n\
- ldr r0, =sub_80F7CA8\n\
- movs r1, 0xA\n\
- bl CreateTask\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
- ldr r0, =gUnknown_0203A034\n\
- ldr r6, [r0]\n\
- ldr r1, [r6, 0x4]\n\
- add r1, r10\n\
- ldr r0, [r1, 0xC]\n\
- lsls r0, 16\n\
- ldrb r1, [r1, 0x12]\n\
- bl __udivsi3\n\
- mov r1, r8\n\
- adds r1, 0x1\n\
- adds r3, r0, 0\n\
- muls r3, r1\n\
- ldr r0, =0x0000ffff\n\
- ands r0, r3\n\
- ldr r1, =0x00007fff\n\
- cmp r0, r1\n\
- bls _080F7BDA\n\
- movs r1, 0x80\n\
- lsls r1, 9\n\
- adds r3, r1\n\
-_080F7BDA:\n\
- ldr r1, =gTasks\n\
- lsls r2, r5, 2\n\
- adds r0, r2, r5\n\
- lsls r0, 3\n\
- adds r4, r0, r1\n\
- mov r0, r9\n\
- strh r0, [r4, 0x8]\n\
- ldr r0, [r6, 0x4]\n\
- add r0, r10\n\
- ldrb r0, [r0, 0x10]\n\
- adds r6, r1, 0\n\
- cmp r0, 0\n\
- beq _080F7C1C\n\
- strh r7, [r4, 0xC]\n\
- ldr r0, [sp, 0xC]\n\
- adds r0, 0x1\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- str r0, [sp, 0xC]\n\
- b _080F7C26\n\
- .pool\n\
-_080F7C1C:\n\
- ldr r0, [sp, 0x8]\n\
- adds r0, 0x1\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- str r0, [sp, 0x8]\n\
-_080F7C26:\n\
- ldr r1, =gUnknown_0203A034\n\
- ldr r0, [r1]\n\
- ldr r0, [r0, 0x4]\n\
- mov r4, r10\n\
- adds r1, r4, r0\n\
- ldrb r0, [r1, 0x10]\n\
- ldr r4, =gUnknown_0203A034\n\
- cmp r0, 0\n\
- beq _080F7C4C\n\
- adds r0, r2, r5\n\
- lsls r0, 3\n\
- adds r0, r6\n\
- lsrs r2, r3, 16\n\
- ldr r1, [r1, 0x8]\n\
- subs r1, r2\n\
- b _080F7C58\n\
- .pool\n\
-_080F7C4C:\n\
- adds r0, r2, r5\n\
- lsls r0, 3\n\
- adds r0, r6\n\
- lsrs r2, r3, 16\n\
- ldr r1, [r1, 0x8]\n\
- adds r1, r2\n\
-_080F7C58:\n\
- strh r1, [r0, 0xA]\n\
- ldr r0, [r4]\n\
- ldr r1, [r0]\n\
- ldrb r0, [r1, 0x14]\n\
- adds r0, 0x1\n\
- strb r0, [r1, 0x14]\n\
-_080F7C64:\n\
- movs r0, 0x14\n\
- add r10, r0\n\
- ldr r1, [sp, 0x10]\n\
- movs r3, 0xC0\n\
- lsls r3, 18\n\
- adds r1, r3\n\
- str r1, [sp, 0x10]\n\
- movs r4, 0x1\n\
- add r9, r4\n\
- mov r0, r9\n\
- cmp r0, 0x3\n\
- bgt _080F7C7E\n\
- b _080F7B68\n\
-_080F7C7E:\n\
- ldr r1, [sp, 0xC]\n\
- cmp r1, 0\n\
- beq _080F7C8A\n\
- movs r0, 0x16\n\
- bl PlaySE\n\
-_080F7C8A:\n\
- ldr r3, [sp, 0x8]\n\
- cmp r3, 0\n\
- beq _080F7C96\n\
- movs r0, 0x15\n\
- bl PlaySE\n\
-_080F7C96:\n\
- add sp, 0x14\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");
+ int i, taskId;
+ u32 var0;
+ u8 sp8 = 0, spC = 0;
+
+ if (!arg0)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ u8 unk = (*gUnknown_0203A034->unk4)[i].unk11;
+ if (arg1 < unk)
+ {
+ FillBgTilemapBufferRect_Palette0(1, 0x60B3, ((19 + unk) - arg1) - 1, i * 3 + 5, 1, 1);
+ taskId = CreateTask(sub_80F7CA8, 10);
+
+ var0 = (((*gUnknown_0203A034->unk4)[i].unk8 << 16) / (*gUnknown_0203A034->unk4)[i].unk11) * (arg1 + 1);
+ if ((var0 & 0xFFFF) > 0x7FFF)
+ var0 += 0x10000;
+
+ gTasks[taskId].data[0] = i;
+ gTasks[taskId].data[1] = var0 >> 16;
+ gUnknown_0203A034->unk0->unk14++;
+ sp8++;
+ }
+ }
+ }
+ else
+ {
+ for (i = 0; i < 4; i++)
+ {
+ s8 unk = (*gUnknown_0203A034->unk4)[i].unk12;
+ u32 tile = (*gUnknown_0203A034->unk4)[i].unk10 ? 0x60A5 : 0x60A3;
+ if (arg1 < unk)
+ {
+ FillBgTilemapBufferRect_Palette0(1, tile, ((19 + unk) - arg1) - 1, i * 3 + 6, 1, 1);
+ taskId = CreateTask(sub_80F7CA8, 10);
+
+ var0 = (((*gUnknown_0203A034->unk4)[i].unkC << 16) / (*gUnknown_0203A034->unk4)[i].unk12) * (arg1 + 1);
+ if ((var0 & 0xFFFF) > 0x7FFF)
+ var0 += 0x10000;
+
+ gTasks[taskId].data[0] = i;
+ if ((*gUnknown_0203A034->unk4)[i].unk10)
+ {
+ gTasks[taskId].data[2] = 1;
+ spC++;
+ }
+ else
+ {
+ sp8++;
+ }
+
+ if ((*gUnknown_0203A034->unk4)[i].unk10)
+ gTasks[taskId].data[1] = -(var0 >> 16) + (*gUnknown_0203A034->unk4)[i].unk8 ;
+ else
+ gTasks[taskId].data[1] = (var0 >> 16) + (*gUnknown_0203A034->unk4)[i].unk8;
+
+ gUnknown_0203A034->unk0->unk14++;
+ }
+ }
+ }
+
+ if (spC)
+ PlaySE(SE_BOO);
+ if (sp8)
+ PlaySE(SE_PIN);
}
void sub_80F7CA8(u8 taskId)
@@ -2624,8 +2051,7 @@ void sub_80F8290(void)
void sub_80F82B4(void)
{
- u8 i;
- u8 count;
+ u8 i, count;
for (i = 0, count = 0; i < 4; i++)
{
diff --git a/src/contest_painting.c b/src/contest_painting.c
index 820505b6e..66127cbbc 100644
--- a/src/contest_painting.c
+++ b/src/contest_painting.c
@@ -684,7 +684,7 @@ static void sub_8130760(u8 contestResult)
gUnknown_030061A0.var_16 = 2;
gUnknown_030061A0.var_0 = contestResult;
- gUnknown_030061A0.var_10 = 0x6010000;
+ gUnknown_030061A0.var_10 = OBJ_VRAM0;
sub_8124F2C(&gUnknown_030061A0);
sub_81261A4(&gUnknown_030061A0);
diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h
new file mode 100644
index 000000000..7b8361a7c
--- /dev/null
+++ b/src/data/region_map/city_map_entries.h
@@ -0,0 +1,113 @@
+const struct CityMapEntry gPokenavCityMaps[] =
+{
+ {
+ .mapSecId = 0,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Littleroot_0,
+ },
+ {
+ .mapSecId = 1,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Oldale_0,
+ },
+ {
+ .mapSecId = 2,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Dewford_0,
+ },
+ {
+ .mapSecId = 3,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Lavarige_0,
+ },
+ {
+ .mapSecId = 4,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Fallarbor_0,
+ },
+ {
+ .mapSecId = 5,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Verdanturf_0,
+ },
+ {
+ .mapSecId = 6,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Pacifidlog_0,
+ },
+ {
+ .mapSecId = 7,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Petalburg_0,
+ },
+ {
+ .mapSecId = 8,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Slateport_0,
+ },
+ {
+ .mapSecId = 8,
+ .index = 1,
+ .tilemap = gPokenavCityMap_Slateport_1,
+ },
+ {
+ .mapSecId = 9,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Mauville_0,
+ },
+ {
+ .mapSecId = 9,
+ .index = 1,
+ .tilemap = gPokenavCityMap_Mauville_1,
+ },
+ {
+ .mapSecId = 10,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Rustboro_0,
+ },
+ {
+ .mapSecId = 10,
+ .index = 1,
+ .tilemap = gPokenavCityMap_Rustboro_1,
+ },
+ {
+ .mapSecId = 11,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Fortree_0,
+ },
+ {
+ .mapSecId = 12,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Lilycove_0,
+ },
+ {
+ .mapSecId = 12,
+ .index = 1,
+ .tilemap = gPokenavCityMap_Lilycove_1,
+ },
+ {
+ .mapSecId = 13,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Mossdeep_0,
+ },
+ {
+ .mapSecId = 13,
+ .index = 1,
+ .tilemap = gPokenavCityMap_Mossdeep_1,
+ },
+ {
+ .mapSecId = 14,
+ .index = 0,
+ .tilemap = gPokenavCityMap_Sootopolis_0,
+ },
+ {
+ .mapSecId = 15,
+ .index = 0,
+ .tilemap = gPokenavCityMap_EverGrande_0,
+ },
+ {
+ .mapSecId = 15,
+ .index = 1,
+ .tilemap = gPokenavCityMap_EverGrande_1,
+ },
+};
diff --git a/src/data/region_map/city_map_tilemaps.h b/src/data/region_map/city_map_tilemaps.h
new file mode 100644
index 000000000..8a8a931f9
--- /dev/null
+++ b/src/data/region_map/city_map_tilemaps.h
@@ -0,0 +1,22 @@
+const u32 gPokenavCityMap_Lavarige_0[] = INCBIN_U32("graphics/pokenav/city_maps/lavaridge_0.bin.lz");
+const u32 gPokenavCityMap_Fallarbor_0[] = INCBIN_U32("graphics/pokenav/city_maps/fallarbor_0.bin.lz");
+const u32 gPokenavCityMap_Fortree_0[] = INCBIN_U32("graphics/pokenav/city_maps/fortree_0.bin.lz");
+const u32 gPokenavCityMap_Slateport_0[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_0.bin.lz");
+const u32 gPokenavCityMap_Slateport_1[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_1.bin.lz");
+const u32 gPokenavCityMap_Rustboro_0[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_0.bin.lz");
+const u32 gPokenavCityMap_Rustboro_1[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_1.bin.lz");
+const u32 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U32("graphics/pokenav/city_maps/pacifidlog_0.bin.lz");
+const u32 gPokenavCityMap_Mauville_1[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_1.bin.lz");
+const u32 gPokenavCityMap_Mauville_0[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_0.bin.lz");
+const u32 gPokenavCityMap_Oldale_0[] = INCBIN_U32("graphics/pokenav/city_maps/oldale_0.bin.lz");
+const u32 gPokenavCityMap_Lilycove_1[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_1.bin.lz");
+const u32 gPokenavCityMap_Lilycove_0[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_0.bin.lz");
+const u32 gPokenavCityMap_Littleroot_0[] = INCBIN_U32("graphics/pokenav/city_maps/littleroot_0.bin.lz");
+const u32 gPokenavCityMap_Dewford_0[] = INCBIN_U32("graphics/pokenav/city_maps/dewford_0.bin.lz");
+const u32 gPokenavCityMap_Sootopolis_0[] = INCBIN_U32("graphics/pokenav/city_maps/sootopolis_0.bin.lz");
+const u32 gPokenavCityMap_EverGrande_0[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_0.bin.lz");
+const u32 gPokenavCityMap_EverGrande_1[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_1.bin.lz");
+const u32 gPokenavCityMap_Verdanturf_0[] = INCBIN_U32("graphics/pokenav/city_maps/verdanturf_0.bin.lz");
+const u32 gPokenavCityMap_Mossdeep_1[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_1.bin.lz");
+const u32 gPokenavCityMap_Mossdeep_0[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_0.bin.lz");
+const u32 gPokenavCityMap_Petalburg_0[] = INCBIN_U32("graphics/pokenav/city_maps/petalburg_0.bin.lz");
diff --git a/src/data/text/gift_ribbon_descriptions.h b/src/data/text/gift_ribbon_descriptions.h
new file mode 100644
index 000000000..ea108be18
--- /dev/null
+++ b/src/data/text/gift_ribbon_descriptions.h
@@ -0,0 +1,115 @@
+const u8 gGiftRibbonDescriptionPart1_2003RegionalTourney[] = _("2003 REGIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart2_Champion[] = _("CHAMPION RIBBON");
+const u8 gGiftRibbonDescriptionPart1_2003NationalTourney[] = _("2003 NATIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart1_2003GlobalCup[] = _("2003 GLOBAL CUP");
+const u8 gGiftRibbonDescriptionPart2_RunnerUp[] = _("Runner-up RIBBON");
+const u8 gGiftRibbonDescriptionPart2_Semifinalist[] = _("Semifinalist RIBBON");
+const u8 gGiftRibbonDescriptionPart1_2004RegionalTourney[] = _("2004 REGIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart1_2004NationalTourney[] = _("2004 NATIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart1_2004GlobalCup[] = _("2004 GLOBAL CUP");
+const u8 gGiftRibbonDescriptionPart1_2005RegionalTourney[] = _("2005 REGIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart1_2005NationalTourney[] = _("2005 NATIONAL TOURNEY");
+const u8 gGiftRibbonDescriptionPart1_2005GlobalCup[] = _("2005 GLOBAL CUP");
+const u8 gGiftRibbonDescriptionPart1_PokemonBattleCup[] = _("POKéMON BATTLE CUP");
+const u8 gGiftRibbonDescriptionPart2_Participation[] = _("Participation RIBBON");
+const u8 gGiftRibbonDescriptionPart1_PokemonLeague[] = _("POKéMON LEAGUE");
+const u8 gGiftRibbonDescriptionPart1_AdvanceCup[] = _("ADVANCE CUP");
+const u8 gGiftRibbonDescriptionPart1_PokemonTournament[] = _("POKéMON Tournament");
+const u8 gGiftRibbonDescriptionPart2_Participation2[] = _("Participation RIBBON");
+const u8 gGiftRibbonDescriptionPart1_PokemonEvent[] = _("POKéMON Event");
+const u8 gGiftRibbonDescriptionPart1_PokemonFestival[] = _("POKéMON Festival");
+const u8 gGiftRibbonDescriptionPart1_DifficultyClearing[] = _("Difficulty-clearing");
+const u8 gGiftRibbonDescriptionPart2_Commemorative[] = _("Commemorative RIBBON");
+const u8 gGiftRibbonDescriptionPart1_ClearingAllChallenges[] = _("RIBBON awarded for");
+const u8 gGiftRibbonDescriptionPart2_ClearingAllChallenges[] = _("clearing all challenges.");
+const u8 gGiftRibbonDescriptionPart1_100StraightWin[] = _("100-straight Win");
+const u8 gGiftRibbonDescriptionPart1_DarknessTower[] = _("DARKNESS TOWER Clear");
+const u8 gGiftRibbonDescriptionPart1_RedTower[] = _("RED TOWER Clear");
+const u8 gGiftRibbonDescriptionPart1_BlackironTower[] = _("BLACKIRON TOWER Clear");
+const u8 gGiftRibbonDescriptionPart1_FinalTower[] = _("FINAL TOWER Clear");
+const u8 gGiftRibbonDescriptionPart1_LegendMaking[] = _("Legend-making");
+const u8 gGiftRibbonDescriptionPart1_PokemonCenterTokyo[] = _("POKéMON CENTER TOKYO");
+const u8 gGiftRibbonDescriptionPart1_PokemonCenterOsaka[] = _("POKéMON CENTER OSAKA");
+const u8 gGiftRibbonDescriptionPart1_PokemonCenterNagoya[] = _("POKéMON CENTER NAGOYA");
+const u8 gGiftRibbonDescriptionPart1_PokemonCenterNY[] = _("POKéMON CENTER NY");
+const u8 gGiftRibbonDescriptionPart1_SummerHolidays[] = _("Summer Holidays RIBBON");
+const u8 gGiftRibbonDescriptionPart2_EmptyString[] = _("");
+const u8 gGiftRibbonDescriptionPart1_WinterHolidays[] = _("Winter Holidays RIBBON");
+const u8 gGiftRibbonDescriptionPart1_SpringHolidays[] = _("Spring Holidays RIBBON");
+const u8 gGiftRibbonDescriptionPart1_Evergreen[] = _("Evergreen RIBBON");
+const u8 gGiftRibbonDescriptionPart1_SpecialHoliday[] = _("Special Holiday RIBBON");
+const u8 gGiftRibbonDescriptionPart1_HardWorker[] = _("Hard Worker RIBBON");
+const u8 gGiftRibbonDescriptionPart1_LotsOfFriends[] = _("Lots of Friends RIBBON");
+const u8 gGiftRibbonDescriptionPart1_FullOfEnergy[] = _("Full of Energy RIBBON");
+const u8 gGiftRibbonDescriptionPart1_LovedPokemon[] = _("A commemorative RIBBON");
+const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _("for a loved POKéMON.");
+const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows");
+const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON.");
+
+const u8 *const gGiftRibbonDescriptionPointers[][2] =
+{
+ {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation},
+ {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation},
+ {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion},
+ {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp},
+ {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist},
+ {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation},
+ {gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2},
+ {gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2},
+ {gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2},
+ {gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_ClearingAllChallenges, gGiftRibbonDescriptionPart2_ClearingAllChallenges},
+ {gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative},
+ {gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString},
+ {gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon},
+ {gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon}
+};
diff --git a/src/data/text/match_call_messages.h b/src/data/text/match_call_messages.h
new file mode 100644
index 000000000..c3015b5a7
--- /dev/null
+++ b/src/data/text/match_call_messages.h
@@ -0,0 +1,476 @@
+#define MCFLAVOR(name) {gMatchCallFlavorText_##name##_Strategy, \
+ gMatchCallFlavorText_##name##_Pokemon, \
+ gMatchCallFlavorText_##name##_Intro1, \
+ gMatchCallFlavorText_##name##_Intro2}
+
+const u8 gMatchCallFlavorText_AromaLady_Rose_Strategy[] = _("Becalm fighting emotions.");
+const u8 gMatchCallFlavorText_AromaLady_Rose_Pokemon[] = _("Fragrant GRASS POKéMON.");
+const u8 gMatchCallFlavorText_AromaLady_Rose_Intro1[] = _("Soothing aromas make the");
+const u8 gMatchCallFlavorText_AromaLady_Rose_Intro2[] = _("body and mind healthy.");
+
+const u8 gMatchCallFlavorText_RuinManiac_Andres_Strategy[] = _("I'm not very good at this.");
+const u8 gMatchCallFlavorText_RuinManiac_Andres_Pokemon[] = _("Ruin-exploration partners.");
+const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro1[] = _("I am searching for undersea");
+const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro2[] = _("ruins and relics.");
+
+const u8 gMatchCallFlavorText_RuinManiac_Dusty_Strategy[] = _("Overwhelm with power!");
+const u8 gMatchCallFlavorText_RuinManiac_Dusty_Pokemon[] = _("Craggy ROCK POKéMON.");
+const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro1[] = _("In search of ancient lore,");
+const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro2[] = _("I travel the world.");
+
+const u8 gMatchCallFlavorText_Tuber_Lola_Strategy[] = _("I'm going to try hard!");
+const u8 gMatchCallFlavorText_Tuber_Lola_Pokemon[] = _("Good swimmer POKéMON.");
+const u8 gMatchCallFlavorText_Tuber_Lola_Intro1[] = _("I wish I could swim without");
+const u8 gMatchCallFlavorText_Tuber_Lola_Intro2[] = _("using an inner tube.");
+
+const u8 gMatchCallFlavorText_Tuber_Ricky_Strategy[] = _("I don't know. I'll try hard.");
+const u8 gMatchCallFlavorText_Tuber_Ricky_Pokemon[] = _("WATER POKéMON are buddies.");
+const u8 gMatchCallFlavorText_Tuber_Ricky_Intro1[] = _("It's not like I can't swim.");
+const u8 gMatchCallFlavorText_Tuber_Ricky_Intro2[] = _("I just like my inner tube.");
+
+const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Strategy[] = _("We split our duties.");
+const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Pokemon[] = _("We like friendly POKéMON.");
+const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro1[] = _("We enjoy POKéMON together");
+const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro2[] = _("as sister and brother.");
+
+const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Strategy[] = _("I finish with power moves!");
+const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Pokemon[] = _("A mix of different types.");
+const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro1[] = _("I aim to become the ultimate");
+const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro2[] = _("TRAINER!");
+
+const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Strategy[] = _("Exploit the foe's weakness.");
+const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Pokemon[] = _("Balance is crucial.");
+const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro1[] = _("My goal is to become the");
+const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro2[] = _("POKéMON CHAMPION.");
+
+const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Strategy[] = _("Upset the opponent.");
+const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Pokemon[] = _("Type doesn't matter.");
+const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro1[] = _("I'm a top student at the");
+const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro2[] = _("TRAINER'S SCHOOL.");
+
+const u8 gMatchCallFlavorText_HexManiac_Valerie_Strategy[] = _("Slow, steady suffering.");
+const u8 gMatchCallFlavorText_HexManiac_Valerie_Pokemon[] = _("Scary to meet at night.");
+const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro1[] = _("I see things that others");
+const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro2[] = _("can't see...");
+
+const u8 gMatchCallFlavorText_Lady_Cindy_Strategy[] = _("Anything to win.");
+const u8 gMatchCallFlavorText_Lady_Cindy_Pokemon[] = _("Gorgeous type!");
+const u8 gMatchCallFlavorText_Lady_Cindy_Intro1[] = _("I have a pool specially for");
+const u8 gMatchCallFlavorText_Lady_Cindy_Intro2[] = _("my POKéMON at home.");
+
+const u8 gMatchCallFlavorText_Beauty_Thalia_Strategy[] = _("You'll fall under my spell!");
+const u8 gMatchCallFlavorText_Beauty_Thalia_Pokemon[] = _("Mature WATER type.");
+const u8 gMatchCallFlavorText_Beauty_Thalia_Intro1[] = _("I dream of cruising around");
+const u8 gMatchCallFlavorText_Beauty_Thalia_Intro2[] = _("the world on a luxury liner.");
+
+const u8 gMatchCallFlavorText_Beauty_Jessica_Strategy[] = _("I'll lead you astray.");
+const u8 gMatchCallFlavorText_Beauty_Jessica_Pokemon[] = _("Cute, of course.");
+const u8 gMatchCallFlavorText_Beauty_Jessica_Intro1[] = _("I love the SAFARI ZONE.");
+const u8 gMatchCallFlavorText_Beauty_Jessica_Intro2[] = _("I seem to end up there.");
+
+const u8 gMatchCallFlavorText_RichBoy_Winston_Strategy[] = _("Strategy? Who needs it?");
+const u8 gMatchCallFlavorText_RichBoy_Winston_Pokemon[] = _("I spent big money on it!");
+const u8 gMatchCallFlavorText_RichBoy_Winston_Intro1[] = _("I, being rich, sleep in a");
+const u8 gMatchCallFlavorText_RichBoy_Winston_Intro2[] = _("custom POKéMON bed.");
+
+const u8 gMatchCallFlavorText_PokeManiac_Steve_Strategy[] = _("Wrestle down with power.");
+const u8 gMatchCallFlavorText_PokeManiac_Steve_Pokemon[] = _("Took all night to catch.");
+const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro1[] = _("Big, burly, and buff");
+const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro2[] = _("POKéMON are the best...");
+
+const u8 gMatchCallFlavorText_Swimmer_Tony_Strategy[] = _("Ram at full speed!");
+const u8 gMatchCallFlavorText_Swimmer_Tony_Pokemon[] = _("Funky WATER type!");
+const u8 gMatchCallFlavorText_Swimmer_Tony_Intro1[] = _("If I can't be out swimming,");
+const u8 gMatchCallFlavorText_Swimmer_Tony_Intro2[] = _("I'll be pumping weights.");
+
+const u8 gMatchCallFlavorText_BlackBelt_Nob_Strategy[] = _("Grand slam pummeling!");
+const u8 gMatchCallFlavorText_BlackBelt_Nob_Pokemon[] = _("FIGHTING type.");
+const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro1[] = _("Not to brag, but I can bust");
+const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro2[] = _("ten roof tiles!");
+
+const u8 gMatchCallFlavorText_BlackBelt_Koji_Strategy[] = _("Witness karate power!");
+const u8 gMatchCallFlavorText_BlackBelt_Koji_Pokemon[] = _("My partners in training!");
+const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro1[] = _("Let us discuss matters of");
+const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro2[] = _("the world with bare fists!");
+
+const u8 gMatchCallFlavorText_Guitarist_Fernando_Strategy[] = _("Rock to stunning sounds!");
+const u8 gMatchCallFlavorText_Guitarist_Fernando_Pokemon[] = _("Electric-and-sound combo!");
+const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro1[] = _("My compositions will shock");
+const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro2[] = _("you and stun you!");
+
+const u8 gMatchCallFlavorText_Guitarist_Dalton_Strategy[] = _("I'll electrify you!");
+const u8 gMatchCallFlavorText_Guitarist_Dalton_Pokemon[] = _("They're ELECTRIC!");
+const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro1[] = _("I want to make people cry");
+const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro2[] = _("with songs from my heart.");
+
+const u8 gMatchCallFlavorText_Kindler_Bernie_Strategy[] = _("Burn it all down!");
+const u8 gMatchCallFlavorText_Kindler_Bernie_Pokemon[] = _("Burn-inducing POKéMON.");
+const u8 gMatchCallFlavorText_Kindler_Bernie_Intro1[] = _("When you light a campfire,");
+const u8 gMatchCallFlavorText_Kindler_Bernie_Intro2[] = _("be sure there's some water.");
+
+const u8 gMatchCallFlavorText_Camper_Ethan_Strategy[] = _("Hang in and be tenacious!");
+const u8 gMatchCallFlavorText_Camper_Ethan_Pokemon[] = _("I'll raise any POKéMON.");
+const u8 gMatchCallFlavorText_Camper_Ethan_Intro1[] = _("POKéMON raised in the wild");
+const u8 gMatchCallFlavorText_Camper_Ethan_Intro2[] = _("grow strong!");
+
+const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Strategy[] = _("Our love lets us prevail.");
+const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Pokemon[] = _("We've had them for years.");
+const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro1[] = _("Married 50 years, we've");
+const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro2[] = _("devotedly raised POKéMON.");
+
+const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Strategy[] = _("Attack in waves!");
+const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Pokemon[] = _("BUG POKéMON are cool.");
+const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro1[] = _("I go into the forest every");
+const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro2[] = _("day to catch BUG POKéMON.");
+
+const u8 gMatchCallFlavorText_Psychic_Cameron_Strategy[] = _("Daze and confuse!");
+const u8 gMatchCallFlavorText_Psychic_Cameron_Pokemon[] = _("Ones with weird powers.");
+const u8 gMatchCallFlavorText_Psychic_Cameron_Intro1[] = _("I can see through exactly");
+const u8 gMatchCallFlavorText_Psychic_Cameron_Intro2[] = _("what you're thinking!");
+
+const u8 gMatchCallFlavorText_Psychic_Jacki_Strategy[] = _("Battle at full power.");
+const u8 gMatchCallFlavorText_Psychic_Jacki_Pokemon[] = _("POKéMON of many mysteries.");
+const u8 gMatchCallFlavorText_Psychic_Jacki_Intro1[] = _("When we spoke, I was really");
+const u8 gMatchCallFlavorText_Psychic_Jacki_Intro2[] = _("using telepathy.");
+
+const u8 gMatchCallFlavorText_Gentleman_Walter_Strategy[] = _("Calm and collected.");
+const u8 gMatchCallFlavorText_Gentleman_Walter_Pokemon[] = _("POKéMON of distinction.");
+const u8 gMatchCallFlavorText_Gentleman_Walter_Intro1[] = _("We enjoy a spot of tea");
+const u8 gMatchCallFlavorText_Gentleman_Walter_Intro2[] = _("every day. It's imported.");
+
+const u8 gMatchCallFlavorText_SchoolKid_Karen_Strategy[] = _("I use my head to battle.");
+const u8 gMatchCallFlavorText_SchoolKid_Karen_Pokemon[] = _("I love any kind of POKéMON!");
+const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro1[] = _("My daddy gives me spending");
+const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro2[] = _("money if I ace a test.");
+
+const u8 gMatchCallFlavorText_SchoolKid_Jerry_Strategy[] = _("My knowledge rules!");
+const u8 gMatchCallFlavorText_SchoolKid_Jerry_Pokemon[] = _("Any smart POKéMON!");
+const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro1[] = _("I want to be a POKéMON");
+const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro2[] = _("researcher in the future.");
+
+const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Strategy[] = _("We talk it over first.");
+const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Pokemon[] = _("POKéMON that we both like.");
+const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro1[] = _("We're senior and junior");
+const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro2[] = _("students into POKéMON!");
+
+const u8 gMatchCallFlavorText_Pokefan_Isabel_Strategy[] = _("Go for it, my dears!");
+const u8 gMatchCallFlavorText_Pokefan_Isabel_Pokemon[] = _("I have no likes or dislikes.");
+const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro1[] = _("While out shopping for");
+const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro2[] = _("supper, I battle too.");
+
+const u8 gMatchCallFlavorText_Pokefan_Miguel_Strategy[] = _("I battle with love!");
+const u8 gMatchCallFlavorText_Pokefan_Miguel_Pokemon[] = _("A POKéMON raised with love!");
+const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro1[] = _("It's important to build");
+const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro2[] = _("trust with your POKéMON.");
+
+const u8 gMatchCallFlavorText_Expert_Timothy_Strategy[] = _("I see through your moves!");
+const u8 gMatchCallFlavorText_Expert_Timothy_Pokemon[] = _("The essence of FIGHTING.");
+const u8 gMatchCallFlavorText_Expert_Timothy_Intro1[] = _("I'm not ready to give way");
+const u8 gMatchCallFlavorText_Expert_Timothy_Intro2[] = _("to the young yet!");
+
+const u8 gMatchCallFlavorText_Expert_Shelby_Strategy[] = _("Attack while defending.");
+const u8 gMatchCallFlavorText_Expert_Shelby_Pokemon[] = _("The FIGHTING type.");
+const u8 gMatchCallFlavorText_Expert_Shelby_Intro1[] = _("Being old, I have my own");
+const u8 gMatchCallFlavorText_Expert_Shelby_Intro2[] = _("style of battling.");
+
+const u8 gMatchCallFlavorText_Youngster_Calvin_Strategy[] = _("I do what I can.");
+const u8 gMatchCallFlavorText_Youngster_Calvin_Pokemon[] = _("I use different types.");
+const u8 gMatchCallFlavorText_Youngster_Calvin_Intro1[] = _("I'm going to keep working");
+const u8 gMatchCallFlavorText_Youngster_Calvin_Intro2[] = _("until I beat a GYM LEADER.");
+
+const u8 gMatchCallFlavorText_Fisherman_Elliot_Strategy[] = _("I battle patiently.");
+const u8 gMatchCallFlavorText_Fisherman_Elliot_Pokemon[] = _("WATER POKéMON to battle!");
+const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro1[] = _("I'm the world's only guy to");
+const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro2[] = _("catch a huge POKéMON!");
+
+const u8 gMatchCallFlavorText_Triathlete_Isaiah_Strategy[] = _("Exploit the environment!");
+const u8 gMatchCallFlavorText_Triathlete_Isaiah_Pokemon[] = _("All hail the WATER type!");
+const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro1[] = _("I won't be beaten by some");
+const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro2[] = _("beach bum SWIMMER!");
+
+const u8 gMatchCallFlavorText_Triathlete_Maria_Strategy[] = _("Speed above all!");
+const u8 gMatchCallFlavorText_Triathlete_Maria_Pokemon[] = _("I use a speedy POKéMON.");
+const u8 gMatchCallFlavorText_Triathlete_Maria_Intro1[] = _("A marathon is a challenge");
+const u8 gMatchCallFlavorText_Triathlete_Maria_Intro2[] = _("against your own self.");
+
+const u8 gMatchCallFlavorText_Triathlete_Abigail_Strategy[] = _("Defense is crucial.");
+const u8 gMatchCallFlavorText_Triathlete_Abigail_Pokemon[] = _("My POKéMON is solid.");
+const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro1[] = _("I started this for dieting,");
+const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro2[] = _("but I got right into it.");
+
+const u8 gMatchCallFlavorText_Triathlete_Dylan_Strategy[] = _("Strike before stricken!");
+const u8 gMatchCallFlavorText_Triathlete_Dylan_Pokemon[] = _("A fast-running POKéMON!");
+const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro1[] = _("If you ran and ran, you'd");
+const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro2[] = _("become one with the wind.");
+
+const u8 gMatchCallFlavorText_Triathlete_Katelyn_Strategy[] = _("All-out offensive!");
+const u8 gMatchCallFlavorText_Triathlete_Katelyn_Pokemon[] = _("WATER POKéMON rule!");
+const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro1[] = _("I must swim over 6 miles");
+const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro2[] = _("every day.");
+
+const u8 gMatchCallFlavorText_Triathlete_Benjamin_Strategy[] = _("Push and push again!");
+const u8 gMatchCallFlavorText_Triathlete_Benjamin_Pokemon[] = _("The strength of STEEL.");
+const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro1[] = _("If you're sweating, get");
+const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro2[] = _("fluids into you regularly.");
+
+const u8 gMatchCallFlavorText_Triathlete_Pablo_Strategy[] = _("Draw the power of WATER.");
+const u8 gMatchCallFlavorText_Triathlete_Pablo_Pokemon[] = _("Toughened WATER POKéMON.");
+const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro1[] = _("Training POKéMON is good,");
+const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro2[] = _("but don't neglect yourself.");
+
+const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Strategy[] = _("It's about POKéMON power!");
+const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Pokemon[] = _("See the power of DRAGONS!");
+const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro1[] = _("I'll become legendary as the");
+const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro2[] = _("strongest one day!");
+
+const u8 gMatchCallFlavorText_BirdKeeper_Robert_Strategy[] = _("I'll show you my technique!");
+const u8 gMatchCallFlavorText_BirdKeeper_Robert_Pokemon[] = _("Elegantly wheeling BIRDS.");
+const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro1[] = _("My BIRD POKéMON, deliver my");
+const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro2[] = _("love to that girl!");
+
+const u8 gMatchCallFlavorText_NinjaBoy_Lao_Strategy[] = _("You'll suffer from poison!");
+const u8 gMatchCallFlavorText_NinjaBoy_Lao_Pokemon[] = _("Poisonous POKéMON.");
+const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro1[] = _("I undertake training so");
+const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro2[] = _("that I may become a ninja.");
+
+const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Strategy[] = _("The first strike wins!");
+const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Pokemon[] = _("Speedy FIGHTING type.");
+const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro1[] = _("If my POKéMON lose,");
+const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro2[] = _("I'll carry on the fight!");
+
+const u8 gMatchCallFlavorText_ParasolLady_Madeline_Strategy[] = _("Go, go, my POKéMON!");
+const u8 gMatchCallFlavorText_ParasolLady_Madeline_Pokemon[] = _("I'll raise anything.");
+const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro1[] = _("UV rays are your skin's");
+const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro2[] = _("enemy. Get protected.");
+
+const u8 gMatchCallFlavorText_Swimmer_Jenny_Strategy[] = _("No mercy!");
+const u8 gMatchCallFlavorText_Swimmer_Jenny_Pokemon[] = _("Cute WATER POKéMON.");
+const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro1[] = _("I have too many fans.");
+const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro2[] = _("I was interviewed on TV.");
+
+const u8 gMatchCallFlavorText_Picnicker_Diana_Strategy[] = _("I think about this & that.");
+const u8 gMatchCallFlavorText_Picnicker_Diana_Pokemon[] = _("I like all POKéMON.");
+const u8 gMatchCallFlavorText_Picnicker_Diana_Intro1[] = _("What lies beyond that");
+const u8 gMatchCallFlavorText_Picnicker_Diana_Intro2[] = _("yonder hill?");
+
+const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Strategy[] = _("We battle together!");
+const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Pokemon[] = _("We train together!");
+const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro1[] = _("We like the same POKéMON,");
+const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro2[] = _("but different desserts.");
+
+const u8 gMatchCallFlavorText_Sailor_Ernest_Strategy[] = _("I force things with power!");
+const u8 gMatchCallFlavorText_Sailor_Ernest_Pokemon[] = _("WATER and FIGHTING types.");
+const u8 gMatchCallFlavorText_Sailor_Ernest_Intro1[] = _("Seamen are rough spirits!");
+const u8 gMatchCallFlavorText_Sailor_Ernest_Intro2[] = _("Any complaints?");
+
+const u8 gMatchCallFlavorText_Sailor_Cory_Strategy[] = _("Up for a fight anytime!");
+const u8 gMatchCallFlavorText_Sailor_Cory_Pokemon[] = _("WATER POKéMON are my faves!");
+const u8 gMatchCallFlavorText_Sailor_Cory_Intro1[] = _("If you want to shout loud,");
+const u8 gMatchCallFlavorText_Sailor_Cory_Intro2[] = _("suck in air with your belly!");
+
+const u8 gMatchCallFlavorText_Collector_Edwin_Strategy[] = _("Protect POKéMON from harm.");
+const u8 gMatchCallFlavorText_Collector_Edwin_Pokemon[] = _("I love rare POKéMON.");
+const u8 gMatchCallFlavorText_Collector_Edwin_Intro1[] = _("I want to collect all the");
+const u8 gMatchCallFlavorText_Collector_Edwin_Intro2[] = _("world's rare POKéMON.");
+
+const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Strategy[] = _("I count on power.");
+const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Pokemon[] = _("POKéMON are my children.");
+const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro1[] = _("It takes knowledge and");
+const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro2[] = _("love to raise POKéMON.");
+
+const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Strategy[] = _("Full-on attack!");
+const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Pokemon[] = _("Anything. I'll raise it.");
+const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro1[] = _("I give them {POKEBLOCK}S for");
+const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro2[] = _("going after CONTEST titles.");
+
+const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Strategy[] = _("I raise POKéMON with care.");
+const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Pokemon[] = _("Fun-to-raise POKéMON.");
+const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro1[] = _("Treat every POKéMON you");
+const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro2[] = _("meet with respect.");
+
+const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Strategy[] = _("I believe in my POKéMON.");
+const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Pokemon[] = _("I like strong POKéMON.");
+const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro1[] = _("I'm training for rescue");
+const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro2[] = _("work with my POKéMON.");
+
+const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Strategy[] = _("Attack in waves!");
+const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Pokemon[] = _("I use different types.");
+const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro1[] = _("Those who destroy nature");
+const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro2[] = _("must never be forgiven!");
+
+const u8 gMatchCallFlavorText_Lass_Haley_Strategy[] = _("I'll show you some guts!");
+const u8 gMatchCallFlavorText_Lass_Haley_Pokemon[] = _("Cute POKéMON are my faves!");
+const u8 gMatchCallFlavorText_Lass_Haley_Intro1[] = _("After a battle, I always");
+const u8 gMatchCallFlavorText_Lass_Haley_Intro2[] = _("bathe with my POKéMON.");
+
+const u8 gMatchCallFlavorText_BugCatcher_James_Strategy[] = _("Lightning-fast attack!");
+const u8 gMatchCallFlavorText_BugCatcher_James_Pokemon[] = _("BUG POKéMON are number 1!");
+const u8 gMatchCallFlavorText_BugCatcher_James_Intro1[] = _("If you want to catch BUG");
+const u8 gMatchCallFlavorText_BugCatcher_James_Intro2[] = _("POKéMON, wake up early.");
+
+const u8 gMatchCallFlavorText_Hiker_Trent_Strategy[] = _("I battle with power.");
+const u8 gMatchCallFlavorText_Hiker_Trent_Pokemon[] = _("Hard-bodied POKéMON.");
+const u8 gMatchCallFlavorText_Hiker_Trent_Intro1[] = _("I've been planning a month");
+const u8 gMatchCallFlavorText_Hiker_Trent_Intro2[] = _("for today's hike.");
+
+const u8 gMatchCallFlavorText_Hiker_Sawyer_Strategy[] = _("I like it hot!");
+const u8 gMatchCallFlavorText_Hiker_Sawyer_Pokemon[] = _("Hot POKéMON!");
+const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro1[] = _("As much as I love POKéMON,");
+const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro2[] = _("I surely like hiking!");
+
+const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Strategy[] = _("Lovey-dovey strategy!");
+const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Pokemon[] = _("Lovey-dovey POKéMON!");
+const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro1[] = _("We're lovey-dovey!");
+const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro2[] = _("Forever lovey-dovey!");
+
+const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Strategy[] = _("We let it all hang out.");
+const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Pokemon[] = _("The 1st POKéMON I caught.");
+const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro1[] = _("POKéMON and I have grown");
+const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro2[] = _("stronger together.");
+
+const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Strategy[] = _("ROCK-type power attack.");
+const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Pokemon[] = _("I prefer rock-hard POKéMON.");
+const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro1[] = _("A LEADER of a big GYM bears");
+const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro2[] = _("a lot of responsibility.");
+
+const u8 gMatchCallFlavorText_TheBigHit_Brawly_Strategy[] = _("Direct physical action!");
+const u8 gMatchCallFlavorText_TheBigHit_Brawly_Pokemon[] = _("FIGHTING POKéMON rule!");
+const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro1[] = _("The world awaits me as the");
+const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro2[] = _("next big wave!");
+
+const u8 gMatchCallFlavorText_SwellShock_Wattson_Strategy[] = _("I choose to electrify.");
+const u8 gMatchCallFlavorText_SwellShock_Wattson_Pokemon[] = _("Get shocked by electricity!");
+const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro1[] = _("One must never throw a");
+const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro2[] = _("match. Even I must not.");
+
+const u8 gMatchCallFlavorText_PassionBurn_Flannery_Strategy[] = _("Battle aggressively.");
+const u8 gMatchCallFlavorText_PassionBurn_Flannery_Pokemon[] = _("Burn with passion!");
+const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro1[] = _("Completely wash away daily");
+const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro2[] = _("fatigue in hot springs!");
+
+const u8 gMatchCallFlavorText_ReliableOne_Dad_Strategy[] = _("I flexibly adapt my style.");
+const u8 gMatchCallFlavorText_ReliableOne_Dad_Pokemon[] = _("Grown in a balanced manner.");
+const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro1[] = _("I walk the 30 minutes from");
+const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro2[] = _("home to here every day.");
+
+const u8 gMatchCallFlavorText_SkyTamer_Winona_Strategy[] = _("I take advantage of speed.");
+const u8 gMatchCallFlavorText_SkyTamer_Winona_Pokemon[] = _("Graceful sky dancers.");
+const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro1[] = _("The ultimate would be to");
+const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro2[] = _("live as one with nature.");
+
+const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Strategy[] = _("We battle in cooperation.");
+const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Pokemon[] = _("Always friendly POKéMON.");
+const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro1[] = _("Papa has trouble telling");
+const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro2[] = _("the two of us apart!");
+
+const u8 gMatchCallFlavorText_DandyCharm_Juan_Strategy[] = _("I use splendid waterpower.");
+const u8 gMatchCallFlavorText_DandyCharm_Juan_Pokemon[] = _("POKéMON of elegance!");
+const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro1[] = _("The adulation of beautiful");
+const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro2[] = _("ladies fills me with energy!");
+
+const u8 gMatchCallFlavorText_EliteFour_Sidney_Strategy[] = _("Offense over defense!");
+const u8 gMatchCallFlavorText_EliteFour_Sidney_Pokemon[] = _("The DARK side's beauties.");
+const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro1[] = _("They said I was a punk, but");
+const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro2[] = _("I'm one of the ELITE FOUR!");
+
+const u8 gMatchCallFlavorText_EliteFour_Phoebe_Strategy[] = _("Confuse and confound.");
+const u8 gMatchCallFlavorText_EliteFour_Phoebe_Pokemon[] = _("There's nothing definite.");
+const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro1[] = _("I wonder how my grandma at");
+const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro2[] = _("MT. PYRE is doing?");
+
+const u8 gMatchCallFlavorText_EliteFour_Glacia_Strategy[] = _("I use items for help.");
+const u8 gMatchCallFlavorText_EliteFour_Glacia_Pokemon[] = _("Flaming passion in icy cold!");
+const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro1[] = _("The ICE type can be better");
+const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro2[] = _("trained in this hot land.");
+
+const u8 gMatchCallFlavorText_EliteFour_Drake_Strategy[] = _("Harness strong abilities.");
+const u8 gMatchCallFlavorText_EliteFour_Drake_Pokemon[] = _("The raw power of DRAGONS!");
+const u8 gMatchCallFlavorText_EliteFour_Drake_Intro1[] = _("I dedicate myself to the");
+const u8 gMatchCallFlavorText_EliteFour_Drake_Intro2[] = _("POKéMON that saved me.");
+
+const u8 gMatchCallFlavorText_Champion_Wallace_Strategy[] = _("Dignity and respect.");
+const u8 gMatchCallFlavorText_Champion_Wallace_Pokemon[] = _("I prefer POKéMON of grace.");
+const u8 gMatchCallFlavorText_Champion_Wallace_Intro1[] = _("I represent beauty as");
+const u8 gMatchCallFlavorText_Champion_Wallace_Intro2[] = _("well as intelligence.");
+
+const u8 *const gMatchCallMessages[][4] =
+{
+ [REMATCH_ROSE] = MCFLAVOR(AromaLady_Rose),
+ [REMATCH_ANDRES] = MCFLAVOR(RuinManiac_Andres),
+ [REMATCH_DUSTY] = MCFLAVOR(RuinManiac_Dusty),
+ [REMATCH_LOLA] = MCFLAVOR(Tuber_Lola),
+ [REMATCH_RICKY] = MCFLAVOR(Tuber_Ricky),
+ [REMATCH_LILA_AND_ROY] = MCFLAVOR(SisAndBro_LilaAndRoy),
+ [REMATCH_CRISTIN] = MCFLAVOR(Cooltrainer_Cristin),
+ [REMATCH_BROOKE] = MCFLAVOR(Cooltrainer_Brooke),
+ [REMATCH_WILTON] = MCFLAVOR(Cooltrainer_Wilton),
+ [REMATCH_VALERIE] = MCFLAVOR(HexManiac_Valerie),
+ [REMATCH_CINDY] = MCFLAVOR(Lady_Cindy),
+ [REMATCH_THALIA] = MCFLAVOR(Beauty_Thalia),
+ [REMATCH_JESSICA] = MCFLAVOR(Beauty_Jessica),
+ [REMATCH_WINSTON] = MCFLAVOR(RichBoy_Winston),
+ [REMATCH_STEVE] = MCFLAVOR(PokeManiac_Steve),
+ [REMATCH_TONY] = MCFLAVOR(Swimmer_Tony),
+ [REMATCH_NOB] = MCFLAVOR(BlackBelt_Nob),
+ [REMATCH_KOJI] = MCFLAVOR(BlackBelt_Koji),
+ [REMATCH_FERNANDO] = MCFLAVOR(Guitarist_Fernando),
+ [REMATCH_DALTON] = MCFLAVOR(Guitarist_Dalton),
+ [REMATCH_BERNIE] = MCFLAVOR(Kindler_Bernie),
+ [REMATCH_ETHAN] = MCFLAVOR(Camper_Ethan),
+ [REMATCH_JOHN_AND_JAY] = MCFLAVOR(OldCouple_JohnAndJay),
+ [REMATCH_JEFFREY] = MCFLAVOR(BugManiac_Jeffrey),
+ [REMATCH_CAMERON] = MCFLAVOR(Psychic_Cameron),
+ [REMATCH_JACKI] = MCFLAVOR(Psychic_Jacki),
+ [REMATCH_WALTER] = MCFLAVOR(Gentleman_Walter),
+ [REMATCH_KAREN] = MCFLAVOR(SchoolKid_Karen),
+ [REMATCH_JERRY] = MCFLAVOR(SchoolKid_Jerry),
+ [REMATCH_ANNA_AND_MEG] = MCFLAVOR(SrAndJr_AnnaAndMeg),
+ [REMATCH_ISABEL] = MCFLAVOR(Pokefan_Isabel),
+ [REMATCH_MIGUEL] = MCFLAVOR(Pokefan_Miguel),
+ [REMATCH_TIMOTHY] = MCFLAVOR(Expert_Timothy),
+ [REMATCH_SHELBY] = MCFLAVOR(Expert_Shelby),
+ [REMATCH_CALVIN] = MCFLAVOR(Youngster_Calvin),
+ [REMATCH_ELLIOT] = MCFLAVOR(Fisherman_Elliot),
+ [REMATCH_ISAIAH] = MCFLAVOR(Triathlete_Isaiah),
+ [REMATCH_MARIA] = MCFLAVOR(Triathlete_Maria),
+ [REMATCH_ABIGAIL] = MCFLAVOR(Triathlete_Abigail),
+ [REMATCH_DYLAN] = MCFLAVOR(Triathlete_Dylan),
+ [REMATCH_KATELYN] = MCFLAVOR(Triathlete_Katelyn),
+ [REMATCH_BENJAMIN] = MCFLAVOR(Triathlete_Benjamin),
+ [REMATCH_PABLO] = MCFLAVOR(Triathlete_Pablo),
+ [REMATCH_NICOLAS] = MCFLAVOR(DragonTamer_Nicolas),
+ [REMATCH_ROBERT] = MCFLAVOR(BirdKeeper_Robert),
+ [REMATCH_LAO] = MCFLAVOR(NinjaBoy_Lao),
+ [REMATCH_CYNDY] = MCFLAVOR(BattleGirl_Cyndy),
+ [REMATCH_MADELINE] = MCFLAVOR(ParasolLady_Madeline),
+ [REMATCH_JENNY] = MCFLAVOR(Swimmer_Jenny),
+ [REMATCH_DIANA] = MCFLAVOR(Picnicker_Diana),
+ [REMATCH_AMY_AND_LIV] = MCFLAVOR(Twins_AmyAndLiv),
+ [REMATCH_ERNEST] = MCFLAVOR(Sailor_Ernest),
+ [REMATCH_CORY] = MCFLAVOR(Sailor_Cory),
+ [REMATCH_EDWIN] = MCFLAVOR(Collector_Edwin),
+ [REMATCH_LYDIA] = MCFLAVOR(PkmnBreeder_Lydia),
+ [REMATCH_ISAAC] = MCFLAVOR(PkmnBreeder_Isaac),
+ [REMATCH_GABRIELLE] = MCFLAVOR(PkmnBreeder_Gabrielle),
+ [REMATCH_CATHERINE] = MCFLAVOR(PkmnRanger_Catherine),
+ [REMATCH_JACKSON] = MCFLAVOR(PkmnRanger_Jackson),
+ [REMATCH_HALEY] = MCFLAVOR(Lass_Haley),
+ [REMATCH_JAMES] = MCFLAVOR(BugCatcher_James),
+ [REMATCH_TRENT] = MCFLAVOR(Hiker_Trent),
+ [REMATCH_SAWYER] = MCFLAVOR(Hiker_Sawyer),
+ [REMATCH_KIRA_AND_DAN] = MCFLAVOR(YoungCouple_LoisAndHal),
+ [REMATCH_WALLY_3] = MCFLAVOR(PkmnTrainer_Wally),
+ [REMATCH_ROXANNE] = MCFLAVOR(RockinWhiz_Roxanne),
+ [REMATCH_BRAWLY] = MCFLAVOR(TheBigHit_Brawly),
+ [REMATCH_WATTSON] = MCFLAVOR(SwellShock_Wattson),
+ [REMATCH_FLANNERY] = MCFLAVOR(PassionBurn_Flannery),
+ [REMATCH_NORMAN] = MCFLAVOR(ReliableOne_Dad),
+ [REMATCH_WINONA] = MCFLAVOR(SkyTamer_Winona),
+ [REMATCH_TATE_AND_LIZA] = MCFLAVOR(MysticDuo_TateAndLiza),
+ [REMATCH_JUAN] = MCFLAVOR(DandyCharm_Juan),
+ [REMATCH_SIDNEY] = MCFLAVOR(EliteFour_Sidney),
+ [REMATCH_PHOEBE] = MCFLAVOR(EliteFour_Phoebe),
+ [REMATCH_GLACIA] = MCFLAVOR(EliteFour_Glacia),
+ [REMATCH_DRAKE] = MCFLAVOR(EliteFour_Drake),
+ [REMATCH_WALLACE] = MCFLAVOR(Champion_Wallace),
+};
diff --git a/src/data/text/ribbon_descriptions.h b/src/data/text/ribbon_descriptions.h
new file mode 100644
index 000000000..f455a7771
--- /dev/null
+++ b/src/data/text/ribbon_descriptions.h
@@ -0,0 +1,48 @@
+const u8 gRibbonDescriptionPart1_Champion[] = _("CHAMPION-beating, HALL");
+const u8 gRibbonDescriptionPart2_Champion[] = _("OF FAME Member RIBBON");
+const u8 gRibbonDescriptionPart1_CoolContest[] = _("COOL CONTEST");
+const u8 gRibbonDescriptionPart1_BeautyContest[] = _("BEAUTY CONTEST");
+const u8 gRibbonDescriptionPart1_CuteContest[] = _("CUTE CONTEST");
+const u8 gRibbonDescriptionPart1_SmartContest[] = _("SMART CONTEST");
+const u8 gRibbonDescriptionPart1_ToughContest[] = _("TOUGH CONTEST");
+const u8 gRibbonDescriptionPart2_NormalRank[] = _("Normal Rank winner!");
+const u8 gRibbonDescriptionPart2_SuperRank[] = _("Super Rank winner!");
+const u8 gRibbonDescriptionPart2_HyperRank[] = _("Hyper Rank winner!");
+const u8 gRibbonDescriptionPart2_MasterRank[] = _("Master Rank winner!");
+const u8 gRibbonDescriptionPart1_Winning[] = _("For clearing LV50");
+const u8 gRibbonDescriptionPart2_Winning[] = _("at the BATTLE TOWER.");
+const u8 gRibbonDescriptionPart1_Victory[] = _("For clearing Open Level");
+const u8 gRibbonDescriptionPart2_Victory[] = _("at the BATTLE TOWER.");
+const u8 gRibbonDescriptionPart1_Artist[] = _("RIBBON for being chosen");
+const u8 gRibbonDescriptionPart2_Artist[] = _("as a super sketch model.");
+const u8 gRibbonDescriptionPart1_Effort[] = _("RIBBON awarded for");
+const u8 gRibbonDescriptionPart2_Effort[] = _("being a hard worker.");
+
+const u8 *const gRibbonDescriptionPointers[][2] =
+{
+ {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion},
+ {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank},
+ {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank},
+ {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank},
+ {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank},
+ {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank},
+ {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank},
+ {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank},
+ {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank},
+ {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank},
+ {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank},
+ {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank},
+ {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank},
+ {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank},
+ {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank},
+ {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank},
+ {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank},
+ {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank},
+ {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank},
+ {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank},
+ {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank},
+ {gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning},
+ {gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory},
+ {gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist},
+ {gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort},
+};
diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c
index c002f700f..a2457307b 100644
--- a/src/fldeff_flash.c
+++ b/src/fldeff_flash.c
@@ -219,8 +219,8 @@ static void sub_8137404(u8 taskId)
static void sub_8137420(u8 taskId)
{
SetGpuReg(REG_OFFSET_DISPCNT, 0);
- LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000);
- LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800);
+ LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
+ LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20);
LoadPalette(gUnknown_085B28A0, 0xE0, 0x10);
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0
@@ -304,8 +304,8 @@ static void sub_81375BC(u8 taskId)
static void sub_81375D8(u8 taskId)
{
SetGpuReg(REG_OFFSET_DISPCNT, 0);
- LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000);
- LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800);
+ LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
+ LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
SetGpuReg(REG_OFFSET_BLDY, 0);
diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c
index dd91e930a..0ca0ea20d 100644
--- a/src/pokenav_unk_10.c
+++ b/src/pokenav_unk_10.c
@@ -60,8 +60,77 @@ u32 sub_81D0954(void);
void sub_81D1500(struct Pokenav10Struct *structPtr);
bool32 sub_81D1524(struct Pokenav10Struct *structPtr);
void sub_81D1538(struct Sprite *sprite);
+u32 sub_81D0C84(s32);
+u32 sub_81D0D2C(s32);
+u32 sub_81D0D8C(s32);
+u32 sub_81D0E00(s32);
+u32 sub_81D0C54(s32);
+
+const u8 gUnknown_086237F8[][4] =
+{
+ {1, 1, 0, 0},
+ {3, 4, 1, 0},
+ {3, 4, 5, 0},
+ {3, 4, 9, 0},
+ {3, 4, 13, 0},
+ {3, 4, 17, 0},
+ {1, 1, 21, 0},
+ {1, 1, 22, 0},
+ {1, 1, 23, 0},
+ {1, 1, 24, 0},
+ {1, 1, 25, 1},
+ {1, 1, 26, 1},
+ {1, 1, 27, 1},
+ {1, 1, 28, 1},
+ {1, 1, 29, 1},
+ {1, 1, 30, 1},
+ {1, 1, 31, 1}
+};
+
+#include "data/text/ribbon_descriptions.h"
+#include "data/text/gift_ribbon_descriptions.h"
+
+const u16 gUnknown_08623FF8[] = INCBIN_U16("graphics/pokenav/ribbons_icon1.gbapal");
+const u16 gUnknown_08624018[] = INCBIN_U16("graphics/pokenav/ribbons_icon2.gbapal");
+const u16 gUnknown_08624038[] = INCBIN_U16("graphics/pokenav/ribbons_icon3.gbapal");
+const u16 gUnknown_08624058[] = INCBIN_U16("graphics/pokenav/ribbons_icon4.gbapal");
+const u16 gUnknown_08624078[] = INCBIN_U16("graphics/pokenav/ribbons_icon5.gbapal");
+const u16 gUnknown_08624098[] = INCBIN_U16("graphics/pokenav/8624098.gbapal");
+const u32 gUnknown_086240B8[] = INCBIN_U32("graphics/pokenav/ribbons_icon.4bpp.lz");
+const u32 gUnknown_08624280[] = INCBIN_U32("graphics/pokenav/ribbons_icon_big.4bpp.lz");
+
+const struct BgTemplate gUnknown_08624B98[2] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 0x07,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ }
+};
+
+const LoopedTask gUnknown_08624BA0[] =
+{
+ NULL,
+ sub_81D0C84,
+ sub_81D0D2C,
+ sub_81D0D8C,
+ sub_81D0E00,
+ sub_81D0C54
+};
-// code
static const struct WindowTemplate gUnknown_08624BB8 =
{
.bg = 2,
diff --git a/src/pokenav_unk_2.c b/src/pokenav_unk_2.c
index 3aec4685e..60aa5ea5e 100644
--- a/src/pokenav_unk_2.c
+++ b/src/pokenav_unk_2.c
@@ -1,6 +1,261 @@
#include "global.h"
+#include "bg.h"
#include "gym_leader_rematch.h"
#include "pokenav.h"
+#include "sprite.h"
+#include "window.h"
+#include "strings.h"
+#include "scanline_effect.h"
+
+extern const u32 gPokenavOptions_Gfx[];
+extern const u16 gPokenavOptions_Pal[];
+
+const u16 gUnknown_0861FC78[] = INCBIN_U16("graphics/pokenav/bg.gbapal");
+const u32 gUnknown_0861FC98[] = INCBIN_U32("graphics/pokenav/bg.4bpp.lz");
+const u32 gUnknown_0861FCAC[] = INCBIN_U32("graphics/pokenav/bg.bin.lz");
+const u16 gUnknown_0861FD4C[] = INCBIN_U16("graphics/pokenav/outline.gbapal");
+const u32 gUnknown_0861FD6C[] = INCBIN_U32("graphics/pokenav/outline.4bpp.lz");
+const u32 gUnknown_0861FFF4[] = INCBIN_U32("graphics/pokenav/outline_map.bin.lz");
+const u16 gUnknown_08620104[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal");
+const u32 gUnknown_08620124[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz");
+
+const struct BgTemplate gUnknown_08620194[3] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x0F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x17,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 0x1F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+u32 sub_81C9C6C(s32);
+u32 sub_81C9CA8(s32);
+u32 sub_81C9D44(s32);
+u32 sub_81C9DD8(s32);
+u32 sub_81C9E58(s32);
+u32 sub_81C9EC8(s32);
+u32 sub_81C9EF8(s32);
+u32 sub_81C9F28(s32);
+
+u32 (*const gUnknown_086201A0[])(s32) =
+{
+ NULL,
+ sub_81C9C6C,
+ sub_81C9CA8,
+ sub_81C9D44,
+ sub_81C9DD8,
+ sub_81C9E58,
+ sub_81C9EC8,
+ sub_81C9EF8,
+ sub_81C9F28
+};
+
+const struct CompressedSpriteSheet gUnknown_086201C4[] =
+{
+ {
+ .data = gPokenavOptions_Gfx,
+ .size = 0x3400,
+ .tag = 0x0003
+ },
+ {
+ .data = gUnknown_08620124,
+ .size = 0x0100,
+ .tag = 0x0001
+ }
+};
+
+ const struct SpritePalette gUnknown_086201D4[] =
+ {
+ {gPokenavOptions_Pal + 0x00, 4},
+ {gPokenavOptions_Pal + 0x10, 5},
+ {gPokenavOptions_Pal + 0x20, 6},
+ {gPokenavOptions_Pal + 0x30, 7},
+ {gPokenavOptions_Pal + 0x40, 8},
+ {gUnknown_08620104, 3},
+ {}
+};
+
+const u16 gUnknown_0862020C[] = {0, 0};
+const u16 gUnknown_08620210[] = {0x20, 1};
+const u16 gUnknown_08620214[] = {0x40, 4};
+const u16 gUnknown_08620218[] = {0x60, 2};
+const u16 gUnknown_0862021C[] = {0x80, 3};
+const u16 gUnknown_08620220[] = {0xA0, 1};
+const u16 gUnknown_08620224[] = {0xC0, 1};
+const u16 gUnknown_08620228[] = {0xE0, 4};
+const u16 gUnknown_0862022C[] = {0x100, 1};
+const u16 gUnknown_08620230[] = {0x120, 2};
+const u16 gUnknown_08620234[] = {0x140, 0};
+const u16 gUnknown_08620238[] = {0x160, 0};
+const u16 gUnknown_0862023C[] = {0x180, 3};
+
+struct UnkStruct_08620240
+{
+ u16 unk0;
+ u16 unk2;
+ const u16 *unk4[6];
+};
+
+const struct UnkStruct_08620240 gUnknown_08620240[5] =
+{
+ {
+ 0x2A,
+ 0x14,
+ {gUnknown_0862020C, gUnknown_08620210, gUnknown_0862021C, NULL, NULL, NULL}
+ },
+ {
+ 0x2A,
+ 0x14,
+ {gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_0862021C, NULL, NULL}
+ },
+ {
+ 0x2A,
+ 0x14,
+ {gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_08620218, gUnknown_0862021C, NULL}
+ },
+ {
+ 0x38,
+ 0x14,
+ {gUnknown_08620220, gUnknown_08620224, gUnknown_0862023C, NULL, NULL, NULL}
+ },
+ {
+ 0x28,
+ 0x10,
+ {gUnknown_08620228, gUnknown_0862022C, gUnknown_08620230, gUnknown_08620234, gUnknown_08620238, gUnknown_0862023C}
+ },
+};
+
+const struct WindowTemplate gUnknown_086202CC =
+{
+ .bg = 1,
+ .tilemapLeft = 3,
+ .tilemapTop = 17,
+ .width = 0x18,
+ .height = 0x2,
+ .paletteNum = 1,
+ .baseBlock = 8
+};
+
+const u8 *const gUnknown_086202D4[] =
+{
+ gUnknown_085EBCC5,
+ gUnknown_085EBCE8,
+ gUnknown_085EBD01,
+ gUnknown_085EBD1C,
+ gUnknown_085EBD34,
+ gUnknown_085EBD83,
+ gUnknown_085EBDA2,
+ gUnknown_085EBDBF,
+ gUnknown_085EBDDB,
+ gUnknown_085EBDEE,
+ gUnknown_085EBE06,
+ gUnknown_085EBE19,
+ gUnknown_085EBE2D,
+ gUnknown_085EBE41
+};
+
+const u8 gUnknown_0862030C[] = {6, 8, 7};
+
+const u8 gUnknown_0862030F[] = {6, 8, 7, 0, 0};
+
+const struct OamData gUnknown_08620314 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .bpp = 0,
+ .shape = SPRITE_SHAPE(32x16),
+ .x = 0,
+ .size = SPRITE_SIZE(32x16),
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+};
+
+const union AffineAnimCmd gUnknown_0862031C[] =
+{
+ AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
+ AFFINEANIMCMD_END,
+};
+
+const union AffineAnimCmd gUnknown_0862032C[] =
+{
+ AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
+ AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0x12),
+ AFFINEANIMCMD_END,
+};
+
+const union AffineAnimCmd *const gUnknown_08620344[] =
+{
+ gUnknown_0862031C,
+ gUnknown_0862032C
+};
+
+const struct SpriteTemplate gUnknown_0862034C =
+{
+ .tileTag = 3,
+ .paletteTag = 4,
+ .oam = &gUnknown_08620314,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gUnknown_08620344,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct OamData gUnknown_08620364 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .bpp = 0,
+ .shape = SPRITE_SHAPE(32x16),
+ .x = 0,
+ .size = SPRITE_SIZE(32x16),
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+};
+
+const struct SpriteTemplate gUnknown_0862036C =
+{
+ .tileTag = 1,
+ .paletteTag = 3,
+ .oam = &gUnknown_08620364,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct ScanlineEffectParams gUnknown_08620384 =
+{
+ (void *)REG_ADDR_WIN0H,
+ ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1,
+ 1,
+ 0
+};
bool32 sub_81C98D4(void)
{
diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c
index d7afada49..bf3d82df7 100755
--- a/src/pokenav_unk_3.c
+++ b/src/pokenav_unk_3.c
@@ -37,9 +37,10 @@ static u32 sub_81CACF8(struct Pokenav3Struct *);
static u32 sub_81CAD20(s32);
static bool32 sub_81CB1D0(void);
-extern const u8 gUnknown_08622508[];
-extern const u8 gUnknown_0862250A[];
-extern const u8 *const gUnknown_08622028[][4];
+#include "data/text/match_call_messages.h"
+
+const u8 gUnknown_08622508[] = {0, 2};
+const u8 gUnknown_0862250A[] = {0, 1, 2};
bool32 sub_81CAAE8(void)
{
@@ -364,7 +365,7 @@ const u8 *sub_81CAFD8(int index, int textType)
var0 = state->unk1C[index].unk2;
}
- return gUnknown_08622028[var0][textType];
+ return gMatchCallMessages[var0][textType];
}
u16 sub_81CB01C(void)
diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c
index cd9651580..93dab4491 100755
--- a/src/pokenav_unk_4.c
+++ b/src/pokenav_unk_4.c
@@ -93,27 +93,191 @@ static void sub_81CC330(struct Pokenav4Struct *);
static struct Sprite *sub_81CC370(void);
static void sub_81CC440(struct Sprite *sprite);
static void sub_81CC4A4(struct Sprite *sprite);
+void sub_81CC34C(struct Sprite *sprite);
+u32 sub_81CB510(s32);
+u32 sub_81CB588(s32);
+u32 sub_81CB600(s32);
+u32 sub_81CB678(s32);
+u32 sub_81CB6F0(s32);
+u32 sub_81CB734(s32);
+u32 sub_81CB75C(s32);
+u32 sub_81CB7A0(s32);
+u32 sub_81CB824(s32);
+u32 sub_81CB888(s32);
+u32 sub_81CB93C(s32);
+u32 sub_81CBAD4(s32);
+u32 sub_81CB9C8(s32);
+u32 sub_81CBA68(s32);
+u32 sub_81CBB74(s32);
-extern const LoopedTask gUnknown_08622798[];
-extern const struct BgTemplate gUnknown_0862278C[3];
-extern const u16 gUnknown_08622510[];
-extern const u32 gUnknown_08622530[];
-extern const u32 gUnknown_08622760[];
-extern const u16 gUnknown_08622700[];
-extern const u16 gUnknown_08622720[];
-extern const u8 gUnknown_086225D4[];
-extern const u16 gUnknown_086226E0[];
-extern const struct BgTemplate gUnknown_08622794;
-extern const struct WindowTemplate gUnknown_086227D8;
-extern const struct WindowTemplate gUnknown_086227E0;
-extern const u8 *const gUnknown_086227E8[];
extern const struct WindowTemplate gUnknown_08622808;
-extern const u8 gUnknown_086227F4[];
-extern const struct CompressedSpriteSheet gUnknown_08622810[1];
-extern const struct SpritePalette gUnknown_08622818[];
extern const struct SpriteTemplate gUnknown_08622830;
extern const struct SpriteTemplate gUnknown_08622850;
+const u16 gUnknown_08622510[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal");
+const u32 gUnknown_08622530[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz");
+const u32 gUnknown_086225D4[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz");
+const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/arrow2.gbapal");
+const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/arrow2.4bpp.lz");
+const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/86226E0.gbapal");
+const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbapal");
+const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal");
+const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz");
+
+const struct BgTemplate gUnknown_0862278C[3] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 0x1F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0x80
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x07,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+const LoopedTask gUnknown_08622798[] =
+{
+ NULL,
+ sub_81CB510,
+ sub_81CB588,
+ sub_81CB600,
+ sub_81CB678,
+ sub_81CB6F0,
+ sub_81CB734,
+ sub_81CB75C,
+ sub_81CB7A0,
+ sub_81CB824,
+ sub_81CB888,
+ sub_81CB93C,
+ sub_81CBAD4,
+ sub_81CB9C8,
+ sub_81CBA68,
+ sub_81CBB74
+};
+
+const struct WindowTemplate gUnknown_086227D8 =
+{
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 5,
+ .width = 11,
+ .height = 2,
+ .paletteNum = 2,
+ .baseBlock = 16
+};
+
+const struct WindowTemplate gUnknown_086227E0 =
+{
+ .bg = 2,
+ .tilemapLeft = 0,
+ .tilemapTop = 9,
+ .width = 11,
+ .height = 8,
+ .paletteNum = 2,
+ .baseBlock = 38
+};
+
+const u8 *const gUnknown_086227E8[] =
+{
+ gUnknown_085EC017,
+ gUnknown_085EC01C,
+ gUnknown_085EC022
+};
+
+const u8 gUnknown_086227F4[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p");
+
+const struct WindowTemplate gUnknown_08622808 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 12,
+ .width = 0x1C,
+ .height = 0x04,
+ .paletteNum = 1,
+ .baseBlock = 10
+};
+
+const struct CompressedSpriteSheet gUnknown_08622810[1] =
+{
+ {gUnknown_086226B8, 0x40, 7}
+};
+
+const struct SpritePalette gUnknown_08622818[] =
+{
+ {gUnknown_08622698, 12},
+ {}
+};
+
+const struct OamData gUnknown_08622828 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .bpp = 0,
+ .shape = SPRITE_SHAPE(8x16),
+ .x = 0,
+ .size = SPRITE_SIZE(8x16),
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+};
+
+const struct SpriteTemplate gUnknown_08622830 =
+{
+ .tileTag = 7,
+ .paletteTag = 12,
+ .oam = &gUnknown_08622828,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_81CC34C,
+};
+
+const struct OamData gUnknown_08622848 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .bpp = 0,
+ .shape = SPRITE_SHAPE(64x64),
+ .x = 0,
+ .size = SPRITE_SIZE(64x64),
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+};
+
+const struct SpriteTemplate gUnknown_08622850 =
+{
+ .tileTag = 8,
+ .paletteTag = 13,
+ .oam = &gUnknown_08622848,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
bool32 sub_81CB260(void)
{
struct Pokenav4Struct *state = AllocSubstruct(6, sizeof(struct Pokenav4Struct));
@@ -718,7 +882,7 @@ static void sub_81CBBB8(void)
template.unkE = 7;
template.unk10 = sub_81CB050;
template.unk14 = sub_81CBCEC;
- sub_81C81D4(&gUnknown_08622794, &template, 2);
+ sub_81C81D4(&gUnknown_0862278C[2], &template, 2);
CreateTask(sub_81CBC64, 7);
}
diff --git a/src/pokenav_unk_5.c b/src/pokenav_unk_5.c
index 5f24fd07f..ccab58078 100755
--- a/src/pokenav_unk_5.c
+++ b/src/pokenav_unk_5.c
@@ -32,11 +32,11 @@ struct Pokenav5Struct_2
u8 cityZoomPics[22][0xC8];
};
-struct CityZoomPic
+struct CityMapEntry
{
u16 mapSecId;
- u16 unk2;
- const u32 *data;
+ u16 index;
+ const u32 *tilemap;
};
static u32 sub_81CC568(struct Pokenav5Struct *);
@@ -61,17 +61,110 @@ static void sub_81CCDE8(struct Pokenav5Struct_2 *, int, int);
static void sub_81CCFA4(int);
static void sub_81CCC9C(u8 taskId);
static void sub_81CCF78(void);
+void sub_81CCEF4(struct Sprite *sprite);
+u32 sub_81CC848(s32);
+u32 sub_81CC878(s32);
+u32 sub_81CC8D8(s32);
+u32 sub_81CC95C(s32);
-extern const LoopedTask gUnknown_086230E4[];
-extern const struct BgTemplate gUnknown_086230D8[2];
-extern const struct CompressedSpriteSheet gUnknown_086230F8[1];
-extern const struct SpritePalette gUnknown_08623100[];
-extern const struct WindowTemplate gUnknown_08623110;
-extern const u32 gUnknown_08622888[];
-extern const u16 gUnknown_08622868[];
extern const u16 gHoennMapZoomIcons_Pal[];
-extern const struct CityZoomPic gUnknown_08623118[22];
extern const struct SpriteTemplate gUnknown_086231D0;
+extern const u32 gHoennMapZoomIcons_Gfx[];
+
+const u16 gUnknown_08622868[] = INCBIN_U16("graphics/pokenav/8622868.gbapal");
+const u32 gUnknown_08622888[] = INCBIN_U32("graphics/pokenav/zoom_tiles.4bpp.lz");
+
+#include "data/region_map/city_map_tilemaps.h"
+
+
+const struct BgTemplate gUnknown_086230D8[3] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x1F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 0x00,
+ .screenSize = 2,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ },
+};
+
+const LoopedTask gUnknown_086230E4[] =
+{
+ NULL,
+ sub_81CC848,
+ sub_81CC878,
+ sub_81CC8D8,
+ sub_81CC95C
+};
+
+const struct CompressedSpriteSheet gUnknown_086230F8[1] =
+{
+ {gHoennMapZoomIcons_Gfx, 0x800, 6}
+};
+
+const struct SpritePalette gUnknown_08623100[] =
+{
+ {gHoennMapZoomIcons_Pal, 11},
+ {}
+};
+
+const struct WindowTemplate gUnknown_08623110 =
+{
+ .bg = 1,
+ .tilemapLeft = 17,
+ .tilemapTop = 4,
+ .width = 12,
+ .height = 13,
+ .paletteNum = 1,
+ .baseBlock = 0x4C
+};
+
+#include "data/region_map/city_map_entries.h"
+
+const struct OamData gUnknown_086231C8 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .bpp = 0,
+ .shape = SPRITE_SHAPE(32x8),
+ .x = 0,
+ .size = SPRITE_SIZE(32x8),
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+};
+
+const struct SpriteTemplate gUnknown_086231D0 =
+{
+ .tileTag = 6,
+ .paletteTag = 11,
+ .oam = &gUnknown_086231C8,
+ .anims = gDummySpriteAnimTable,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_81CCEF4,
+};
u32 sub_81CC4D4(void)
{
@@ -215,7 +308,7 @@ static u32 sub_81CC6F4(s32 taskState)
HideBg(2);
HideBg(3);
SetBgMode(1);
- InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8));
+ InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8) - 1);
regionMap = GetSubstructPtr(16);
sub_8122CF8(regionMap, &gUnknown_086230D8[1], sub_81CC6D0());
sub_81CC9C0();
@@ -278,7 +371,7 @@ static u32 sub_81CC6F4(s32 taskState)
}
}
-u32 sub_81CC848(int taskState)
+u32 sub_81CC848(s32 taskState)
{
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
switch (taskState)
@@ -295,7 +388,7 @@ u32 sub_81CC848(int taskState)
return 4;
}
-u32 sub_81CC878(int taskState)
+u32 sub_81CC878(s32 taskState)
{
switch (taskState)
{
@@ -321,7 +414,7 @@ u32 sub_81CC878(int taskState)
return 4;
}
-u32 sub_81CC8D8(int taskState)
+u32 sub_81CC8D8(s32 taskState)
{
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
switch (taskState)
@@ -354,7 +447,7 @@ u32 sub_81CC8D8(int taskState)
return 4;
}
-u32 sub_81CC95C(int taskState)
+u32 sub_81CC95C(s32 taskState)
{
switch (taskState)
{
@@ -521,9 +614,9 @@ static bool32 sub_81CCD24(void)
static u32 sub_81CCD34(s32 taskState)
{
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
- if (taskState < (int)ARRAY_COUNT(gUnknown_08623118))
+ if (taskState < (int)ARRAY_COUNT(gPokenavCityMaps))
{
- LZ77UnCompWram(gUnknown_08623118[taskState].data, state->cityZoomPics[taskState]);
+ LZ77UnCompWram(gPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]);
return 1;
}
@@ -533,10 +626,10 @@ static u32 sub_81CCD34(s32 taskState)
static void sub_81CCD70(struct Pokenav5Struct_2 *state, int mapSecId, int pos)
{
int i;
- for (i = 0; i < (int)ARRAY_COUNT(gUnknown_08623118) && (gUnknown_08623118[i].mapSecId != mapSecId || gUnknown_08623118[i].unk2 != pos); i++)
+ for (i = 0; i < (int)ARRAY_COUNT(gPokenavCityMaps) && (gPokenavCityMaps[i].mapSecId != mapSecId || gPokenavCityMaps[i].index != pos); i++)
;
- if (i == ARRAY_COUNT(gUnknown_08623118))
+ if (i == ARRAY_COUNT(gPokenavCityMaps))
return;
FillBgTilemapBufferRect_Palette0(1, 0x1041, 17, 6, 12, 11);
diff --git a/src/pokenav_unk_7.c b/src/pokenav_unk_7.c
index ff5d2cc6e..90b677fa7 100644
--- a/src/pokenav_unk_7.c
+++ b/src/pokenav_unk_7.c
@@ -1,5 +1,7 @@
#include "global.h"
#include "bg.h"
+#include "window.h"
+#include "pokenav.h"
#include "decompress.h"
#include "gpu_regs.h"
#include "graphics.h"
@@ -13,7 +15,106 @@
#include "strings.h"
#include "text.h"
-static u8 gUnknown_030012BC;
+u32 sub_81CE37C(s32);
+u32 sub_81CE2D0(s32);
+u32 sub_81CE4D8(s32);
+u32 sub_81CE5E4(s32);
+u32 sub_81CE6BC(s32);
+u32 sub_81CE700(s32);
+
+BSS_DATA u8 gUnknown_030012BC;
+
+const u16 gUnknown_086231E8[] = INCBIN_U16("graphics/pokenav/86231E8.gbapal");
+const u16 gUnknown_08623208[] = INCBIN_U16("graphics/pokenav/8623208.gbapal");
+const u32 gUnknown_08623228[] = INCBIN_U32("graphics/pokenav/8623228.4bpp.lz");
+const u32 gUnknown_0862323C[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz");
+const u16 gUnknown_08623338[] = INCBIN_U16("graphics/pokenav/8623338.gbapal");
+
+const struct BgTemplate gUnknown_08623358[3] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x1F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 0x1D,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x1E,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+const struct WindowTemplate gUnknown_08623364 =
+{
+ .bg = 1,
+ .tilemapLeft = 13,
+ .tilemapTop = 1,
+ .width = 13,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 2
+};
+
+const struct WindowTemplate gUnknown_0862336C =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 6,
+ .width = 7,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x36
+};
+
+const struct WindowTemplate gUnknown_08623374 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x1C,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x44
+};
+
+const struct WindowTemplate gUnknown_0862337C =
+{
+ .bg = 1,
+ .tilemapLeft = 13,
+ .tilemapTop = 0x1C,
+ .width = 3,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x44
+};
+
+const LoopedTask gUnknown_08623384[] =
+{
+ NULL,
+ sub_81CE37C,
+ sub_81CE2D0,
+ sub_81CE4D8,
+ sub_81CE5E4,
+ sub_81CE6BC,
+ sub_81CE700
+};
struct Pokenav7Struct
{
@@ -52,19 +153,6 @@ void sub_81CEEC8(void);
void sub_81CEE68(void);
void sub_81CEE74(bool8 showBg);
-// const data
-extern const LoopedTask gUnknown_08623384[];
-extern const struct BgTemplate gUnknown_08623358[3];
-extern const u32 gUnknown_08623228[];
-extern const u32 gUnknown_0862323C[];
-extern const u16 gUnknown_086231E8[];
-extern const u16 gUnknown_08623338[];
-extern const u16 gUnknown_08623208[];
-extern const struct WindowTemplate gUnknown_08623364;
-extern const struct WindowTemplate gUnknown_0862336C;
-extern const struct WindowTemplate gUnknown_08623374;
-extern const struct WindowTemplate gUnknown_0862337C;
-
// code
bool32 sub_81CDDD4(void)
{
diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c
index 56ffd0f0a..bcafc14d0 100644
--- a/src/pokenav_unk_8.c
+++ b/src/pokenav_unk_8.c
@@ -1,5 +1,81 @@
#include "global.h"
#include "pokenav.h"
+#include "bg.h"
+#include "window.h"
+
+u32 sub_81CF134(void);
+u32 sub_81CF1C4(void);
+u32 sub_81CF1D8(void);
+u32 sub_81CF278(void);
+u32 sub_81CF578(s32);
+u32 sub_81CF5F0(s32);
+u32 sub_81CF668(s32);
+u32 sub_81CF6E0(s32);
+u32 sub_81CF758(s32);
+u32 sub_81CF798(s32);
+
+const u32 gUnknown_086233A0[] = {0x16, 0x17, 0x18, 0x21, 0x2F};
+
+u32 (*const gUnknown_086233B4[])(void) =
+{
+ sub_81CF134,
+ sub_81CF1C4,
+ sub_81CF1D8,
+ sub_81CF278
+};
+
+const u16 gUnknown_086233C4[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal");
+const u32 gUnknown_086233E4[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz");
+const u32 gUnknown_086234AC[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz");
+const u16 gUnknown_08623570[] = INCBIN_U16("graphics/pokenav/8623570.gbapal");
+
+const struct BgTemplate gUnknown_08623590 =
+{
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+};
+
+const struct BgTemplate gUnknown_08623594 =
+{
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x07,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+};
+
+const LoopedTask gUnknown_08623598[] =
+{
+ NULL,
+ sub_81CF578,
+ sub_81CF5F0,
+ sub_81CF668,
+ sub_81CF6E0,
+ sub_81CF758,
+ sub_81CF798
+};
+
+const struct WindowTemplate gUnknown_086235B4 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 6,
+ .width = 7,
+ .height = 2,
+ .paletteNum = 1,
+ .baseBlock = 20
+};
+
+const u8 gUnknown_086235BC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086235C8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086235D4[] = _("{UNK_SPACER}");
struct PokenavSub7
{
@@ -12,8 +88,6 @@ struct PokenavSub7
struct PokenavSub18 *unkPtr;
};
-extern const u32 gUnknown_086233A0[];
-
u32 sub_81CF010(struct PokenavSub7 *structPtr);
u32 sub_81CF030(struct PokenavSub7 *structPtr);
u32 sub_81CF0B8(struct PokenavSub7 *structPtr);
diff --git a/src/pokenav_unk_9.c b/src/pokenav_unk_9.c
new file mode 100644
index 000000000..2927d7211
--- /dev/null
+++ b/src/pokenav_unk_9.c
@@ -0,0 +1,74 @@
+#include "global.h"
+#include "pokenav.h"
+#include "bg.h"
+#include "window.h"
+
+u32 sub_81CFB8C(void);
+u32 sub_81CFC2C(void);
+u32 sub_81CFC40(void);
+u32 sub_81CFFFC(s32);
+u32 sub_81D0074(s32);
+u32 sub_81D00EC(s32);
+u32 sub_81D0164(s32);
+u32 sub_81D01DC(s32);
+u32 sub_81D021C(s32);
+
+u32 (*const gUnknown_086235D8[])(void) =
+{
+ sub_81CFB8C,
+ sub_81CFC2C,
+ sub_81CFC40
+};
+
+const u16 gUnknown_086235E4[] = INCBIN_U16("graphics/pokenav/ui_ribbons.gbapal");
+const u32 gUnknown_08623604[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz");
+const u32 gUnknown_086236CC[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz");
+const u16 gUnknown_08623790[] = INCBIN_U16("graphics/pokenav/8623790.gbapal");
+
+const struct BgTemplate gUnknown_086237B0 =
+{
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+};
+
+const struct BgTemplate gUnknown_086237B4 =
+{
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x07,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+};
+
+const LoopedTask gUnknown_086237B8[] =
+{
+ NULL,
+ sub_81CFFFC,
+ sub_81D0074,
+ sub_81D00EC,
+ sub_81D0164,
+ sub_81D01DC,
+ sub_81D021C
+};
+
+const struct WindowTemplate gUnknown_086237D4 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 6,
+ .width = 7,
+ .height = 2,
+ .paletteNum = 1,
+ .baseBlock = 20
+};
+
+const u8 gUnknown_086237DC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086237E8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086237F4[] = _("{UNK_SPACER}");
diff --git a/src/text.c b/src/text.c
index 91a82b19f..7e4fa7104 100644
--- a/src/text.c
+++ b/src/text.c
@@ -462,6 +462,108 @@ u8 GetLastTextColor(u8 colorType)
}
}
+#ifdef NONMATCHING
+
+#define GLYPH_COPY(fromY_, toY_, fromX_, toX_, unk) \
+{ \
+ u32 i, j, *ptr, toY, fromX, toX, r5, toOrr, bits; \
+ u8 *dst; \
+ \
+ j = fromX_; \
+ i = fromY_; \
+ ptr = unk; \
+ toX = toX_; \
+ toY = toY_; \
+ fromX = fromX_; \
+ \
+ for (; i < toY; i++) \
+ { \
+ r5 = *(ptr++); \
+ for (j = fromX; j < toX; j++) \
+ { \
+ toOrr = r5 & 0xF; \
+ if (toOrr) \
+ { \
+ dst = windowTiles + ((j / 8) * 32) + ((j & 7) / 2) + ((i / 8) * widthOffset) + ((i & 7) * 4); \
+ bits = ((j & 1) << 2); \
+ *dst = ((toOrr << bits) | (*dst & (0xF0 >> bits))); \
+ } \
+ r5 >>= 4; \
+ } \
+ } \
+}
+
+void CopyGlyphToWindow(struct TextPrinter *textPrinter)
+{
+ struct Window *win;
+ struct WindowTemplate *winTempl;
+ struct Struct_03002F90 *unkStruct;
+ u32 currX, widthOffset, currY;
+ s32 r4, r0;
+ u8 *windowTiles;
+
+ win = &gWindows[textPrinter->printerTemplate.windowId];
+ winTempl = &win->window;
+
+ r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX;
+ if (r4 > gUnknown_03002F90.unk80)
+ r4 = gUnknown_03002F90.unk80;
+
+ r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY;
+ if (r0 > gUnknown_03002F90.unk81)
+ r0 = gUnknown_03002F90.unk81;
+
+ currX = textPrinter->printerTemplate.currentX;
+ currY = textPrinter->printerTemplate.currentY;
+ unkStruct = &gUnknown_03002F90;
+ windowTiles = win->tileData;
+ widthOffset = winTempl->width * 32;
+
+ if (r4 <= 8)
+ {
+ if (r0 <= 8)
+ {
+ GLYPH_COPY(currY, currY + r0, currX, currX + r4, unkStruct->unk0);
+ }
+ else
+ {
+ u32 temp;
+ GLYPH_COPY(currY, currY + 8, currX, currX + r4, unkStruct->unk0);
+
+ temp = currY + 8;
+ GLYPH_COPY(temp, (temp - 8) + r0, currX, currX + r4, unkStruct->unk40);
+ }
+ }
+ else
+ {
+ if (r0 <= 8)
+ {
+ u32 temp;
+ GLYPH_COPY(currY, currY + r0, currX, currX + 8, unkStruct->unk0);
+
+ temp = currX + 8;
+ GLYPH_COPY(currY, currY + r0, temp, (temp - 8) + r4, unkStruct->unk20);
+ }
+ else
+ {
+ u32 temp;
+ GLYPH_COPY(currY, currY + 8, currX, currX + 8, unkStruct->unk0);
+
+ temp = currX + 8;
+ GLYPH_COPY(currY, currY + 8, temp, temp - 8 + r4, unkStruct->unk20);
+
+ temp = currY + 8;
+ GLYPH_COPY(temp, temp - 8 + r0, currX, currX + 8, unkStruct->unk40);
+ {
+ u32 tempX, tempY;
+ tempX = currX + 8;
+ tempY = currY + 8;
+ GLYPH_COPY(tempY, tempY - 8 + r0, tempX, tempX - 8 + r4, unkStruct->unk60);
+ }
+ }
+ }
+}
+#else
NAKED
void CopyGlyphToWindow(struct TextPrinter *x)
{
@@ -1164,6 +1266,7 @@ _080052AA:\n\
bx r0\n\
.pool");
}
+#endif // NONMATCHING
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
{