Sync more contest docs from Emerald

This commit is contained in:
PikalaxALT 2021-06-21 15:04:48 -04:00
parent 75b2298d37
commit 54cda03087
32 changed files with 663 additions and 638 deletions

View File

@ -156,23 +156,23 @@ gOamData_83CA49C:: @ 83CA49C
.2byte 0x2C00
.align 2
gSpriteTemplate_83CA4A4:: @ 83CA4A4
sSpriteTemplate_Judge:: @ 83CA4A4
spr_template 20005, 20005, gOamData_83CA49C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_083CA4BC:: @ 83CA4BC
sSpriteSheet_Judge:: @ 83CA4BC
obj_tiles gContestJudgeGfx, 2048, 0x4e25
.align 2
gUnknown_083CA4C4:: @ 83CA4C4
sSpriteSheet_JudgeSymbols:: @ 83CA4C4
obj_tiles gContestJudgeSymbolsGfx, 896, 0xabe0
.align 2
gUnknown_083CA4CC:: @ 83CA4CC
sSpritePalette_JudgeSymbols:: @ 83CA4CC
obj_pal gContest3Pal, 0xabe0
.align 2
gUnknown_083CA4D4:: @ 83CA4D4
sSpriteTemplate_JudgeSpeechBubble:: @ 83CA4D4
spr_template 0xABE0, 0xABE0, gOamData_837DF2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.include "data/text/contest_strings.inc"
@ -347,7 +347,7 @@ gSpriteTemplate_83CC584:: @ 83CC584
gUnknown_083CC59C:: @ 83CC59C
.string "{HIGHLIGHT TRANSPARENT}{COLOR}$"
gUnknown_083CC5A2:: @ 83CC5A2
gText_Slash:: @ 83CC5A2
.string "/$"
.align 1

View File

@ -295,13 +295,13 @@ void CB2_StartContest(void);
void Contest_CreatePlayerMon(u8);
void Contest_InitAllPokemon(u8, u8);
u8 CanMonParticipateInContest(struct Pokemon *party);
u16 InitContestMonConditionI(u8, u8);
void InitContestMonConditions(u8);
u16 CalculateContestantRound1Points(u8, u8);
void CalculateRound1Points(u8);
u8 IsSpeciesNotUnown(u16);
void sub_80AF668(void);
void CalculateFinalScores(void);
void SortContestants(u8);
bool8 Contest_SaveWinner(u8);
u8 sub_80B2C4C(u8, u8);
u8 GetContestWinnerSaveIdx(u8, u8);
void Contest_ResetWinners(void);
s8 Contest_GetMoveExcitement(u16);
@ -439,12 +439,12 @@ struct UnknownContestStruct8
u32 unk10;
};
struct UnknownContestStruct6
struct ContestFinalStandings
{
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 totalPoints;
s32 round1Points;
s32 random;
s32 contestant;
};
// TODO: Please move these to ewram.h once the defines are settled down and figured out completely.
@ -463,13 +463,13 @@ struct UnknownContestStruct6
extern u8 gContestPlayerMonIndex;
extern u8 gIsLinkContest;
extern u32 gContestRngValue;
extern u8 gUnknown_02038696[4];
extern u8 gContestantTurnOrder[4];
extern s16 gContestMonRound1Points[4];
extern s16 gContestMonTotalPoints[4];
extern s16 gUnknown_02038680[4];
extern s16 gUnknown_02038688[4];
extern s16 gContestMonAppealPointTotals[4];
extern s16 gContestMonRound2Points[4];
extern u8 gContestFinalStandings[4];
extern u8 gUnknown_02038696[4];
extern u8 gContestantTurnOrder[4];
extern u8 gContestLinkLeaderIndex;
extern u16 gSpecialVar_ContestRank;
extern u16 gSpecialVar_ContestCategory;

View File

@ -18,7 +18,7 @@ struct Shared1000
u16 *unk4;
u8 unk8;
u8 unk9;
u8 unkA; // length of unkC array
u8 unkA; // length of contestant array
u8 unkB; // reporter talked to (Gabby or Ty)
u16 unkC[9];
void (*unk20)(void);

View File

@ -75,7 +75,6 @@
#define CHAR_NEWLINE 0xFE
#define EOS 0xFF // end of string
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 4
#define TEXT_COLOR_TRANSPARENT 0x00
#define TEXT_COLOR_DARK_GREY 0x01
#define TEXT_COLOR_RED 0x02
@ -93,8 +92,28 @@
#define TEXT_COLOR_LIGHT_BLUE 0x0E
#define TEXT_COLOR_WHITE2 0x0F
#define EXT_CTRL_CODE_CLEAR 17
#define EXT_CTRL_CODE_COLOR 0x01
#define EXT_CTRL_CODE_HIGHLIGHT 0x02
#define EXT_CTRL_CODE_SHADOW 0x03
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
#define EXT_CTRL_CODE_PALETTE 0x05
#define EXT_CTRL_CODE_SIZE 0x06
#define EXT_CTRL_CODE_RESET_SIZE 0x07
#define EXT_CTRL_CODE_PAUSE 0x08
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
#define EXT_CTRL_CODE_WAIT_SE 0x0A
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
#define EXT_CTRL_CODE_ESCAPE 0x0C
#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D // nop
#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
#define EXT_CTRL_CODE_PLAY_SE 0x10
#define EXT_CTRL_CODE_CLEAR 0x11
#define EXT_CTRL_CODE_SKIP 0x12
#define EXT_CTRL_CODE_CLEAR_TO 0x13
#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14
#define EXT_CTRL_CODE_JPN 0x15
#define EXT_CTRL_CODE_ENG 0x16
struct WindowTemplate
{

View File

@ -19,7 +19,7 @@
extern u16 gBattleTypeFlags;
extern u8 gBattleOutcome;
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 BattleText_Win[];
extern u8 BattleText_Loss[];
@ -247,9 +247,9 @@ void sub_800D6D4(void)
void ApplyPlayerChosenFrameToBattleMenu(void)
{
TextWindow_SetBaseTileNum(0x12);
TextWindow_LoadStdFrameGraphicsOverridePal(&gUnknown_03004210, 1);
TextWindow_LoadStdFrameGraphicsOverridePal(&gWindowTemplate_Contest_MoveDescription, 1);
TextWindow_SetBaseTileNum(0x22);
TextWindow_LoadStdFrameGraphicsOverridePal(&gUnknown_03004210, 1);
TextWindow_LoadStdFrameGraphicsOverridePal(&gWindowTemplate_Contest_MoveDescription, 1);
gPlttBufferUnfaded[92] = 0x7fe0;
gPlttBufferUnfaded[93] = 0x2529;
gPlttBufferUnfaded[94] = 0x7fff;
@ -444,8 +444,8 @@ static void sub_800DAF8(u8 taskId, u8 windowId, u8 *dest)
#define PRINT_MESSAGE(text, tileDataStartOffset, x) \
{ \
Text_InitWindow(&gUnknown_03004210, text, tileDataStartOffset, x, MESSAGE_Y); \
Text_PrintWindow8002F44(&gUnknown_03004210); \
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, text, tileDataStartOffset, x, MESSAGE_Y); \
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription); \
}
#define PRINT_MESSAGE_LEFT(text, tileDataStartOffset) PRINT_MESSAGE(text, tileDataStartOffset, LEFT_MESSAGE_X)

View File

@ -48,7 +48,7 @@ extern u16 gIntroSlideFlags;
extern u8 gUnknown_02024E68[];
extern struct SpriteTemplate gUnknown_02024E8C;
extern u8 gAnimMoveTurn;
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gUnknown_0300434C[];
extern u32 gBattleControllerExecFlags;
extern MainCallback gPreBattleCallback1;
@ -427,7 +427,7 @@ void sub_8037BBC(void)
void sub_8037C2C(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
LinkOpponentBufferExecCompleted();
}
@ -1405,7 +1405,7 @@ void LinkOpponentHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_8037C2C;
}

View File

@ -48,7 +48,7 @@ extern u16 gAnimMovePower;
extern u8 gAnimFriendship;
extern u16 gWeatherMoveAnim;
extern u8 gAnimMoveTurn;
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern MainCallback gPreBattleCallback1;
extern void (*gBattlerControllerFuncs[])(void);
extern u8 gHealthboxSpriteIds[];
@ -368,7 +368,7 @@ void sub_811DF34(void)
void sub_811DFA0(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
LinkPartnerBufferExecCompleted();
}
@ -1341,7 +1341,7 @@ void LinkPartnerHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_811DFA0;
}

View File

@ -53,7 +53,7 @@ extern u32 gTransformedPersonalities[];
extern u8 gAnimMoveTurn;
extern u8 gAnimScriptActive;
extern void (*gAnimScriptCallback)(void);
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gDisplayedStringBattle[];
extern u8 gBattlerTarget;
extern u8 gAbsentBattlerFlags;
@ -432,7 +432,7 @@ void sub_8033160(void)
void sub_80331D0(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
OpponentBufferExecCompleted();
}
@ -1409,7 +1409,7 @@ void OpponentHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_80331D0;
}

View File

@ -36,7 +36,7 @@ struct MovePpInfo
#define SUB_803037C_TILE_DATA_OFFSET 444
#endif
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern void (*gBattlerControllerFuncs[])(void);
@ -141,7 +141,7 @@ extern u8 gAbsentBattlerFlags;
extern u8 gUnknown_03004344;
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[];
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern const u8 BattleText_SwitchWhich[];
extern u8 gUnknown_03004348;
extern struct BattlePokemon gBattleMons[];
@ -739,9 +739,9 @@ void sub_802C68C(void)
else
gUnknown_03004344 = gMoveSelectionCursor[gActiveBattler] + 1;
sub_802E3B4(gUnknown_03004344, 27);
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gUnknown_03004210, BattleText_SwitchWhich, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_SwitchWhich, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
gBattlerControllerFuncs[gActiveBattler] = sub_802CA60;
}
}
@ -751,34 +751,34 @@ void sub_802C68C(void)
const u8 *moveName;
s32 i;
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 16, 0x3A);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 1, 0x37, 16, 0x3A);
moveName = gMoveNames[GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1)];
Text_InitWindowAndPrintText(&gUnknown_03004210, moveName, 0x100, 2, 0x37);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, moveName, 0x100, 2, 0x37);
ConvertIntToDecimalStringN(
gDisplayedStringBattle,
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1),
2, 3);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 0x110, 10, 0x37);
Text_InitWindowAndPrintText(&gUnknown_03004210, gString_TurnJP, 0x116, 1, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x110, 10, 0x37);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gString_TurnJP, 0x116, 1, 0x39);
ConvertIntToDecimalStringN(gDisplayedStringBattle, gAnimMoveTurn, 2, 3);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 0x11C, 4, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x11C, 4, 0x39);
for (i = 0; i < 64; i++)
{
if (gSprites[i].inUse)
count++;
}
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 0x122, 8, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x122, 8, 0x39);
count = GetTaskCount();
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 0x126, 11, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x126, 11, 0x39);
for (i = 0, count = 0; i < 32; i++)
{
if (gOamMatrixAllocBitmap & (1 << i))
count++;
}
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 0x12A, 14, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x12A, 14, 0x39);
gBattlerControllerFuncs[gActiveBattler] = debug_sub_8030C24;
}
#endif
@ -885,9 +885,9 @@ void sub_802CA60(void)
gBattlerControllerFuncs[gActiveBattler] = sub_802C68C;
gMoveSelectionCursor[gActiveBattler] = gUnknown_03004344;
sub_802E3B4(gMoveSelectionCursor[gActiveBattler], 0);
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_PP, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
sub_802E220();
sub_802E2D4();
}
@ -898,9 +898,9 @@ void sub_802CA60(void)
sub_802E3B4(gMoveSelectionCursor[gActiveBattler], 0);
sub_802E12C(gMoveSelectionCursor[gActiveBattler], BattleText_Format);
gBattlerControllerFuncs[gActiveBattler] = sub_802C68C;
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_PP, 0x290, 0x17, 0x37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
sub_802E220();
sub_802E2D4();
}
@ -1045,10 +1045,10 @@ void debug_sub_8030C24(void)
move = 1;
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1, &move);
gBattleMons[gActiveBattler].moves[0] = move;
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 16, 0x38);
Text_InitWindowAndPrintText(&gUnknown_03004210, gMoveNames[move], 0x100, 2, 0x37);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 1, 0x37, 16, 0x38);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gMoveNames[move], 0x100, 2, 0x37);
ConvertIntToDecimalStringN(gDisplayedStringBattle, move, 2, 3);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 272, 10, 0x37);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 272, 10, 0x37);
}
break;
case L_BUTTON:
@ -1070,10 +1070,10 @@ void debug_sub_8030C24(void)
move = 354;
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1, &move);
gBattleMons[gActiveBattler].moves[0] = move;
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 16, 0x38);
Text_InitWindowAndPrintText(&gUnknown_03004210, gMoveNames[move], 0x100, 2, 0x37);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 1, 0x37, 16, 0x38);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gMoveNames[move], 0x100, 2, 0x37);
ConvertIntToDecimalStringN(gDisplayedStringBattle, move, 2, 3);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 272, 10, 0x37);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 272, 10, 0x37);
}
break;
case DPAD_UP:
@ -1083,7 +1083,7 @@ void debug_sub_8030C24(void)
else
gAnimMoveTurn++;
ConvertIntToDecimalStringN(gDisplayedStringBattle, gAnimMoveTurn, 2, 3);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 284, 4, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 284, 4, 0x39);
break;
}
@ -1098,12 +1098,12 @@ void debug_sub_8030C24(void)
move = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + i);
StringAppend(gDisplayedStringBattle, gMoveNames[move]);
Text_InitWindow(
&gUnknown_03004210,
&gWindowTemplate_Contest_MoveDescription,
gDisplayedStringBattle,
0x100 + i * 16,
(i & 1) ? 10 : 2,
(i < 2) ? 0x37 : 0x39);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
gBattlerControllerFuncs[gActiveBattler] = sub_802C68C;
}
@ -1128,11 +1128,11 @@ void debug_sub_803107C(void)
count++;
}
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 290, 8, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 290, 8, 0x39);
count = GetTaskCount();
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 294, 11, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 294, 11, 0x39);
for (i = 0, count = 0; i < 32; i++)
{
@ -1140,7 +1140,7 @@ void debug_sub_803107C(void)
count++;
}
ConvertIntToDecimalStringN(gDisplayedStringBattle, count, 2, 2);
Text_InitWindowAndPrintText(&gUnknown_03004210, gDisplayedStringBattle, 298, 14, 0x39);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 298, 14, 0x39);
gBattlerControllerFuncs[gActiveBattler] = debug_sub_8030C24;
}
@ -1317,7 +1317,7 @@ void bx_t1_healthbar_update(void)
void sub_802D90C(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
PlayerBufferExecCompleted();
}
@ -1507,7 +1507,7 @@ void sub_802DEAC(void)
// Duplicate of sub_802D90C
void sub_802DF18(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
PlayerBufferExecCompleted();
}
@ -1589,12 +1589,12 @@ void sub_802E12C(s32 a, const u8 *b)
StringCopy(gDisplayedStringBattle, b);
StringAppend(gDisplayedStringBattle, gMoveNames[r4->moves[a]]);
Text_InitWindow(
&gUnknown_03004210,
&gWindowTemplate_Contest_MoveDescription,
gDisplayedStringBattle,
0x300 + a * 20,
(a & 1) ? 11 : 1,
(a < 2) ? 0x37 : 0x39);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
void sub_802E1B0(void)
@ -1603,7 +1603,7 @@ void sub_802E1B0(void)
s32 i;
gUnknown_03004348 = 0;
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 0x14, 0x3A);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 1, 0x37, 0x14, 0x3A);
for (i = 0; i < 4; i++)
{
nullsub_7(i);
@ -1632,8 +1632,8 @@ void sub_802E220(void)
str = ConvertIntToDecimalStringN(str, r4->pp[gMoveSelectionCursor[gActiveBattler]], 1, 2);
*str++ = CHAR_SLASH;
ConvertIntToDecimalStringN(str, r4->unkC[gMoveSelectionCursor[gActiveBattler]], 1, 2);
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2A2, 0x19, 0x37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x2A2, 0x19, 0x37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
}
@ -1644,8 +1644,8 @@ void sub_802E2D4(void)
{
if (gBattleBufferA[gActiveBattler][2] == 1)
{
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gUnknown_03004210, BattleText_ForgetMove, 0x290, 0x13, 0x37);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_ForgetMove, 0x290, 0x13, 0x37);
}
else
{
@ -1654,10 +1654,10 @@ void sub_802E2D4(void)
str = StringCopy(str, BattleText_Format);
StringCopy(str, gTypeNames[gBattleMoves[r4->moves[gMoveSelectionCursor[gActiveBattler]]].type]);
Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x39, 0x1C, 0x3A);
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2C0, 0x17, 0x39);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 0x1016, 0x17, 0x39, 0x1C, 0x3A);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x2C0, 0x17, 0x39);
}
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
const u8 gUnknown_081FAE89[][2] =
@ -1728,7 +1728,7 @@ void b_link_standby_message(void)
{
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
Text_InitWindow8002EB0(&gUnknown_03004210, BattleText_LinkStandby, 0x90, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, BattleText_LinkStandby, 0x90, 2, 15);
}
}
@ -2594,7 +2594,7 @@ void PlayerHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x90, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_802DF18;
}
@ -2612,13 +2612,13 @@ void PlayerHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
Text_FillWindowRect(&gUnknown_03004210, 10, 2, 15, 27, 18);
Text_FillWindowRect(&gUnknown_03004210, 10, 2, 35, 16, 38);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 10, 2, 15, 27, 18);
Text_FillWindowRect(&gWindowTemplate_Contest_MoveDescription, 10, 2, 35, 16, 38);
gBattlerControllerFuncs[gActiveBattler] = sub_802C098;
Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_MenuOptions, 400, 18, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
MenuCursor_Create814A5C0(0, 0xFFFF, 12, 11679, 0);
for (r4 = 0; r4 < 4; r4++)
@ -2627,8 +2627,8 @@ void PlayerHandlecmd18(void)
sub_802E3E4(gActionSelectionCursor[gActiveBattler], 0);
BattleStringExpandPlaceholdersToDisplayedString(BattleText_OtherMenu);
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
void PlayerHandlecmd19()
@ -2651,8 +2651,8 @@ void sub_80304A8(void)
sub_802E3B4(gMoveSelectionCursor[gActiveBattler], 0);
if (gBattleBufferA[gActiveBattler][2] != 1)
{
Text_InitWindow(&gUnknown_03004210, BattleText_PP, 656, 23, 55);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_PP, 656, 23, 55);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
sub_802E220();
sub_802E2D4();

View File

@ -15,7 +15,7 @@
#include "util.h"
#include "ewram.h"
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gDisplayedStringBattle[];
extern u8 gActionSelectionCursor[];
@ -290,7 +290,7 @@ void sub_812B65C(void)
void sub_812B694(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
SafariBufferExecCompleted();
}
@ -461,7 +461,7 @@ void SafariHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_812B694;
}
@ -479,13 +479,13 @@ void SafariHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
gUnknown_03004210.paletteNum = 0;
Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
gWindowTemplate_Contest_MoveDescription.paletteNum = 0;
Text_FillWindowRectDefPalette(&gWindowTemplate_Contest_MoveDescription, 10, 2, 15, 27, 18);
Text_FillWindowRectDefPalette(&gWindowTemplate_Contest_MoveDescription, 10, 2, 35, 16, 36);
gBattlerControllerFuncs[gActiveBattler] = bx_battle_menu_t6_2;
Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptionsSafari, 400, 18, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_MenuOptionsSafari, 400, 18, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
MenuCursor_Create814A5C0(0, 0xFFFF, 12, 11679, 0);
for (i = 0; i < 4; i++)
@ -494,8 +494,8 @@ void SafariHandlecmd18(void)
sub_802E3E4(gActionSelectionCursor[gActiveBattler], 0);
BattleStringExpandPlaceholdersToDisplayedString(BattleText_PlayerMenu);
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
void SafariHandlecmd19(void)

View File

@ -53,7 +53,7 @@ extern u16 gIntroSlideFlags;
extern u8 gUnknown_02024E68[];
extern struct SpriteTemplate gUnknown_02024E8C;
extern u8 gAnimMoveTurn;
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gUnknown_0300434C[];
extern const u8 BattleText_WallyMenu[];
extern const u8 BattleText_MenuOptions[];
@ -324,7 +324,7 @@ void sub_813741C(void)
void sub_8137454(void)
{
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
WallyBufferExecCompleted();
}
@ -1239,7 +1239,7 @@ void WallyHandlePrintString(void)
if (*ptr == 2)
DestroyMenuCursor();
BufferStringBattle(*ptr);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 0x90, 2, 15);
gBattlerControllerFuncs[gActiveBattler] = sub_8137454;
}
@ -1257,23 +1257,23 @@ void WallyHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
gUnknown_03004210.paletteNum = 0;
Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
gWindowTemplate_Contest_MoveDescription.paletteNum = 0;
Text_FillWindowRectDefPalette(&gWindowTemplate_Contest_MoveDescription, 10, 2, 15, 27, 18);
Text_FillWindowRectDefPalette(&gWindowTemplate_Contest_MoveDescription, 10, 2, 35, 16, 36);
gBattlerControllerFuncs[gActiveBattler] = sub_81372BC;
Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_MenuOptions, 400, 18, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
MenuCursor_Create814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
for (i = 0; i < 4; i++)
nullsub_8(i);
sub_802E3E4(0, 0);
BattleStringExpandPlaceholdersToDisplayedString(BattleText_WallyMenu);
#ifdef ENGLISH
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 440, 2, 35);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 440, 2, 35);
#else
Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 444, 2, 35);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 444, 2, 35);
#endif
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
void WallyHandlecmd19(void)

View File

@ -32,7 +32,7 @@ extern u8 gBattlerSpriteIds[];
extern u16 gIntroSlideFlags;
extern u8 gDoingBattleAnim;
extern u32 gTransformedPersonalities[];
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern void (*gBattlerControllerFuncs[])(void);
extern u8 gHealthboxSpriteIds[];
extern u8 gUnknown_0300434C[];

View File

@ -1538,7 +1538,7 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
sp14 = 0;
for (i = 0; i < 6; i++) //_080448A0
{
if (b[i].unk0 != 0xFFFF)
if (b[i].totalPoints != 0xFFFF)
sp14++;
}
@ -1599,19 +1599,19 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
{
if (gBattleTypeFlags & BATTLE_TYPE_MULTI) // && b[i] != 0xFFFF && b[i]
{
if (b[i].unk0 == 0xFFFF)
if (b[i].totalPoints == 0xFFFF)
{
//_08044AE6
gSprites[sp[i]].oam.tileNum += 1;
gSprites[sp[i]].data[7] = 1;
// to _08044B52
}
else if (b[i].unk0 == 0)
else if (b[i].totalPoints == 0)
{
gSprites[sp[i]].oam.tileNum += 3;
// to _08044B46
}
else if (b[i].unk4 != 0)
else if (b[i].round1Points != 0)
{
gSprites[sp[i]].oam.tileNum += 2;
}
@ -1626,13 +1626,13 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
gSprites[sp[i]].data[7] = 1;
// to _08044B52
}
else if (b[i].unk0 == 0)
else if (b[i].totalPoints == 0)
{
//_08044B14
gSprites[sp[i]].oam.tileNum += 3;
// to _08044B46
}
else if (b[i].unk4 != 0)
else if (b[i].round1Points != 0)
{
gSprites[sp[i]].oam.tileNum += 2;
}
@ -1647,16 +1647,16 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
{
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
if (b[i].unk0 == 0xFFFF)
if (b[i].totalPoints == 0xFFFF)
{
gSprites[sp[5 - i]].oam.tileNum += 1;
gSprites[sp[5 - i]].data[7] = 1;
}
else if (b[i].unk0 == 0)
else if (b[i].totalPoints == 0)
{
gSprites[sp[5 - i]].oam.tileNum += 3;
}
else if (b[i].unk4 != 0)
else if (b[i].round1Points != 0)
{
gSprites[sp[5 - i]].oam.tileNum += 2;
}
@ -1668,11 +1668,11 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
gSprites[sp[5 - i]].oam.tileNum += 1;
gSprites[sp[5 - i]].data[7] = 1;
}
else if (b[i].unk0 == 0)
else if (b[i].totalPoints == 0)
{
gSprites[sp[5 - i]].oam.tileNum += 3;
}
else if (b[i].unk4 != 0)
else if (b[i].round1Points != 0)
{
gSprites[sp[5 - i]].oam.tileNum += 2;
}

View File

@ -204,7 +204,7 @@ s8 gBattleTerrain;
void (*gBattleMainFunc)(void);
u32 gUnknown_03004284;
struct Window gUnknown_03004210;
struct Window gWindowTemplate_Contest_MoveDescription;
struct Window gUnknown_030041D0;
struct Window gUnknown_03004250;
@ -250,7 +250,7 @@ void CB2_InitBattleInternal(void)
gScanlineEffectRegBuffers[0][i] = 0xFF10;
gScanlineEffectRegBuffers[1][i] = 0xFF10;
}
//ScanlineEffect_SetParams(gUnknown_081F9674.unk0, gUnknown_081F9674.unk4, gUnknown_081F9674.unk8);
//ScanlineEffect_SetParams(gUnknown_081F9674.totalPoints, gUnknown_081F9674.round1Points, gUnknown_081F9674.random);
ScanlineEffect_SetParams(gUnknown_081F9674);
Text_LoadWindowTemplate(&gWindowTemplate_81E6C58);
ResetPaletteFade();
@ -270,7 +270,7 @@ void CB2_InitBattleInternal(void)
gBattleTerrain = BattleSetup_GetTerrain();
#endif
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gUnknown_030041D0, &gWindowTemplate_81E71D0);
Text_InitWindowWithTemplate(&gUnknown_03004250, &gWindowTemplate_81E71EC);
sub_800D6D4();
@ -987,7 +987,7 @@ void BattleMainCB2(void)
}
#endif
Text_UpdateWindowInBattle(&gUnknown_03004210);
Text_UpdateWindowInBattle(&gWindowTemplate_Contest_MoveDescription);
UpdatePaletteFade();
RunTasks();
}
@ -1309,7 +1309,7 @@ void c2_8011A1C(void)
gBattle_BG3_X = 0;
gBattle_BG3_Y = 0;
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gUnknown_030041D0, &gWindowTemplate_81E71D0);
Text_InitWindowWithTemplate(&gUnknown_03004250, &gWindowTemplate_81E71EC);
sub_800D6D4();
@ -2617,7 +2617,7 @@ void debug_sub_8012688(void)
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4;
gCurrentMove = 1;
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
DecompressPicFromTable_2(
&gMonFrontPicTable[gCurrentMove],
gMonFrontPicCoords[gCurrentMove].coords,
@ -2644,7 +2644,7 @@ void debug_sub_8012878(void)
{
AnimateSprites();
BuildOamBuffer();
Text_UpdateWindowInBattle(&gUnknown_03004210);
Text_UpdateWindowInBattle(&gWindowTemplate_Contest_MoveDescription);
UpdatePaletteFade();
RunTasks();
if (gMain.heldKeys == (SELECT_BUTTON | R_BUTTON))
@ -2654,25 +2654,25 @@ void debug_sub_8012878(void)
void debug_sub_80128B4(void)
{
debug_sub_8010A7C(0, 9);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
ConvertIntToDecimalStringN(gBattleTextBuff1, gCurrentMove, 2, 3);
gBattleTextBuff1[3] = CHAR_SPACE;
gBattleTextBuff1[4] = EOS;
StringAppend(gBattleTextBuff1, gSpeciesNames[gCurrentMove]);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
}
void debug_sub_8012938(u8 taskId)
{
debug_sub_8010A7C(0, 7);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
StringCopy(gBattleTextBuff1, Str_821F7B8);
ConvertIntToDecimalStringN(gBattleTextBuff1 + 4, gUnknown_Debug_2023B62[gCurrentMove - 1], 2, 3);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
gSprites[gTasks[taskId].data[1]].pos2.y = -gUnknown_Debug_2023B62[gCurrentMove - 1];
}
@ -2732,8 +2732,8 @@ void debug_sub_8012B70(u8 taskId, u8 b)
{
sub_802BBD4(24, 28, 29, 33, 0);
gTasks[taskId].data[0] = 2;
Text_InitWindow(&gUnknown_03004210, Str_821F7DA, 656, 26, 29);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, Str_821F7DA, 656, 26, 29);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
gTasks[taskId].data[3] = 0;
debug_sub_8012B2C(0);
}
@ -2742,25 +2742,25 @@ void debug_sub_8012B70(u8 taskId, u8 b)
void debug_sub_8012C08(u8 taskId, u8 b)
{
debug_sub_8010A7C(0, 9);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 144, 2, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
debug_sub_8010A7C(0, 7);
Text_InitWindow(&gUnknown_03004210, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gBattleTextBuff1, 162, 2, 37);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
sub_802BBD4(24, 28, 29, 33, 0);
if (b != 0)
{
gTasks[taskId].data[0] = 4;
Text_InitWindow(&gUnknown_03004210, gUnknown_Debug_821F7F3, 144, 2, 35);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, gUnknown_Debug_821F7F3, 144, 2, 35);
}
else
{
gTasks[taskId].data[0] = 3;
Text_InitWindow(&gUnknown_03004210, Str_821F7EA, 144, 2, 35);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, Str_821F7EA, 144, 2, 35);
}
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gUnknown_03004210, BattleText_YesNo, 656, 26, 29);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_YesNo, 656, 26, 29);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
gTasks[taskId].data[3] = 1;
debug_sub_8012B2C(1);
}
@ -2772,8 +2772,8 @@ void debug_sub_8012D10(u8 taskId)
case 0:
debug_sub_80128B4();
debug_sub_8012938(taskId);
Text_InitWindow(&gUnknown_03004210, Str_821F7BD, 400, 19, 35);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, Str_821F7BD, 400, 19, 35);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
gTasks[taskId].data[0]++;
sub_802E3E4(gTasks[taskId].data[2], 0);
break;

View File

@ -29,7 +29,7 @@ const struct DebugStruct1 gUnknown_Debug_4245CC[] =
{ 7, DTR("ナンバー7", "NUMBER7") },
};
const struct {u8 unk0; u8 unk1;} gUnknown_Debug_8424620[] =
const struct {u8 totalPoints; u8 unk1;} gUnknown_Debug_8424620[] =
{
{ 1, 1 },
{ 2, 1 },
@ -231,7 +231,7 @@ void debug_sub_81257E0(void)
InitLinkBattleRecords();
for (i = 0; i < 3; i++)
{
u32 id = gUnknown_Debug_8424620[i].unk0 - 1;
u32 id = gUnknown_Debug_8424620[i].totalPoints - 1;
UpdateLinkBattleRecords_(
gSaveBlock1.linkBattleRecords,

View File

@ -91,7 +91,7 @@ extern u8 gBattleTextBuff2[];
extern u8 gBattleTextBuff3[];
extern u8 gLeveledUpInBattle;
extern void (*gBattleMainFunc)(void);
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern const u8 BattleText_YesNo[];
extern u8 gPlayerPartyCount;
extern u16 gMoveToLearn; //move to learn
@ -8294,8 +8294,8 @@ void atk59_handlelearnnewmove(void)
void sub_8023A80(void)
{
sub_802BBD4(0x18, 8, 0x1D, 0xD, 0);
Text_InitWindow(&gUnknown_03004210, BattleText_YesNo, 0x100, 0x19, 0x9);
Text_PrintWindow8002F44(&gUnknown_03004210);
Text_InitWindow(&gWindowTemplate_Contest_MoveDescription, BattleText_YesNo, 0x100, 0x19, 0x9);
Text_PrintWindow8002F44(&gWindowTemplate_Contest_MoveDescription);
MenuCursor_Create814A5C0(0, 0xFFFF, 0xC, 0x2D9F, 0x20);
}
@ -9304,7 +9304,7 @@ _08024AB8:\n\
bgt _08024AC4\n\
b _0802495A\n\
_08024AC4:\n\
ldr r4, _08024AE4 @ =gUnknown_03004210\n\
ldr r4, _08024AE4 @ =gWindowTemplate_Contest_MoveDescription\n\
ldr r1, _08024AE8 @ =gStringVar4\n\
adds r2, 0xFF\n\
movs r0, 0x1\n\
@ -9319,7 +9319,7 @@ _08024AC4:\n\
adds r1, r2\n\
b _08024BEA\n\
.align 2, 0\n\
_08024AE4: .4byte gUnknown_03004210\n\
_08024AE4: .4byte gWindowTemplate_Contest_MoveDescription\n\
_08024AE8: .4byte gStringVar4\n\
_08024AEC: .4byte gSharedMem\n\
_08024AF0: .4byte 0x0001609c\n\
@ -9424,7 +9424,7 @@ _08024BC0:\n\
mov r2, r8\n\
cmp r2, 0x5\n\
ble _08024B1C\n\
ldr r4, _08024BF4 @ =gUnknown_03004210\n\
ldr r4, _08024BF4 @ =gWindowTemplate_Contest_MoveDescription\n\
ldr r1, _08024BF8 @ =gStringVar4\n\
movs r2, 0x80\n\
lsls r2, 1\n\
@ -9444,7 +9444,7 @@ _08024BEA:\n\
strb r0, [r1]\n\
b _08024C38\n\
.align 2, 0\n\
_08024BF4: .4byte gUnknown_03004210\n\
_08024BF4: .4byte gWindowTemplate_Contest_MoveDescription\n\
_08024BF8: .4byte gStringVar4\n\
_08024BFC: .4byte gSharedMem\n\
_08024C00: .4byte 0x0001609c\n\

File diff suppressed because it is too large Load Diff

View File

@ -501,7 +501,7 @@ static void ContestEffect_BadlyStartlesMonsInGoodCondition(void)
// The appeal works great if performed first.
static void ContestEffect_BetterIfFirst(void)
{
if (gUnknown_02038696[shared192D0.contestant] == 0)
if (gContestantTurnOrder[shared192D0.contestant] == 0)
{
u16 move = sContestantStatus[shared192D0.contestant].currMove;
sContestantStatus[shared192D0.contestant].appeal2 += 2 * gContestEffects[gContestMoves[move].effect].appeal;
@ -512,7 +512,7 @@ static void ContestEffect_BetterIfFirst(void)
// The appeal works great if performed last.
static void ContestEffect_BetterIfLast(void)
{
if (gUnknown_02038696[shared192D0.contestant] == 3)
if (gContestantTurnOrder[shared192D0.contestant] == 3)
{
u16 move = sContestantStatus[shared192D0.contestant].currMove;
sContestantStatus[shared192D0.contestant].appeal2 += 2 * gContestEffects[gContestMoves[move].effect].appeal;

View File

@ -480,28 +480,29 @@ void sub_80C8AD0(u8 taskId)
case 3:
if (IsLinkTaskFinished())
{
SendBlockToAllOpponents(gUnknown_02038680, sizeof gUnknown_02038680);
SendBlockToAllOpponents(
gContestMonAppealPointTotals, sizeof gContestMonAppealPointTotals);
gTasks[taskId].data[0]++;
}
break;
case 4:
if (HaveAllPlayersReceivedBlock())
{
memcpy(gUnknown_02038680, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gUnknown_02038680);
memcpy(gContestMonAppealPointTotals, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gContestMonAppealPointTotals);
gTasks[taskId].data[0]++;
}
break;
case 6:
if (IsLinkTaskFinished())
{
SendBlockToAllOpponents(gUnknown_02038688, sizeof gUnknown_02038688);
SendBlockToAllOpponents(gContestMonRound2Points, sizeof gContestMonRound2Points);
gTasks[taskId].data[0]++;
}
break;
case 7:
if (HaveAllPlayersReceivedBlock())
{
memcpy(gUnknown_02038688, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gUnknown_02038688);
memcpy(gContestMonRound2Points, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gContestMonRound2Points);
gTasks[taskId].data[0]++;
}
break;
@ -585,14 +586,14 @@ void sub_80C8C80(u8 taskId)
case 9:
if (IsLinkTaskFinished())
{
SendBlockToAllOpponents(gUnknown_02038696, sizeof gUnknown_02038696);
SendBlockToAllOpponents(gContestantTurnOrder, sizeof gContestantTurnOrder);
gTasks[taskId].data[0]++;
}
break;
case 10:
if (HaveAllPlayersReceivedBlock())
{
memcpy(gUnknown_02038696, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gUnknown_02038696);
memcpy(gContestantTurnOrder, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gContestantTurnOrder);
gTasks[taskId].data[0]++;
}
break;
@ -706,14 +707,14 @@ void Task_LinkContest_CommunicateTurnOrder(u8 taskId)
case 0:
if (IsLinkTaskFinished())
{
SendBlockToAllOpponents(gUnknown_02038696, sizeof gUnknown_02038696);
SendBlockToAllOpponents(gContestantTurnOrder, sizeof gContestantTurnOrder);
gTasks[taskId].data[0]++;
}
break;
case 1:
if (HaveAllPlayersReceivedBlock())
{
memcpy(gUnknown_02038696, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gUnknown_02038696);
memcpy(gContestantTurnOrder, gBlockRecvBuffer[gContestLinkLeaderIndex], sizeof gContestantTurnOrder);
gTasks[taskId].data[0]++;
}
break;

View File

@ -728,7 +728,7 @@ static void sub_80C2E14(u8 taskId)
Contest_SaveWinner(gSpecialVar_ContestRank);
Contest_SaveWinner(0xFE);
eCurContestWinnerIsForArtist = TRUE;
eCurContestWinnerSaveIdx = sub_80B2C4C(0xfe, 0);
eCurContestWinnerSaveIdx = GetContestWinnerSaveIdx(0xfe, 0);
BeginHardwarePaletteFade(0xff, 0, 0, 16, 0);
gTasks[taskId].func = sub_80C2EA0;
}
@ -1810,7 +1810,7 @@ s8 sub_80C39E4(u8 arg0, u8 arg1)
s16 val;
s8 ret;
val = gUnknown_02038688[arg0];
val = gContestMonRound2Points[arg0];
if (val < 0)
r4 = -val << 16;
else
@ -1826,7 +1826,7 @@ s8 sub_80C39E4(u8 arg0, u8 arg1)
if (arg1 != 0 && r2 > 10)
r2 = 10;
if (gUnknown_02038688[arg0] < 0)
if (gContestMonRound2Points[arg0] < 0)
ret = -r2;
else
ret = r2;
@ -2122,12 +2122,12 @@ void sub_80C3F00(void)
r4 += 10;
eContestLink80C2020Struct2018018[i].unk_00 = r4 / 10;
r4 = 1000 * ABS(gUnknown_02038688[i]) / ABS(r2);
r4 = 1000 * ABS(gContestMonRound2Points[i]) / ABS(r2);
if ((r4 % 10) >= 5)
r4 += 10;
eContestLink80C2020Struct2018018[i].unk_04 = r4 / 10;
if (gUnknown_02038688[i] < 0)
if (gContestMonRound2Points[i] < 0)
eContestLink80C2020Struct2018018[i].unk_10 = 1;
r5 = 22528 * eContestLink80C2020Struct2018018[i].unk_00 / 100;
@ -2568,7 +2568,7 @@ void ScrSpecial_CheckSelectedMonAndInitContest(void)
if (result != 0)
{
Contest_InitAllPokemon(gSpecialVar_ContestCategory, gSpecialVar_ContestRank);
InitContestMonConditions(gSpecialVar_ContestCategory);
CalculateRound1Points(gSpecialVar_ContestCategory);
}
gSpecialVar_Result = result;
}
@ -2853,7 +2853,7 @@ void Task_LinkContest_SetUpContest(u8 taskId)
sp4[i] = gTasks[taskId].data[i + 5];
gContestLinkLeaderIndex = LinkContest_GetLeaderIndex(sp4);
InitContestMonConditions(gSpecialVar_ContestCategory);
CalculateRound1Points(gSpecialVar_ContestCategory);
SetTaskFuncWithFollowupFunc(
taskId, Task_LinkContest_CommunicateRound1Points, Task_LinkContest_CalculateTurnOrder);
}

View File

@ -223,13 +223,15 @@ void ShowContestWinnerCleanup(void)
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
// File boundary?
void ShowContestWinner(void)
{
if(gUnknown_0203856C)
{
sub_80AAF30();
eCurContestWinnerIsForArtist = TRUE;
eCurContestWinnerSaveIdx = sub_80B2C4C(254, 0);
eCurContestWinnerSaveIdx = GetContestWinnerSaveIdx(CONTEST_SAVE_FOR_ARTIST, 0);
Contest_SaveWinner(3);
gUnknown_0203856C = 0;
}

View File

@ -4,7 +4,7 @@
#include "text.h"
#include "palette.h"
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
static void CB2_CrashIdle(void);
@ -37,9 +37,9 @@ void Crash(u8 *text)
SetMainCallback2(CB2_CrashIdle);
DmaFill32Large(3, 0, (void *)VRAM, 0x18000, 0x1000);
Text_LoadWindowTemplate(&gWindowTemplate_81E6FD8);
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6FD8);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6FD8);
LoadFontDefaultPalette(&gWindowTemplate_81E6FD8);
Text_InitWindowAndPrintText(&gUnknown_03004210, text, 1, 9, 7);
Text_InitWindowAndPrintText(&gWindowTemplate_Contest_MoveDescription, text, 1, 9, 7);
}
static void CB2_CrashIdle(void)

View File

@ -109,7 +109,7 @@ static void sub_80A9BE4(u8 taskId)
DestroyTask(taskId);
if (!(gIsLinkContest & 1))
sub_80AF668();
CalculateFinalScores();
sub_80C2358();
}
@ -182,7 +182,7 @@ static void sub_80A9D58(u8 taskId)
dest[i] = gTasks[taskId].data[5 + i];
gContestLinkLeaderIndex = LinkContest_GetLeaderIndex(dest);
InitContestMonConditions((u8)gSpecialVar_ContestCategory);
CalculateRound1Points((u8)gSpecialVar_ContestCategory);
SortContestants(0);
SetTaskFuncWithFollowupFunc(taskId, Task_LinkContest_CommunicateRound1Points, sub_80A9DBC);
}
@ -607,7 +607,7 @@ void sub_80AA5E8(u8 var)
static void sub_80AA614(u8 var1, u8 var2)
{
u16 var = InitContestMonConditionI(var1, var2);
u16 var = CalculateContestantRound1Points(var1, var2);
ConvertIntToDecimalStringN(gSharedMem, var, STR_CONV_MODE_RIGHT_ALIGN, 3);
Text_InitWindowAndPrintText(&gMenuWindow, gSharedMem, 0xE2, 3, 0xC);
@ -859,7 +859,7 @@ void sub_80AACC4(void)
{
SetDebugMonForContest();
if (!(gIsLinkContest & 1))
InitContestMonConditions(eMatsudaDebugVar);
CalculateRound1Points(eMatsudaDebugVar);
SetMainCallback2(CB2_StartContest);
}
}
@ -882,7 +882,7 @@ void sub_80AAD44(struct Sprite *sprite, s8 var2)
SetDebugMonForContest();
for (i = 0; i < 4; i++)
gContestMonRound1Points[i] = InitContestMonConditionI(i, gSpecialVar_ContestCategory);
gContestMonRound1Points[i] = CalculateContestantRound1Points(i, gSpecialVar_ContestCategory);
SetMainCallback2(c2_exit_to_overworld_1_sub_8080DEC);
}
}
@ -951,15 +951,15 @@ void sub_80AAF30(void)
for (i = 0; i < 3; i++)
{
gContestMonRound1Points[i] = 0;
gUnknown_02038680[i] = 0;
gContestMonAppealPointTotals[i] = 0;
gContestMonTotalPoints[i] = 0;
gContestMons[i] = gContestMons[3];
}
gContestMonRound1Points[3] = 0x12C;
gUnknown_02038680[3] = 0x190;
gContestMonAppealPointTotals[3] = 0x190;
gContestMonTotalPoints[3] = 0x190;
Contest_SaveWinner(0xFE);
Contest_SaveWinner(CONTEST_SAVE_FOR_ARTIST);
}
u8 MatsudaDebugMenu_SetHighScore(void)
@ -977,7 +977,7 @@ u8 MatsudaDebugMenu_ResetHighScore(void)
for (i = 0; i < 4; i++)
{
gContestMonRound1Points[i] = 0;
gUnknown_02038680[i] = 0;
gContestMonAppealPointTotals[i] = 0;
gContestMonTotalPoints[i] = 0;
}
CloseMenu();

View File

@ -2589,9 +2589,9 @@ void DebugMenu_8078E68(u8 a0, u8 * a1, u32 a2)
}
struct GameTimeDebugMenuStruct {
u16 unk0;
u16 totalPoints;
u16 unk2;
u8 unk4;
u8 round1Points;
u8 unk5;
};
@ -2604,7 +2604,7 @@ const struct GameTimeDebugMenuStruct gUnknown_Debug_839C5F4[] = {
void DebugMenu_8078E80(s16 * a0)
{
Menu_BlankWindowRect(2, 15, 22, 16);
sub_8071F60(0xd0, gUnknown_Debug_839C5F4[*a0].unk4, 15);
sub_8071F60(0xd0, gUnknown_Debug_839C5F4[*a0].round1Points, 15);
}
void DebugMenu_8078EB0(s16 * a0)
@ -2669,7 +2669,7 @@ void DebugMenu_8078F68(u8 taskId)
else
{
const struct GameTimeDebugMenuStruct *r2 = gUnknown_Debug_839C5F4 + data[0];
if (DebugMenu_8077DD8(data + r2->unk5, r2->unk0, r2->unk2, gMain.newAndRepeatedKeys) == TRUE)
if (DebugMenu_8077DD8(data + r2->unk5, r2->totalPoints, r2->unk2, gMain.newAndRepeatedKeys) == TRUE)
DebugMenu_8078EB0(data);
}
}

View File

@ -69,7 +69,7 @@ const u8 gUnknown_Debug_083C4EB0[] = _("Interview(BT)");
const struct {
const u8 * text;
u32 unk4;
u32 round1Points;
} gUnknown_Debug_083C4EC0[] = {
{gUnknown_Debug_083C4E54, 0x0},
{gUnknown_Debug_083C4E5C, 0x1},
@ -281,7 +281,7 @@ bool8 debug_sub_809089C(void)
case -2:
return FALSE;
default:
gSpecialVar_0x8004 = gUnknown_Debug_083C4EC0[input].unk4;
gSpecialVar_0x8004 = gUnknown_Debug_083C4EC0[input].round1Points;
switch (gSpecialVar_0x8004)
{
case 5:

View File

@ -33,9 +33,9 @@
#include "field_effect.h"
struct WatanabeDebugMenuItemSubstruct {
u32 unk0;
u32 unk4;
u8 unk8;
u32 totalPoints;
u32 round1Points;
u8 random;
u8 unk9;
};
@ -60,7 +60,7 @@ struct WatanabeEwram17000 {
u8 unk9;
u8 unkA;
u8 unkB;
u8 unkC;
u8 contestant;
};
struct WatanabeEwram18000 {
@ -74,17 +74,17 @@ struct WatanabeEwram18000 {
};
struct WatanabeEwram18000_2 {
u16 unk0;
u16 totalPoints;
u8 unk2;
u8 unk3;
u8 unk4;
u8 round1Points;
u8 unk5;
u8 unk6;
u8 unk7;
u8 unk8;
u8 random;
u8 unk9;
u8 unkA;
struct PlttData unkC;
struct PlttData contestant;
u16 unk10[16];
};
@ -1367,7 +1367,7 @@ void debug_80C4AC4(u8 taskId)
eWatanabe17000.unk9 = 0;
eWatanabe17000.unkA = 0;
eWatanabe17000.unkB = 0;
eWatanabe17000.unkC = 0;
eWatanabe17000.contestant = 0;
gTasks[taskId].func = debug_80C4F48;
}
else if (gMain.newAndRepeatedKeys & DPAD_UP)
@ -2362,11 +2362,11 @@ const u32 gUnknown_Debug_083F8768[] = {
void debug_80C6544(u8 a0)
{
u32 r7 = debug_80C5B60(gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]);
u32 r5 = gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->unk0;
u32 r4 = gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->unk4;
u32 r5 = gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->totalPoints;
u32 r4 = gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->round1Points;
u32 r3 = gUnknown_Debug_083F8768[gUnknown_Debug_2038A1C->unk16a];
if (gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->unk8 == 0)
if (gUnknown_Debug_083F8554[gUnknown_Debug_083F8698[gUnknown_Debug_2038A1C->unk168].text[gUnknown_Debug_2038A1C->unk169]].data.type4->random == 0)
{
switch (a0)
{
@ -2568,13 +2568,13 @@ void InitSeePokemonGraphics(void)
REG_DISPCNT = DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_ON | DISPCNT_WIN0_ON;
CreateTask(debug_80C6B00, 0);
gUnknown_Debug_2038A20 = &eWatanabe18000_2;
gUnknown_Debug_2038A20->unk0 = 0x115;
gUnknown_Debug_2038A20->totalPoints = 0x115;
gUnknown_Debug_2038A20->unk2 = 0;
gUnknown_Debug_2038A20->unk3 = 0;
gUnknown_Debug_2038A20->unk5 = 0;
gUnknown_Debug_2038A20->unk7 = 0;
gUnknown_Debug_2038A20->unkA = 0;
gUnknown_Debug_2038A20->unk8 = 0;
gUnknown_Debug_2038A20->random = 0;
spriteId = CreateSprite(&gSpriteTemplate_83F8874, 0x6C, 0x74, 0);
gSprites[spriteId].data[0] = 0;
StartSpriteAnim(gSprites + spriteId, 0);
@ -2670,31 +2670,31 @@ void debug_80C6B00(u8 taskId)
void debug_80C6CB8(u8 taskId)
{
DecompressPicFromTable_2(gMonFrontPicTable + gUnknown_Debug_2038A20->unk0, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->unk0);
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->unk0);
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->unk0, 1);
DecompressPicFromTable_2(gMonFrontPicTable + gUnknown_Debug_2038A20->totalPoints, gMonFrontPicCoords[gUnknown_Debug_2038A20->totalPoints].coords, gMonFrontPicCoords[gUnknown_Debug_2038A20->totalPoints].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->totalPoints);
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->totalPoints);
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->totalPoints, 1);
gUnknown_Debug_2038A20->unk2 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x28, 0);
gSprites[gUnknown_Debug_2038A20->unk2].callback = debug_69;
gSprites[gUnknown_Debug_2038A20->unk2].oam.priority = 0;
DecompressPicFromTable_2(gMonBackPicTable + gUnknown_Debug_2038A20->unk0, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[2], gUnknown_Debug_2038A20->unk0);
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->unk0);
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->unk0, 2);
DecompressPicFromTable_2(gMonBackPicTable + gUnknown_Debug_2038A20->totalPoints, gMonBackPicCoords[gUnknown_Debug_2038A20->totalPoints].coords, gMonBackPicCoords[gUnknown_Debug_2038A20->totalPoints].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[2], gUnknown_Debug_2038A20->totalPoints);
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->totalPoints);
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->totalPoints, 2);
gUnknown_Debug_2038A20->unk3 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x78, 0);
gSprites[gUnknown_Debug_2038A20->unk3].callback = debug_69;
gSprites[gUnknown_Debug_2038A20->unk3].oam.priority = 0;
gUnknown_Debug_2038A20->unk4 = CreateMonIcon(gUnknown_Debug_2038A20->unk0, sub_809D62C, 0x68, 0x2C, 0, 0);
gUnknown_Debug_2038A20->round1Points = CreateMonIcon(gUnknown_Debug_2038A20->totalPoints, sub_809D62C, 0x68, 0x2C, 0, 0);
sub_8091738(SpeciesToNationalPokedexNum(gUnknown_Debug_2038A20->unk0), 2, 0x3fc);
sub_8091738(SpeciesToNationalPokedexNum(gUnknown_Debug_2038A20->totalPoints), 2, 0x3fc);
((u16 *)(VRAM + 0xF858))[0] = 0xF3FC;
((u16 *)(VRAM + 0xF858))[1] = 0xF3FD;
((u16 *)(VRAM + 0xF858))[32] = 0xF3FE;
((u16 *)(VRAM + 0xF858))[33] = 0xF3FF;
debug_80C3800(gUnknown_Debug_2038A20->unk0, 17, 3);
debug_80C376C(gUnknown_Debug_2038A20->unk0, 26, 5);
debug_80C3800(gUnknown_Debug_2038A20->totalPoints, 17, 3);
debug_80C376C(gUnknown_Debug_2038A20->totalPoints, 26, 5);
gUnknown_Debug_2038A20->unk6 = gSprites[gUnknown_Debug_2038A20->unk2].oam.paletteNum;
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferUnfaded + 0x80, 0x20);
@ -2704,7 +2704,7 @@ void debug_80C6CB8(u8 taskId)
gUnknown_Debug_2038A20->unk9 = 0;
StopCryAndClearCrySongs();
PlayCry1(gUnknown_Debug_2038A20->unk0, 0);
PlayCry1(gUnknown_Debug_2038A20->totalPoints, 0);
}
void debug_80C6EE8(u8 taskId)
@ -2712,10 +2712,10 @@ void debug_80C6EE8(u8 taskId)
u16 hue;
CpuCopy16(gPlttBufferUnfaded + 0x80, gUnknown_Debug_2038A20->unk10, 32);
hue = gPlttBufferUnfaded[gUnknown_Debug_2038A20->unk7 + 0x81];
gUnknown_Debug_2038A20->unkC.r = hue & 0x1f;
gUnknown_Debug_2038A20->unkC.g = (hue & 0x3e0) >> 5;
gUnknown_Debug_2038A20->unkC.b = (hue & 0x7c00) >> 10;
gUnknown_Debug_2038A20->unkC.unused_15 = 0;
gUnknown_Debug_2038A20->contestant.r = hue & 0x1f;
gUnknown_Debug_2038A20->contestant.g = (hue & 0x3e0) >> 5;
gUnknown_Debug_2038A20->contestant.b = (hue & 0x7c00) >> 10;
gUnknown_Debug_2038A20->contestant.unused_15 = 0;
debug_80C68CC(gUnknown_Debug_2038A20->unk7 + 1, 11, 10, 2);
Menu_PrintText(gUnknown_Debug_083F8813, 13, 10);
debug_80C68CC(hue, 14, 10, 4);
@ -2734,12 +2734,12 @@ void debug_80C6FA8(u8 taskId)
}
else if (gMain.newAndRepeatedKeys & R_BUTTON)
{
gUnknown_Debug_2038A20->unk0 = debug_80C3878(0, gUnknown_Debug_2038A20->unk0);
gUnknown_Debug_2038A20->totalPoints = debug_80C3878(0, gUnknown_Debug_2038A20->totalPoints);
gTasks[taskId].func = debug_80C71FC;
}
else if (gMain.newAndRepeatedKeys & L_BUTTON)
{
gUnknown_Debug_2038A20->unk0 = debug_80C3878(1, gUnknown_Debug_2038A20->unk0);
gUnknown_Debug_2038A20->totalPoints = debug_80C3878(1, gUnknown_Debug_2038A20->totalPoints);
gTasks[taskId].func = debug_80C71FC;
}
else if (gMain.newKeys & A_BUTTON)
@ -2767,9 +2767,9 @@ void debug_80C6FA8(u8 taskId)
{
gUnknown_Debug_2038A20->unk9 ^= 1;
if (gUnknown_Debug_2038A20->unk9)
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->unk0, 0, 0), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->totalPoints, 0, 0), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
else
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->unk0, 0, 9), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->totalPoints, 0, 9), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferUnfaded + 0x80, 32);
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferFaded + 0x80, 32);
gTasks[taskId].func = debug_80C6EE8;
@ -2779,11 +2779,11 @@ void debug_80C6FA8(u8 taskId)
if (gMain.newKeys & SELECT_BUTTON)
{
StopCryAndClearCrySongs();
PlayCry1(gUnknown_Debug_2038A20->unk0, 0);
PlayCry1(gUnknown_Debug_2038A20->totalPoints, 0);
}
gUnknown_Debug_2038A20->unk8 += 4;
gUnknown_Debug_2038A20->unk8 &= 0x1f;
((u16 *)PLTT)[0xa1 + gUnknown_Debug_2038A20->unk7] = gUnknown_Debug_083F8790[gUnknown_Debug_2038A20->unk8];
gUnknown_Debug_2038A20->random += 4;
gUnknown_Debug_2038A20->random &= 0x1f;
((u16 *)PLTT)[0xa1 + gUnknown_Debug_2038A20->unk7] = gUnknown_Debug_083F8790[gUnknown_Debug_2038A20->random];
}
}
#else
@ -3092,7 +3092,7 @@ void debug_80C71FC(u8 taskId)
DestroySprite(gSprites + gUnknown_Debug_2038A20->unk2);
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[gUnknown_Debug_2038A20->unk3].oam.paletteNum));
DestroySprite(gSprites + gUnknown_Debug_2038A20->unk3);
sub_809D510(gSprites + gUnknown_Debug_2038A20->unk4);
sub_809D510(gSprites + gUnknown_Debug_2038A20->round1Points);
gTasks[taskId].func = debug_80C6CB8;
}
@ -3129,18 +3129,18 @@ void debug_80C7294(u8 taskId)
switch (gUnknown_Debug_2038A20->unkA)
{
case 0:
if (gUnknown_Debug_2038A20->unkC.r < 31)
gUnknown_Debug_2038A20->unkC.r++;
if (gUnknown_Debug_2038A20->contestant.r < 31)
gUnknown_Debug_2038A20->contestant.r++;
gTasks[taskId].func = debug_80C74E4;
break;
case 1:
if (gUnknown_Debug_2038A20->unkC.g < 31)
gUnknown_Debug_2038A20->unkC.g++;
if (gUnknown_Debug_2038A20->contestant.g < 31)
gUnknown_Debug_2038A20->contestant.g++;
gTasks[taskId].func = debug_80C74E4;
break;
case 2:
if (gUnknown_Debug_2038A20->unkC.b < 31)
gUnknown_Debug_2038A20->unkC.b++;
if (gUnknown_Debug_2038A20->contestant.b < 31)
gUnknown_Debug_2038A20->contestant.b++;
gTasks[taskId].func = debug_80C74E4;
break;
}
@ -3150,18 +3150,18 @@ void debug_80C7294(u8 taskId)
switch (gUnknown_Debug_2038A20->unkA)
{
case 0:
if (gUnknown_Debug_2038A20->unkC.r > 0)
gUnknown_Debug_2038A20->unkC.r--;
if (gUnknown_Debug_2038A20->contestant.r > 0)
gUnknown_Debug_2038A20->contestant.r--;
gTasks[taskId].func = debug_80C74E4;
break;
case 1:
if (gUnknown_Debug_2038A20->unkC.g > 0)
gUnknown_Debug_2038A20->unkC.g--;
if (gUnknown_Debug_2038A20->contestant.g > 0)
gUnknown_Debug_2038A20->contestant.g--;
gTasks[taskId].func = debug_80C74E4;
break;
case 2:
if (gUnknown_Debug_2038A20->unkC.b > 0)
gUnknown_Debug_2038A20->unkC.b--;
if (gUnknown_Debug_2038A20->contestant.b > 0)
gUnknown_Debug_2038A20->contestant.b--;
gTasks[taskId].func = debug_80C74E4;
break;
}
@ -3170,7 +3170,7 @@ void debug_80C7294(u8 taskId)
void debug_80C74E4(u8 taskId)
{
u16 pal = (gUnknown_Debug_2038A20->unkC.r & 0x001f) + ((gUnknown_Debug_2038A20->unkC.g << 5) & 0x03e0) + ((gUnknown_Debug_2038A20->unkC.b << 10) & 0x7c00);
u16 pal = (gUnknown_Debug_2038A20->contestant.r & 0x001f) + ((gUnknown_Debug_2038A20->contestant.g << 5) & 0x03e0) + ((gUnknown_Debug_2038A20->contestant.b << 10) & 0x7c00);
gPlttBufferUnfaded[gUnknown_Debug_2038A20->unk7 + 0x81] = pal;
gPlttBufferFaded[gUnknown_Debug_2038A20->unk7 + 0x81] = pal;
gPlttBufferUnfaded[0x101 + gUnknown_Debug_2038A20->unk6 * 16 + gUnknown_Debug_2038A20->unk7] = pal;
@ -3190,13 +3190,13 @@ void debug_80C7584(struct Sprite *sprite)
{
default:
case 0:
shade = gUnknown_Debug_2038A20->unkC.r;
shade = gUnknown_Debug_2038A20->contestant.r;
break;
case 1:
shade = gUnknown_Debug_2038A20->unkC.g;
shade = gUnknown_Debug_2038A20->contestant.g;
break;
case 2:
shade = gUnknown_Debug_2038A20->unkC.b;
shade = gUnknown_Debug_2038A20->contestant.b;
break;
}
sprite->pos2.x = 4 * shade;
@ -3237,13 +3237,13 @@ void InitSeeTrainers(void)
REG_DISPCNT = 0x3340;
CreateTask(debug_80C777C, 0);
gUnknown_Debug_2038A20 = &eWatanabe18000_2;
gUnknown_Debug_2038A20->unk0 = 0;
gUnknown_Debug_2038A20->totalPoints = 0;
gUnknown_Debug_2038A20->unk2 = 0;
gUnknown_Debug_2038A20->unk3 = 0;
gUnknown_Debug_2038A20->unk5 = 0;
gUnknown_Debug_2038A20->unk7 = 0;
gUnknown_Debug_2038A20->unkA = 0;
gUnknown_Debug_2038A20->unk8 = 0;
gUnknown_Debug_2038A20->random = 0;
spriteId = CreateSprite(&gSpriteTemplate_83F8874, 0x6c, 0x74, 0);
gSprites[spriteId].data[0] = 0;
StartSpriteAnim(gSprites + spriteId, 0);
@ -3297,14 +3297,14 @@ void debug_80C777C(u8 taskId)
void debug_80C7934(u8 taskId)
{
DecompressPicFromTable_2(gTrainerFrontPicTable + gUnknown_Debug_2038A20->unk0, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->unk0);
LoadCompressedObjectPalette(gTrainerFrontPicPaletteTable + gUnknown_Debug_2038A20->unk0);
GetMonSpriteTemplate_803C5A0(gUnknown_Debug_2038A20->unk0, 1);
DecompressPicFromTable_2(gTrainerFrontPicTable + gUnknown_Debug_2038A20->totalPoints, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->totalPoints].coords, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->totalPoints].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->totalPoints);
LoadCompressedObjectPalette(gTrainerFrontPicPaletteTable + gUnknown_Debug_2038A20->totalPoints);
GetMonSpriteTemplate_803C5A0(gUnknown_Debug_2038A20->totalPoints, 1);
gUnknown_Debug_2038A20->unk2 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x28, 0);
gSprites[gUnknown_Debug_2038A20->unk2].callback = debug_69;
gSprites[gUnknown_Debug_2038A20->unk2].oam.priority = 0;
debug_80C376C(gUnknown_Debug_2038A20->unk0, 26, 5);
debug_80C376C(gUnknown_Debug_2038A20->totalPoints, 26, 5);
gUnknown_Debug_2038A20->unk6 = gSprites[gUnknown_Debug_2038A20->unk2].oam.paletteNum;
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferUnfaded + 0x80, 0x20);
@ -3320,10 +3320,10 @@ void debug_80C7A54(u8 taskId)
u16 hue;
CpuCopy16(gPlttBufferUnfaded + 0x80, gUnknown_Debug_2038A20->unk10, 32);
hue = gPlttBufferUnfaded[gUnknown_Debug_2038A20->unk7 + 0x81];
gUnknown_Debug_2038A20->unkC.r = hue & 0x1f;
gUnknown_Debug_2038A20->unkC.g = (hue & 0x3e0) >> 5;
gUnknown_Debug_2038A20->unkC.b = (hue & 0x7c00) >> 10;
gUnknown_Debug_2038A20->unkC.unused_15 = 0;
gUnknown_Debug_2038A20->contestant.r = hue & 0x1f;
gUnknown_Debug_2038A20->contestant.g = (hue & 0x3e0) >> 5;
gUnknown_Debug_2038A20->contestant.b = (hue & 0x7c00) >> 10;
gUnknown_Debug_2038A20->contestant.unused_15 = 0;
debug_80C68CC(gUnknown_Debug_2038A20->unk7 + 1, 11, 10, 2);
Menu_PrintText(gUnknown_Debug_083F8813, 13, 10);
debug_80C68CC(hue, 14, 10, 4);
@ -3342,12 +3342,12 @@ void debug_80C7B14(u8 taskId)
}
else if (gMain.newAndRepeatedKeys & R_BUTTON)
{
gUnknown_Debug_2038A20->unk0 = debug_80C38B4(0, gUnknown_Debug_2038A20->unk0);
gUnknown_Debug_2038A20->totalPoints = debug_80C38B4(0, gUnknown_Debug_2038A20->totalPoints);
gTasks[taskId].func = debug_80C7D44;
}
else if (gMain.newAndRepeatedKeys & L_BUTTON)
{
gUnknown_Debug_2038A20->unk0 = debug_80C38B4(1, gUnknown_Debug_2038A20->unk0);
gUnknown_Debug_2038A20->totalPoints = debug_80C38B4(1, gUnknown_Debug_2038A20->totalPoints);
gTasks[taskId].func = debug_80C7D44;
}
else if (gMain.newKeys & A_BUTTON)
@ -3376,11 +3376,11 @@ void debug_80C7B14(u8 taskId)
gUnknown_Debug_2038A20->unk9 ^= 1;
if (gUnknown_Debug_2038A20->unk9)
{
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->unk0, 0, 0), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->totalPoints, 0, 0), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
}
else
{
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->unk0, 0, 9), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(gUnknown_Debug_2038A20->totalPoints, 0, 9), gUnknown_Debug_2038A20->unk6 * 16 + 0x100, 0x20);
}
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferUnfaded + 0x80, 32);
CpuCopy16(gPlttBufferUnfaded + gUnknown_Debug_2038A20->unk6 * 16 + 0x100, gPlttBufferFaded + 0x80, 32);
@ -3388,9 +3388,9 @@ void debug_80C7B14(u8 taskId)
}
else
{
gUnknown_Debug_2038A20->unk8 += 4;
gUnknown_Debug_2038A20->unk8 &= 0x1f;
((u16 *)PLTT)[0xa1 + gUnknown_Debug_2038A20->unk7] = gUnknown_Debug_083F8790[gUnknown_Debug_2038A20->unk8];
gUnknown_Debug_2038A20->random += 4;
gUnknown_Debug_2038A20->random &= 0x1f;
((u16 *)PLTT)[0xa1 + gUnknown_Debug_2038A20->unk7] = gUnknown_Debug_083F8790[gUnknown_Debug_2038A20->random];
}
}
#else
@ -3683,7 +3683,7 @@ void debug_80C7D44(u8 taskId)
DestroySprite(gSprites + gUnknown_Debug_2038A20->unk2);
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[gUnknown_Debug_2038A20->unk3].oam.paletteNum));
DestroySprite(gSprites + gUnknown_Debug_2038A20->unk3);
sub_809D510(gSprites + gUnknown_Debug_2038A20->unk4);
sub_809D510(gSprites + gUnknown_Debug_2038A20->round1Points);
gTasks[taskId].func = debug_80C7934;
}
@ -3720,18 +3720,18 @@ void debug_80C7DDC(u8 taskId)
switch (gUnknown_Debug_2038A20->unkA)
{
case 0:
if (gUnknown_Debug_2038A20->unkC.r < 31)
gUnknown_Debug_2038A20->unkC.r++;
if (gUnknown_Debug_2038A20->contestant.r < 31)
gUnknown_Debug_2038A20->contestant.r++;
gTasks[taskId].func = debug_80C802C;
break;
case 1:
if (gUnknown_Debug_2038A20->unkC.g < 31)
gUnknown_Debug_2038A20->unkC.g++;
if (gUnknown_Debug_2038A20->contestant.g < 31)
gUnknown_Debug_2038A20->contestant.g++;
gTasks[taskId].func = debug_80C802C;
break;
case 2:
if (gUnknown_Debug_2038A20->unkC.b < 31)
gUnknown_Debug_2038A20->unkC.b++;
if (gUnknown_Debug_2038A20->contestant.b < 31)
gUnknown_Debug_2038A20->contestant.b++;
gTasks[taskId].func = debug_80C802C;
break;
}
@ -3741,18 +3741,18 @@ void debug_80C7DDC(u8 taskId)
switch (gUnknown_Debug_2038A20->unkA)
{
case 0:
if (gUnknown_Debug_2038A20->unkC.r > 0)
gUnknown_Debug_2038A20->unkC.r--;
if (gUnknown_Debug_2038A20->contestant.r > 0)
gUnknown_Debug_2038A20->contestant.r--;
gTasks[taskId].func = debug_80C802C;
break;
case 1:
if (gUnknown_Debug_2038A20->unkC.g > 0)
gUnknown_Debug_2038A20->unkC.g--;
if (gUnknown_Debug_2038A20->contestant.g > 0)
gUnknown_Debug_2038A20->contestant.g--;
gTasks[taskId].func = debug_80C802C;
break;
case 2:
if (gUnknown_Debug_2038A20->unkC.b > 0)
gUnknown_Debug_2038A20->unkC.b--;
if (gUnknown_Debug_2038A20->contestant.b > 0)
gUnknown_Debug_2038A20->contestant.b--;
gTasks[taskId].func = debug_80C802C;
break;
}
@ -3761,7 +3761,7 @@ void debug_80C7DDC(u8 taskId)
void debug_80C802C(u8 taskId)
{
u16 pal = (gUnknown_Debug_2038A20->unkC.r & 0x001f) + ((gUnknown_Debug_2038A20->unkC.g << 5) & 0x03e0) + ((gUnknown_Debug_2038A20->unkC.b << 10) & 0x7c00);
u16 pal = (gUnknown_Debug_2038A20->contestant.r & 0x001f) + ((gUnknown_Debug_2038A20->contestant.g << 5) & 0x03e0) + ((gUnknown_Debug_2038A20->contestant.b << 10) & 0x7c00);
gPlttBufferUnfaded[gUnknown_Debug_2038A20->unk7 + 0x81] = pal;
gPlttBufferFaded[gUnknown_Debug_2038A20->unk7 + 0x81] = pal;
gPlttBufferUnfaded[0x101 + gUnknown_Debug_2038A20->unk6 * 16 + gUnknown_Debug_2038A20->unk7] = pal;

View File

@ -64,7 +64,7 @@ void sub_8023AD8(void);
void nullsub_6(void);
bool32 IsHMMove2(u16 move);
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gBattleTerrain;
extern u8 gReservedSpritePaletteCount;
extern u16 gMoveToLearn;
@ -204,7 +204,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
gBattle_BG3_X = 256;
gBattle_BG3_Y = 0;
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
gBattleTerrain = BATTLE_TERRAIN_PLAIN;
sub_800D6D4();
@ -312,7 +312,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
gBattle_BG3_X = 256;
gBattle_BG3_Y = 0;
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
gBattleTerrain = BATTLE_TERRAIN_PLAIN;
sub_800D6D4();
@ -476,7 +476,7 @@ static void CB2_EvolutionSceneUpdate(void)
{
AnimateSprites();
BuildOamBuffer();
Text_UpdateWindowInBattle(&gUnknown_03004210);
Text_UpdateWindowInBattle(&gWindowTemplate_Contest_MoveDescription);
UpdatePaletteFade();
RunTasks();
}
@ -549,12 +549,12 @@ static void Task_EvolutionScene(u8 taskID)
if (!gPaletteFade.active)
{
StringExpandPlaceholders(gStringVar4, BattleText_StartEvo);
Text_InitWindow8002EB0(&gUnknown_03004210, gStringVar4, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gStringVar4, 144, 2, 15);
gTasks[taskID].tState++;
}
break;
case 2: // wait for string, play cry
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
{
PlayCry1(gTasks[taskID].tPreEvoSpecies, 0);
gTasks[taskID].tState++;
@ -637,7 +637,7 @@ static void Task_EvolutionScene(u8 taskID)
if (IsCryFinished() && !gPaletteFade.active)
{
StringExpandPlaceholders(gStringVar4, BattleText_FinishEvo);
Text_InitWindow8002EB0(&gUnknown_03004210, gStringVar4, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gStringVar4, 144, 2, 15);
PlayBGM(MUS_EVOLVED);
gTasks[taskID].tState++;
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskID].tPostEvoSpecies));
@ -649,7 +649,7 @@ static void Task_EvolutionScene(u8 taskID)
}
break;
case 14: // check if it wants to learn a new move
if (gUnknown_03004210.state == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0)
{
var = MonTryLearningNewMove(mon, gTasks[taskID].tLearnsFirstMove);
if (var != 0 && !gTasks[taskID].tEvoWasStopped)
@ -706,59 +706,59 @@ static void Task_EvolutionScene(u8 taskID)
if (IsCryFinished())
{
StringExpandPlaceholders(gStringVar4, BattleText_StopEvo);
Text_InitWindow8002EB0(&gUnknown_03004210, gStringVar4, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gStringVar4, 144, 2, 15);
gTasks[taskID].tEvoWasStopped = TRUE;
gTasks[taskID].tState = 14;
}
break;
case 19: // pokemon learned a new move, print string and play a fanfare
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
sub_8024CEC();
PlayFanfare(MUS_LEVEL_UP);
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[3]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
gTasks[taskID].tState++;
}
break;
case 20: // wait a bit and check if can learn another move
if (gUnknown_03004210.state == 0 && !IsSEPlaying() && --gTasks[taskID].tLearnsFirstMove == 0)
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying() && --gTasks[taskID].tLearnsFirstMove == 0)
gTasks[taskID].tState = 14;
break;
case 21: // try to learn a new move
switch (gTasks[taskID].tLearnMoveState)
{
case 0:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
sub_8024CEC();
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[4]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnMoveState++;
}
break;
case 1:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[5]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnMoveState++;
}
break;
case 2:
if (gUnknown_03004210.state != 0)
if (gWindowTemplate_Contest_MoveDescription.state != 0)
break;
if (!IsSEPlaying())
{
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[6]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tData9 = 5;
gTasks[taskID].tdata10 = 9;
gTasks[taskID].tLearnMoveState++;
}
case 3:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
sub_8023A80();
gTasks[taskID].tLearnMoveState++;
@ -785,7 +785,7 @@ static void Task_EvolutionScene(u8 taskID)
{
sub_8023AD8();
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
PlaySE(SE_SELECT);
if (sEvoCursorPos != 0)
gTasks[taskID].tLearnMoveState = gTasks[taskID].tdata10;
@ -800,7 +800,7 @@ static void Task_EvolutionScene(u8 taskID)
{
sub_8023AD8();
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
PlaySE(SE_SELECT);
gTasks[taskID].tLearnMoveState = gTasks[taskID].tdata10;
}
@ -826,7 +826,7 @@ static void Task_EvolutionScene(u8 taskID)
if (IsHMMove2(move))
{
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[307]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnMoveState = 11;
}
else
@ -839,42 +839,42 @@ static void Task_EvolutionScene(u8 taskID)
RemoveMonPPBonus(mon, var);
SetMonMoveSlot(mon, gMoveToLearn, var);
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[207]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnMoveState++;
}
}
}
break;
case 7:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[7]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tLearnMoveState++;
}
break;
case 8:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
{
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[208]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tState = 19;
}
break;
case 9:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[8]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tData9 = 10;
gTasks[taskID].tdata10 = 0;
gTasks[taskID].tLearnMoveState = 3;
break;
case 10:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[9]);
Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
Text_InitWindow8002EB0(&gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15);
gTasks[taskID].tState = 14;
break;
case 11:
if (gUnknown_03004210.state == 0 && !IsSEPlaying())
if (gWindowTemplate_Contest_MoveDescription.state == 0 && !IsSEPlaying())
gTasks[taskID].tLearnMoveState = 5;
break;
}
@ -1229,7 +1229,7 @@ void unref_sub_8113B50(u8 *a, u8 *b)
for (sp8 = 0; sp8 < 64; sp8++)
{
sEvoInfo.unk84[sp8] = 0;
sEvoInfo.unk4[sp8] = 0;
sEvoInfo.round1Points[sp8] = 0;
sEvoInfo.unk44[sp8] = 0;
for (r6 = 0; r6 < 32; r6++)
{
@ -1268,14 +1268,14 @@ void unref_sub_8113B50(u8 *a, u8 *b)
case 0:
if (*r2 & 0xF)
{
sEvoInfo.unk10C4[sp8][sEvoInfo.unk4[sp8]] = r6;
sEvoInfo.unk10C4[sp8][sEvoInfo.round1Points[sp8]] = r6;
r3 = 1;
}
break;
case 1:
if (*r2 & 0xF0)
{
sEvoInfo.unk10C4[sp8][sEvoInfo.unk4[sp8]] = r6;
sEvoInfo.unk10C4[sp8][sEvoInfo.round1Points[sp8]] = r6;
r3 = 1;
}
break;
@ -1287,16 +1287,16 @@ void unref_sub_8113B50(u8 *a, u8 *b)
case 0:
if (*r2 & 0xF)
{
sEvoInfo.unk18C4[sp8][sEvoInfo.unk4[sp8]] = r6 - 1;
sEvoInfo.unk4[sp8]++;
sEvoInfo.unk18C4[sp8][sEvoInfo.round1Points[sp8]] = r6 - 1;
sEvoInfo.round1Points[sp8]++;
r3 = 0;
}
break;
case 1:
if (*r2 & 0xF0)
{
sEvoInfo.unk18C4[sp8][sEvoInfo.unk4[sp8]] = r6 - 1;
sEvoInfo.unk4[sp8]++;
sEvoInfo.unk18C4[sp8][sEvoInfo.round1Points[sp8]] = r6 - 1;
sEvoInfo.round1Points[sp8]++;
r3 = 0;
}
break;
@ -1310,8 +1310,8 @@ void unref_sub_8113B50(u8 *a, u8 *b)
}
if (r3)
{
sEvoInfo.unk18C4[sp8][sEvoInfo.unk4[sp8]] = r6;
sEvoInfo.unk4[sp8]++;
sEvoInfo.unk18C4[sp8][sEvoInfo.round1Points[sp8]] = r6;
sEvoInfo.round1Points[sp8]++;
}
//_08113D26
if (!((sp8 + 1) & 7))
@ -1392,9 +1392,9 @@ void unref_sub_8113B50(u8 *a, u8 *b)
for (sp8 = 0; sp8 < 0x40; sp8++) //_08113E3A
{
if (sEvoInfo.unk4[sp8] < sEvoInfo.unk44[sp8])
if (sEvoInfo.round1Points[sp8] < sEvoInfo.unk44[sp8])
{
for (spC = 0; spC < sEvoInfo.unk4[sp8]; spC++)
for (spC = 0; spC < sEvoInfo.round1Points[sp8]; spC++)
{
sp14 = 0x100;
@ -1431,19 +1431,19 @@ void unref_sub_8113B50(u8 *a, u8 *b)
}
}
//_08113F9E
if (sEvoInfo.unk4[sp8] == sEvoInfo.unk44[sp8])
if (sEvoInfo.round1Points[sp8] == sEvoInfo.unk44[sp8])
{
for (r6 = 0; r6 < sEvoInfo.unk4[sp8]; r6++)
for (r6 = 0; r6 < sEvoInfo.round1Points[sp8]; r6++)
sub_81141F0(r6, r6, sp8);
}
//_08113FCC
if (sEvoInfo.unk4[sp8] > sEvoInfo.unk44[sp8])
if (sEvoInfo.round1Points[sp8] > sEvoInfo.unk44[sp8])
{
for (sp10 = 0; sp10 < sEvoInfo.unk44[sp8]; sp10++)
{
sp14 = 0x100;
for (r6 = 0; r6 < sEvoInfo.unk4[sp8]; r6++)
for (r6 = 0; r6 < sEvoInfo.round1Points[sp8]; r6++)
{
s32 r3;
@ -1472,7 +1472,7 @@ void unref_sub_8113B50(u8 *a, u8 *b)
sEvoInfo.unkC4[sp8][spC] = 1;
}
//_08114104
for (r6 = 0; r6 < sEvoInfo.unk4[sp8]; r6++)
for (r6 = 0; r6 < sEvoInfo.round1Points[sp8]; r6++)
{
sEvoInfo.unk20C4[sp8][r6] = sEvoInfo.unk30C4[sp8][r6];
sEvoInfo.unk28C4[sp8][r6] = sEvoInfo.unk38C4[sp8][r6];

View File

@ -480,7 +480,7 @@ extern u16 gMoveToLearn;
extern u16 gUnknown_08E9A300[];
extern struct Coords8 const gUnknown_08376738[12][6];
extern u8 gUnknown_02039460[];
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern const u8 gPartyMenuMisc_Gfx[];
extern const u8 gPartyMenuMisc_Tilemap[];
@ -678,8 +678,8 @@ bool8 InitPartyMenu(void)
gMain.state++;
break;
case 8:
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C90);
MultistepInitWindowTileData(&gUnknown_03004210, 1);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C90);
MultistepInitWindowTileData(&gWindowTemplate_Contest_MoveDescription, 1);
gMain.state++;
break;
case 9:
@ -2406,13 +2406,13 @@ void SwapValues_s16(s16 *a, s16 *b)
#ifdef NONMATCHING
void sub_806CF04(void)
{
SwapValues_s16(&gSprites[ewram01000.unk3].pos1.x, &gSprites[ewram01000.unk4].pos1.x);
SwapValues_s16(&gSprites[ewram01000.unk3].pos1.y, &gSprites[ewram01000.unk4].pos1.y);
SwapValues_s16(&gSprites[ewram01000.unk3].pos2.x, &gSprites[ewram01000.unk4].pos2.x);
SwapValues_s16(&gSprites[ewram01000.unk3].data[0], &gSprites[ewram01000.unk4].data[0]);
SwapValues_s16(&gSprites[ewram01000.unk3].pos1.x, &gSprites[ewram01000.round1Points].pos1.x);
SwapValues_s16(&gSprites[ewram01000.unk3].pos1.y, &gSprites[ewram01000.round1Points].pos1.y);
SwapValues_s16(&gSprites[ewram01000.unk3].pos2.x, &gSprites[ewram01000.round1Points].pos2.x);
SwapValues_s16(&gSprites[ewram01000.unk3].data[0], &gSprites[ewram01000.round1Points].data[0]);
gSprites[ewram01000.unk3].callback = SpriteCB_sub_806D37C;
gSprites[ewram01000.unk4].callback = SpriteCB_sub_806D37C;
gSprites[ewram01000.round1Points].callback = SpriteCB_sub_806D37C;
}
#else
NAKED
@ -2710,7 +2710,7 @@ void sub_806D5B8(u8 monIndex)
u8 right = gUnknown_08376948[IsDoubleBattle()][monIndex].right;
u8 bottom = gUnknown_08376948[IsDoubleBattle()][monIndex].bottom;
Text_EraseWindowRect(&gUnknown_03004210, left, top, right, bottom);
Text_EraseWindowRect(&gWindowTemplate_Contest_MoveDescription, left, top, right, bottom);
var1 = 0;
CpuFastSet(&var1, OBJ_VRAM1 + monIndex * 0x400, 0x1000100);
@ -2724,7 +2724,7 @@ void sub_806D668(u8 monIndex)
u8 right = gUnknown_08376978[IsDoubleBattle()][monIndex].right;
u8 bottom = gUnknown_08376978[IsDoubleBattle()][monIndex].bottom;
Text_EraseWindowRect(&gUnknown_03004210, left, top, right, bottom);
Text_EraseWindowRect(&gWindowTemplate_Contest_MoveDescription, left, top, right, bottom);
var1 = 0;
CpuFastSet(&var1, OBJ_VRAM1 + 0x300 + monIndex * 0x400, 0x1000040);

View File

@ -216,7 +216,7 @@ u8 sub_8119E3C(struct CryRelatedStruct *cry, u8 arg1)
switch (gUnknown_03005E98)
{
case 0:
gPokedexCryScreenPtr->unk0014 = cry->unk0;
gPokedexCryScreenPtr->unk0014 = cry->totalPoints;
gPokedexCryScreenPtr->unk0016 = cry->yPos;
gPokedexCryScreenPtr->unk001A = 0;
gPokedexCryScreenPtr->unk001B = 0;
@ -235,7 +235,7 @@ u8 sub_8119E3C(struct CryRelatedStruct *cry, u8 arg1)
break;
case 1:
r7 = cry->unk2 << 11;
r6 = (cry->paletteNo << 12) + ((unsigned)(cry->unk0 << 18) >> 23);
r6 = (cry->paletteNo << 12) + ((unsigned)(cry->totalPoints << 18) >> 23);
for (i = 0; i < 7; i++)
{
for (j = 0; j < 32; j++)

View File

@ -1690,15 +1690,15 @@ void debug_sub_8110CCC(void)
void debug_sub_8110D84(void)
{
switch (sFlyDataPtr->unk4)
switch (sFlyDataPtr->round1Points)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
break;
case 1:
if (!UpdatePaletteFade())
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
break;
case 2:
switch (sub_80FAB60())
@ -1719,7 +1719,7 @@ void debug_sub_8110D84(void)
case 5:
m4aSongNumStart(SE_SELECT);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
break;
}
break;
@ -1736,14 +1736,14 @@ void debug_sub_8110D84(void)
{
sub_80FBCA0();
sub_80FAEC4();
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
}
break;
case 5:
if (sub_80FAFC0() == 0)
{
CreateRegionMapCursor(0, 0);
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
}
break;
case 6:
@ -1755,14 +1755,14 @@ void debug_sub_8110D84(void)
{
sub_80FBCA0();
sub_80FAEC4();
sFlyDataPtr->unk4++;
sFlyDataPtr->round1Points++;
}
break;
case 7:
if (sub_80FAFC0() == 0)
{
CreateRegionMapCursor(0, 0);
sFlyDataPtr->unk4 = 3;
sFlyDataPtr->round1Points = 3;
}
break;
}

View File

@ -10,7 +10,7 @@
#include "ewram.h"
extern struct SpriteTemplate gUnknown_02024E8C;
extern struct Window gUnknown_03004210;
extern struct Window gWindowTemplate_Contest_MoveDescription;
extern u8 gReservedSpritePaletteCount;
extern u8 gActionSelectionCursor[4];
extern u8 gBankInMenu;
@ -72,7 +72,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
ScanlineEffect_Clear();
Text_LoadWindowTemplate(&gWindowTemplate_81E6C58);
ResetPaletteFade();
Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
Text_InitWindowWithTemplate(&gWindowTemplate_Contest_MoveDescription, &gWindowTemplate_81E6C58);
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gBattle_BG1_X = 0;

View File

@ -97,7 +97,7 @@ SYMBOL(gBattle_BG3_Y, 4)
SYMBOL(gBattleTextBuff1, 16)
SYMBOL(gUnknown_030041D0, 48)
SYMBOL(gBattle_WIN1H, 4)
SYMBOL(gUnknown_03004210, 48)
SYMBOL(gWindowTemplate_Contest_MoveDescription, 48)
SYMBOL(gBattle_WIN0V, 4)
SYMBOL(gBattle_WIN1V, 4)
SYMBOL(gUnknown_03004250, 48)