summaryrefslogtreecommitdiff
path: root/src/pokemon_summary_screen.c
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-12-31 02:30:30 -0600
committerDiegoisawesome <diego@domoreaweso.me>2018-12-31 02:30:30 -0600
commitd004ce065c9cc6425df6f567dff39eb831f84875 (patch)
tree2c20338324f10a553e78e731d999dd58669266c3 /src/pokemon_summary_screen.c
parentec780bb2098be75e591b212e85947f88c91d4e37 (diff)
parent58f130d007b97623dd5c7a3b373800c138f75c5e (diff)
Merge branch 'master' of github.com:pret/pokeemerald into trade
Diffstat (limited to 'src/pokemon_summary_screen.c')
-rw-r--r--src/pokemon_summary_screen.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index e6714e2a8..14d5aa9dc 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -311,7 +311,7 @@ static const struct UnkStruct_61CC04 gUnknown_0861CC10 =
static const s8 gUnknown_0861CC1C[] = {0, 2, 3, 1, 4, 5};
static const struct WindowTemplate gUnknown_0861CC24[] =
{
- {
+ {//Text for Pokemon Info
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 0,
@@ -320,7 +320,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 1,
},
- {
+ {//Text for Pokemon Skills
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 0,
@@ -329,7 +329,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 23,
},
- {
+ {//Text for Battle Moves
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 0,
@@ -338,7 +338,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 45,
},
- {
+ {//Text for Contest Moves
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 0,
@@ -347,7 +347,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 67,
},
- {
+ { //Text on Pokemon Info: Button prompt: Cancel
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 0,
@@ -356,7 +356,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 7,
.baseBlock = 89,
},
- {
+ {//Info button found under moves
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 0,
@@ -365,7 +365,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 7,
.baseBlock = 105,
},
- {
+ {//Switch button under moves when viewing moves
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 0,
@@ -374,7 +374,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 7,
.baseBlock = 121,
},
- {
+ {//Unknown
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 4,
@@ -383,7 +383,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 137,
},
- {
+ {//Unknown
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 4,
@@ -392,7 +392,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 137,
},
- {
+ {//Type on pokemon info page
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 6,
@@ -401,7 +401,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 173,
},
- {
+ {//HP, Attack and Defense text
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 7,
@@ -410,7 +410,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 209,
},
- {
+ {//Sp. atk, Sp. Def and Speed texxt
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 7,
@@ -419,7 +419,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 245,
},
- {
+ {//EXP and next lvl.
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 14,
@@ -428,7 +428,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 275,
},
- {
+ {//Unknown
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 18,
@@ -437,7 +437,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 319,
},
- {
+ {//move text: Power, Accuracy and their numeric values.
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 15,
@@ -446,7 +446,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 331,
},
- {
+ {//contest text: appeal and jam
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 15,
@@ -455,7 +455,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 367,
},
- {
+ {//Unknown
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 4,
@@ -464,7 +464,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 387,
},
- {
+ {//No.
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 2,
@@ -473,7 +473,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 7,
.baseBlock = 387,
},
- {
+ {//Upper name
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 12,
@@ -482,7 +482,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
.paletteNum = 6,
.baseBlock = 395,
},
- {
+ {//Lower name
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 14,
@@ -495,7 +495,7 @@ static const struct WindowTemplate gUnknown_0861CC24[] =
};
static const struct WindowTemplate gUnknown_0861CCCC[] =
{
- {
+ {//Original Trainer
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 4,
@@ -504,7 +504,7 @@ static const struct WindowTemplate gUnknown_0861CCCC[] =
.paletteNum = 6,
.baseBlock = 449,
},
- {
+ {//ID numbers
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 4,
@@ -513,7 +513,7 @@ static const struct WindowTemplate gUnknown_0861CCCC[] =
.paletteNum = 6,
.baseBlock = 471,
},
- {
+ {//Ability
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 9,
@@ -522,7 +522,7 @@ static const struct WindowTemplate gUnknown_0861CCCC[] =
.paletteNum = 6,
.baseBlock = 485,
},
- {
+ {//Trainer Memo
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 14,
@@ -534,7 +534,7 @@ static const struct WindowTemplate gUnknown_0861CCCC[] =
};
static const struct WindowTemplate gUnknown_0861CCEC[] =
{
- {
+ {//Held Item string
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 4,
@@ -543,7 +543,7 @@ static const struct WindowTemplate gUnknown_0861CCEC[] =
.paletteNum = 6,
.baseBlock = 449,
},
- {
+ {//Ribbon string
.bg = 0,
.tilemapLeft = 20,
.tilemapTop = 4,
@@ -552,7 +552,7 @@ static const struct WindowTemplate gUnknown_0861CCEC[] =
.paletteNum = 6,
.baseBlock = 469,
},
- {
+ {//Stat numbers left (HP, ATK & DEF)
.bg = 0,
.tilemapLeft = 16,
.tilemapTop = 7,
@@ -561,7 +561,7 @@ static const struct WindowTemplate gUnknown_0861CCEC[] =
.paletteNum = 6,
.baseBlock = 489,
},
- {
+ {//Stat numbers right (SP.ATK, SP.DEF & SPEED)
.bg = 0,
.tilemapLeft = 27,
.tilemapTop = 7,
@@ -570,7 +570,7 @@ static const struct WindowTemplate gUnknown_0861CCEC[] =
.paletteNum = 6,
.baseBlock = 525,
},
- {
+ {//Exp numbers
.bg = 0,
.tilemapLeft = 24,
.tilemapTop = 14,
@@ -582,7 +582,7 @@ static const struct WindowTemplate gUnknown_0861CCEC[] =
};
static const struct WindowTemplate gUnknown_0861CD14[] =
{
- {
+ {//Move names?
.bg = 0,
.tilemapLeft = 15,
.tilemapTop = 4,
@@ -591,7 +591,7 @@ static const struct WindowTemplate gUnknown_0861CD14[] =
.paletteNum = 6,
.baseBlock = 449,
},
- {
+ {//PP Numbers
.bg = 0,
.tilemapLeft = 24,
.tilemapTop = 4,
@@ -600,7 +600,7 @@ static const struct WindowTemplate gUnknown_0861CD14[] =
.paletteNum = 8,
.baseBlock = 539,
},
- {
+ {//Move description text
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 15,
@@ -1315,7 +1315,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a)
break;
case 1:
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
sum->moves[i] = GetMonData(a, MON_DATA_MOVE1+i);
sum->pp[i] = GetMonData(a, MON_DATA_PP1+i);
@@ -1688,15 +1688,15 @@ static void sub_81C0B8C(u8 taskId)
if (pssData->unk40C9 == 0)
{
data[1] = 1;
- SetBgAttribute(1, 7, 1);
- SetBgAttribute(2, 7, 2);
+ SetBgAttribute(1, BG_ATTR_PRIORITY, 1);
+ SetBgAttribute(2, BG_ATTR_PRIORITY, 2);
schedule_bg_copy_tilemap_to_vram(1);
}
else
{
data[1] = 2;
- SetBgAttribute(2, 7, 1);
- SetBgAttribute(1, 7, 2);
+ SetBgAttribute(2, BG_ATTR_PRIORITY, 1);
+ SetBgAttribute(1, BG_ATTR_PRIORITY, 2);
schedule_bg_copy_tilemap_to_vram(2);
}
ChangeBgX(data[1], 0, 0);
@@ -1745,14 +1745,14 @@ static void sub_81C0D44(u8 taskId)
s16 *data = gTasks[taskId].data;
if (pssData->unk40C9 == 0)
{
- SetBgAttribute(1, 7, 1);
- SetBgAttribute(2, 7, 2);
+ SetBgAttribute(1, BG_ATTR_PRIORITY, 1);
+ SetBgAttribute(2, BG_ATTR_PRIORITY, 2);
schedule_bg_copy_tilemap_to_vram(2);
}
else
{
- SetBgAttribute(2, 7, 1);
- SetBgAttribute(1, 7, 2);
+ SetBgAttribute(2, BG_ATTR_PRIORITY, 1);
+ SetBgAttribute(1, BG_ATTR_PRIORITY, 2);
schedule_bg_copy_tilemap_to_vram(1);
}
if (pssData->currPageIndex > 1)
@@ -1851,7 +1851,7 @@ static void sub_81C0F44(u8 taskId)
static bool8 sub_81C1040(void)
{
u8 i;
- for (i = 1; i < 4; i++)
+ for (i = 1; i < MAX_MON_MOVES; i++)
{
if (pssData->summary.moves[i] != 0)
return TRUE;
@@ -1867,14 +1867,14 @@ static void sub_81C1070(s16 *a, s8 b, u8 *c)
PlaySE(SE_SELECT);
moveIndex = *c;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
moveIndex += b;
if (moveIndex > a[0])
moveIndex = 0;
else if (moveIndex < 0)
moveIndex = a[0];
- if (moveIndex == 4)
+ if (moveIndex == MAX_MON_MOVES)
{
move = pssData->newMove;
break;
@@ -3548,7 +3548,7 @@ static void PrintContestMoveDescription(u8 moveSlot)
{
u16 move;
- if (moveSlot == 4)
+ if (moveSlot == MAX_MON_MOVES)
move = pssData->newMove;
else
move = pssData->summary.moves[moveSlot];
@@ -3744,7 +3744,7 @@ static void sub_81C4420(void)
{
u8 i;
struct PokeSummary *summary = &pssData->summary;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (summary->moves[i] != MOVE_NONE)
SetMoveTypeSpritePosAndType(gBattleMoves[summary->moves[i]].type, 0x55, 0x20 + (i * 0x10), i + 3);
@@ -3757,7 +3757,7 @@ static void sub_81C4484(void)
{
u8 i;
struct PokeSummary *summary = &pssData->summary;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (summary->moves[i] != MOVE_NONE)
SetMoveTypeSpritePosAndType(NUMBER_OF_MON_TYPES + gContestMoves[summary->moves[i]].contestCategory, 0x55, 0x20 + (i * 0x10), i + 3);