evo scene file is done
This commit is contained in:
@@ -85,7 +85,7 @@ extern u16 gTrainerBattleOpponent_B;
|
||||
extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT];
|
||||
extern void (*gPreBattleCallback1)(void);
|
||||
extern void (*gBattleMainFunc)(void);
|
||||
extern void (*gUnknown_030061E8)(void);
|
||||
extern void (*gCB2_AfterEvolution)(void);
|
||||
extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for?
|
||||
extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for?
|
||||
extern u8 gUnknown_02039B28[]; // possibly a struct?
|
||||
@@ -2121,7 +2121,7 @@ static void sub_8038F34(void)
|
||||
if (sub_800A520() == TRUE)
|
||||
{
|
||||
sub_800ADF8();
|
||||
sub_814F9EC(gText_LinkStandby3, 0);
|
||||
BattleHandleAddTextPrinter(gText_LinkStandby3, 0);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@@ -2247,17 +2247,17 @@ static void sub_803939C(void)
|
||||
case 3:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sub_814F9EC(gText_RecordBattleToPass, 0);
|
||||
BattleHandleAddTextPrinter(gText_RecordBattleToPass, 0);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!IsTextPrinterActive(0))
|
||||
{
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattleHandleAddTextPrinter(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@@ -2267,9 +2267,9 @@ static void sub_803939C(void)
|
||||
if (gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
@@ -2277,9 +2277,9 @@ static void sub_803939C(void)
|
||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
@@ -2287,7 +2287,7 @@ static void sub_803939C(void)
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 1);
|
||||
gBattleCommunication[1] = MoveRecordedBattleToSaveData();
|
||||
gBattleCommunication[MULTIUSE_STATE] = 10;
|
||||
}
|
||||
@@ -2305,11 +2305,11 @@ static void sub_803939C(void)
|
||||
case 6:
|
||||
if (sub_800A520() == TRUE)
|
||||
{
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 1);
|
||||
if (gMain.field_439_x4)
|
||||
{
|
||||
sub_800ADF8();
|
||||
sub_814F9EC(gText_LinkStandby3, 0);
|
||||
BattleHandleAddTextPrinter(gText_LinkStandby3, 0);
|
||||
}
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@@ -2340,14 +2340,14 @@ static void sub_803939C(void)
|
||||
{
|
||||
PlaySE(SE_SAVE);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordedOnPass);
|
||||
sub_814F9EC(gDisplayedStringBattle, 0);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gBattleCommunication[1] = 0x80;
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordCouldntBeSaved);
|
||||
sub_814F9EC(gDisplayedStringBattle, 0);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gBattleCommunication[1] = 0x80;
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@@ -2358,7 +2358,7 @@ static void sub_803939C(void)
|
||||
if (gMain.field_439_x4)
|
||||
{
|
||||
sub_800ADF8();
|
||||
sub_814F9EC(gText_LinkStandby3, 0);
|
||||
BattleHandleAddTextPrinter(gText_LinkStandby3, 0);
|
||||
}
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@@ -3690,7 +3690,7 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
TurnValuesCleanUp(FALSE);
|
||||
SpecialStatusesClear();
|
||||
*(&gBattleStruct->field_91) = gAbsentBankFlags;
|
||||
sub_814F9EC(gText_EmptyString3, 0);
|
||||
BattleHandleAddTextPrinter(gText_EmptyString3, 0);
|
||||
gBattleMainFunc = HandleTurnActionSelectionState;
|
||||
ResetSentPokesToOpponentValue();
|
||||
|
||||
@@ -3797,7 +3797,7 @@ void BattleTurnPassed(void)
|
||||
*(gBattleStruct->field_5C + i) = 6;
|
||||
|
||||
*(&gBattleStruct->field_91) = gAbsentBankFlags;
|
||||
sub_814F9EC(gText_EmptyString3, 0);
|
||||
BattleHandleAddTextPrinter(gText_EmptyString3, 0);
|
||||
gBattleMainFunc = HandleTurnActionSelectionState;
|
||||
gRandomTurnNumber = Random();
|
||||
|
||||
@@ -4939,7 +4939,7 @@ static void HandleEndTurn_FinishBattle(void)
|
||||
BeginFastPaletteFade(3);
|
||||
FadeOutMapMusic(5);
|
||||
gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions;
|
||||
gUnknown_030061E8 = BattleMainCB2;
|
||||
gCB2_AfterEvolution = BattleMainCB2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2209,7 +2209,7 @@ static void sub_814F950(u8* dst)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_814F9EC(const u8 *text, u8 arg1)
|
||||
void BattleHandleAddTextPrinter(const u8 *text, u8 arg1)
|
||||
{
|
||||
const u8 *r8 = gUnknown_085CD660[gBattleScripting.field_24];
|
||||
bool32 r9;
|
||||
|
||||
@@ -6114,33 +6114,33 @@ static void atk5A_yesnoboxlearnmove(void)
|
||||
switch (gBattleScripting.learnMoveState)
|
||||
{
|
||||
case 0:
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattleHandleAddTextPrinter(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[1] == 0)
|
||||
{
|
||||
sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
|
||||
gBattleScripting.learnMoveState++;
|
||||
}
|
||||
@@ -6214,7 +6214,7 @@ static void atk5A_yesnoboxlearnmove(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 1);
|
||||
gBattlescriptCurrInstr += 5;
|
||||
break;
|
||||
case 6:
|
||||
@@ -6231,26 +6231,26 @@ static void atk5B_yesnoboxstoplearningmove(void)
|
||||
switch (gBattleScripting.learnMoveState)
|
||||
{
|
||||
case 0:
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattleHandleAddTextPrinter(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
@@ -6261,13 +6261,13 @@ static void atk5B_yesnoboxstoplearningmove(void)
|
||||
else
|
||||
gBattlescriptCurrInstr += 5;
|
||||
|
||||
sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1);
|
||||
sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -6527,38 +6527,38 @@ static void atk67_yesnobox(void)
|
||||
switch (gBattleCommunication[0])
|
||||
{
|
||||
case 0:
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattleHandleAddTextPrinter(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[0]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
PlaySE(SE_SELECT);
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 1);
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 1);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 1);
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
break;
|
||||
@@ -6674,7 +6674,7 @@ static void atk6C_draw_lvlupbox(void)
|
||||
SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 0);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
sub_8056A3C(0x12, 7, 0x1D, 0x13, 0x80);
|
||||
HandleBattleWindow(0x12, 7, 0x1D, 0x13, 0x80);
|
||||
gBattleScripting.atk6C_state = 4;
|
||||
break;
|
||||
case 4:
|
||||
@@ -6704,7 +6704,7 @@ static void atk6C_draw_lvlupbox(void)
|
||||
if (gMain.newKeys != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_8056A3C(0x12, 7, 0x1D, 0x13, 0x81);
|
||||
HandleBattleWindow(0x12, 7, 0x1D, 0x13, 0x81);
|
||||
gBattleScripting.atk6C_state++;
|
||||
}
|
||||
break;
|
||||
@@ -7148,7 +7148,7 @@ static void atk76_various(void)
|
||||
break;
|
||||
case 16:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]);
|
||||
sub_814F9EC(gDisplayedStringBattle, 0x16);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0x16);
|
||||
break;
|
||||
case 17:
|
||||
if (IsTextPrinterActive(0x16))
|
||||
@@ -11238,7 +11238,7 @@ static void atkF2_display_dex_info(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags)
|
||||
void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags)
|
||||
{
|
||||
s32 destY, destX;
|
||||
u16 var = 0;
|
||||
@@ -11286,7 +11286,7 @@ void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags)
|
||||
}
|
||||
}
|
||||
|
||||
void BattleCreateCursorAt(u8 cursorPosition)
|
||||
void BattleCreateYesNoCursorAt(u8 cursorPosition)
|
||||
{
|
||||
u16 src[2];
|
||||
src[0] = 1;
|
||||
@@ -11296,7 +11296,7 @@ void BattleCreateCursorAt(u8 cursorPosition)
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
void BattleDestroyCursorAt(u8 cursorPosition)
|
||||
void BattleDestroyYesNoCursorAt(u8 cursorPosition)
|
||||
{
|
||||
u16 src[2];
|
||||
src[0] = 0x1016;
|
||||
@@ -11311,26 +11311,26 @@ static void atkF3_nickname_caught_poke(void)
|
||||
switch (gBattleCommunication[MULTIUSE_STATE])
|
||||
{
|
||||
case 0:
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattleHandleAddTextPrinter(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user