mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Merge pull request #1724 from DizzyEggg/lang_improvements
Accomodate some parts of code based on the french decomp
This commit is contained in:
commit
aa9ccbf194
@ -7,6 +7,9 @@
|
|||||||
#define WINDOW_CLEAR (1 << 0)
|
#define WINDOW_CLEAR (1 << 0)
|
||||||
#define WINDOW_BG1 (1 << 7)
|
#define WINDOW_BG1 (1 << 7)
|
||||||
|
|
||||||
|
// Arguments for 'xStart, yStart, xEnd, yEnd' in HandleBattleWindow
|
||||||
|
#define YESNOBOX_X_Y 24, 8, 29, 13
|
||||||
|
|
||||||
void AI_CalcDmg(u8 battlerIdAtk, u8 battlerIdDef);
|
void AI_CalcDmg(u8 battlerIdAtk, u8 battlerIdDef);
|
||||||
u8 TypeCalc(u16 move, u8 battlerIdAtk, u8 battlerIdDef);
|
u8 TypeCalc(u16 move, u8 battlerIdAtk, u8 battlerIdDef);
|
||||||
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
|
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#ifdef ENGLISH
|
#ifdef ENGLISH
|
||||||
#define UNITS_IMPERIAL
|
#define UNITS_IMPERIAL
|
||||||
|
#define CHAR_DEC_SEPARATOR CHAR_PERIOD // Period is used as a decimal separator only in the UK and the US.
|
||||||
#else
|
#else
|
||||||
#define UNITS_METRIC
|
#define UNITS_METRIC
|
||||||
|
#define CHAR_DEC_SEPARATOR CHAR_COMMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Uncomment to fix some identified minor bugs
|
// Uncomment to fix some identified minor bugs
|
||||||
|
@ -694,6 +694,7 @@ SECTIONS {
|
|||||||
src/battle_transition_frontier.o(.rodata);
|
src/battle_transition_frontier.o(.rodata);
|
||||||
src/text_input_strings.o(.rodata);
|
src/text_input_strings.o(.rodata);
|
||||||
src/fonts.o(.rodata);
|
src/fonts.o(.rodata);
|
||||||
|
src/international_string_util.o(.rodata);
|
||||||
src/mystery_event_msg.o(.rodata);
|
src/mystery_event_msg.o(.rodata);
|
||||||
data/mystery_gift.o(.rodata);
|
data/mystery_gift.o(.rodata);
|
||||||
src/m4a_tables.o(.rodata);
|
src/m4a_tables.o(.rodata);
|
||||||
|
@ -1435,7 +1435,7 @@ static void PlayerHandleYesNoInput(void)
|
|||||||
}
|
}
|
||||||
if (JOY_NEW(A_BUTTON))
|
if (JOY_NEW(A_BUTTON))
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
|
|
||||||
if (gMultiUsePlayerCursor != 0)
|
if (gMultiUsePlayerCursor != 0)
|
||||||
@ -1447,7 +1447,7 @@ static void PlayerHandleYesNoInput(void)
|
|||||||
}
|
}
|
||||||
if (JOY_NEW(B_BUTTON))
|
if (JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
PlayerBufferExecCompleted();
|
PlayerBufferExecCompleted();
|
||||||
}
|
}
|
||||||
@ -2592,7 +2592,7 @@ static void PlayerHandleYesNoBox(void)
|
|||||||
{
|
{
|
||||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gMultiUsePlayerCursor = 1;
|
gMultiUsePlayerCursor = 1;
|
||||||
BattleCreateYesNoCursorAt(1);
|
BattleCreateYesNoCursorAt(1);
|
||||||
|
@ -1068,7 +1068,7 @@ static void CB2_HandleStartBattle(void)
|
|||||||
// Recv Pokémon 5-6
|
// Recv Pokémon 5-6
|
||||||
ResetBlockReceivedFlags();
|
ResetBlockReceivedFlags();
|
||||||
memcpy(&gEnemyParty[4], gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2);
|
memcpy(&gEnemyParty[4], gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2);
|
||||||
|
|
||||||
TryCorrectShedinjaLanguage(&gEnemyParty[0]);
|
TryCorrectShedinjaLanguage(&gEnemyParty[0]);
|
||||||
TryCorrectShedinjaLanguage(&gEnemyParty[1]);
|
TryCorrectShedinjaLanguage(&gEnemyParty[1]);
|
||||||
TryCorrectShedinjaLanguage(&gEnemyParty[2]);
|
TryCorrectShedinjaLanguage(&gEnemyParty[2]);
|
||||||
@ -2489,7 +2489,7 @@ static void AskRecordBattle(void)
|
|||||||
case STATE_PRINT_YES_NO:
|
case STATE_PRINT_YES_NO:
|
||||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||||
BattleCreateYesNoCursorAt(1);
|
BattleCreateYesNoCursorAt(1);
|
||||||
@ -2525,7 +2525,7 @@ static void AskRecordBattle(void)
|
|||||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||||
{
|
{
|
||||||
// Selected Yes
|
// Selected Yes
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
gBattleCommunication[1] = MoveRecordedBattleToSaveData();
|
gBattleCommunication[1] = MoveRecordedBattleToSaveData();
|
||||||
gBattleCommunication[MULTIUSE_STATE] = STATE_RECORD_YES;
|
gBattleCommunication[MULTIUSE_STATE] = STATE_RECORD_YES;
|
||||||
}
|
}
|
||||||
@ -2544,7 +2544,7 @@ static void AskRecordBattle(void)
|
|||||||
case STATE_RECORD_NO:
|
case STATE_RECORD_NO:
|
||||||
if (IsLinkTaskFinished() == TRUE)
|
if (IsLinkTaskFinished() == TRUE)
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
if (gMain.anyLinkBattlerHasFrontierPass)
|
if (gMain.anyLinkBattlerHasFrontierPass)
|
||||||
{
|
{
|
||||||
// Other battlers may be recording, wait for them
|
// Other battlers may be recording, wait for them
|
||||||
@ -2985,7 +2985,7 @@ static void SpriteCB_TrainerThrowObject_Main(struct Sprite *sprite)
|
|||||||
sprite->callback = SpriteCB_Idle;
|
sprite->callback = SpriteCB_Idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sprite callback for a trainer back pic to throw an object
|
// Sprite callback for a trainer back pic to throw an object
|
||||||
// (Wally throwing a ball, throwing Pokéblocks/balls in the Safari Zone)
|
// (Wally throwing a ball, throwing Pokéblocks/balls in the Safari Zone)
|
||||||
void SpriteCB_TrainerThrowObject(struct Sprite *sprite)
|
void SpriteCB_TrainerThrowObject(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
|
@ -5369,7 +5369,7 @@ static void Cmd_yesnoboxlearnmove(void)
|
|||||||
switch (gBattleScripting.learnMoveState)
|
switch (gBattleScripting.learnMoveState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gBattleScripting.learnMoveState++;
|
gBattleScripting.learnMoveState++;
|
||||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||||
@ -5395,7 +5395,7 @@ static void Cmd_yesnoboxlearnmove(void)
|
|||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
if (gBattleCommunication[1] == 0)
|
if (gBattleCommunication[1] == 0)
|
||||||
{
|
{
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||||
gBattleScripting.learnMoveState++;
|
gBattleScripting.learnMoveState++;
|
||||||
}
|
}
|
||||||
@ -5466,7 +5466,7 @@ static void Cmd_yesnoboxlearnmove(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
@ -5483,7 +5483,7 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
|||||||
switch (gBattleScripting.learnMoveState)
|
switch (gBattleScripting.learnMoveState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gBattleScripting.learnMoveState++;
|
gBattleScripting.learnMoveState++;
|
||||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||||
@ -5513,13 +5513,13 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
|||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
|
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
}
|
}
|
||||||
else if (JOY_NEW(B_BUTTON))
|
else if (JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -5779,7 +5779,7 @@ static void Cmd_yesnobox(void)
|
|||||||
switch (gBattleCommunication[0])
|
switch (gBattleCommunication[0])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gBattleCommunication[0]++;
|
gBattleCommunication[0]++;
|
||||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||||
@ -5804,13 +5804,13 @@ static void Cmd_yesnobox(void)
|
|||||||
{
|
{
|
||||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
else if (JOY_NEW(A_BUTTON))
|
else if (JOY_NEW(A_BUTTON))
|
||||||
{
|
{
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -10116,7 +10116,7 @@ static void Cmd_trygivecaughtmonnick(void)
|
|||||||
switch (gBattleCommunication[MULTIUSE_STATE])
|
switch (gBattleCommunication[MULTIUSE_STATE])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gBattleCommunication[MULTIUSE_STATE]++;
|
gBattleCommunication[MULTIUSE_STATE]++;
|
||||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||||
|
@ -899,7 +899,7 @@ static void Task_EvolutionScene(u8 taskId)
|
|||||||
case MVSTATE_PRINT_YES_NO:
|
case MVSTATE_PRINT_YES_NO:
|
||||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
HandleBattleWindow(YESNOBOX_X_Y, 0);
|
||||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||||
gTasks[taskId].tLearnMoveState++;
|
gTasks[taskId].tLearnMoveState++;
|
||||||
sEvoCursorPos = 0;
|
sEvoCursorPos = 0;
|
||||||
@ -928,7 +928,7 @@ static void Task_EvolutionScene(u8 taskId)
|
|||||||
}
|
}
|
||||||
if (JOY_NEW(A_BUTTON))
|
if (JOY_NEW(A_BUTTON))
|
||||||
{
|
{
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
|
|
||||||
if (sEvoCursorPos != 0)
|
if (sEvoCursorPos != 0)
|
||||||
@ -947,7 +947,7 @@ static void Task_EvolutionScene(u8 taskId)
|
|||||||
if (JOY_NEW(B_BUTTON))
|
if (JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
// Equivalent to selecting NO
|
// Equivalent to selecting NO
|
||||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
|
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ static void DetermineCyclingRoadResults(u32 numFrames, u8 numBikeCollisions)
|
|||||||
if (numFrames < 3600)
|
if (numFrames < 3600)
|
||||||
{
|
{
|
||||||
ConvertIntToDecimalStringN(gStringVar2, numFrames / 60, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
ConvertIntToDecimalStringN(gStringVar2, numFrames / 60, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||||
gStringVar2[2] = CHAR_PERIOD;
|
gStringVar2[2] = CHAR_DEC_SEPARATOR;
|
||||||
ConvertIntToDecimalStringN(&gStringVar2[3], ((numFrames % 60) * 100) / 60, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(&gStringVar2[3], ((numFrames % 60) * 100) / 60, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
StringAppend(gStringVar2, gText_SpaceSeconds);
|
StringAppend(gStringVar2, gText_SpaceSeconds);
|
||||||
}
|
}
|
||||||
|
@ -270,6 +270,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top);
|
|||||||
static void PrintMonWeight(u16 weight, u8 left, u8 top);
|
static void PrintMonWeight(u16 weight, u8 left, u8 top);
|
||||||
static void ResetOtherVideoRegisters(u16);
|
static void ResetOtherVideoRegisters(u16);
|
||||||
static u8 PrintCryScreenSpeciesName(u8, u16, u8, u8);
|
static u8 PrintCryScreenSpeciesName(u8, u16, u8, u8);
|
||||||
|
static void PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top);
|
||||||
static void DrawFootprint(u8 windowId, u16 dexNum);
|
static void DrawFootprint(u8 windowId, u16 dexNum);
|
||||||
static u16 CreateSizeScreenTrainerPic(u16, s16, s16, s8);
|
static u16 CreateSizeScreenTrainerPic(u16, s16, s16, s8);
|
||||||
static u16 GetNextPosition(u8, u16, u16, u16);
|
static u16 GetNextPosition(u8, u16, u16, u16);
|
||||||
@ -4531,13 +4532,14 @@ static void UnusedPrintMonName(u8 windowId, const u8 *name, u8 left, u8 top)
|
|||||||
PrintInfoSubMenuText(windowId, str, left, top);
|
PrintInfoSubMenuText(windowId, str, left, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top)
|
// Unused in the English version, used to print height/weight in versions which use metric system.
|
||||||
|
static void PrintDecimalNum(u8 windowId, u16 num, u8 left, u8 top)
|
||||||
{
|
{
|
||||||
u8 str[6];
|
u8 str[6];
|
||||||
bool8 outputted = FALSE;
|
bool8 outputted = FALSE;
|
||||||
u8 result;
|
u8 result;
|
||||||
|
|
||||||
result = b / 1000;
|
result = num / 1000;
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
{
|
{
|
||||||
str[0] = CHAR_SPACER;
|
str[0] = CHAR_SPACER;
|
||||||
@ -4549,7 +4551,7 @@ static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top)
|
|||||||
outputted = TRUE;
|
outputted = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = (b % 1000) / 100;
|
result = (num % 1000) / 100;
|
||||||
if (result == 0 && !outputted)
|
if (result == 0 && !outputted)
|
||||||
{
|
{
|
||||||
str[1] = CHAR_SPACER;
|
str[1] = CHAR_SPACER;
|
||||||
@ -4561,9 +4563,9 @@ static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top)
|
|||||||
outputted = TRUE;
|
outputted = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
str[2] = CHAR_0 + ((b % 1000) % 100) / 10;
|
str[2] = CHAR_0 + ((num % 1000) % 100) / 10;
|
||||||
str[3] = CHAR_PERIOD;
|
str[3] = CHAR_DEC_SEPARATOR;
|
||||||
str[4] = CHAR_0 + ((b % 1000) % 100) % 10;
|
str[4] = CHAR_0 + ((num % 1000) % 100) % 10;
|
||||||
str[5] = EOS;
|
str[5] = EOS;
|
||||||
PrintInfoSubMenuText(windowId, str, left, top);
|
PrintInfoSubMenuText(windowId, str, left, top);
|
||||||
}
|
}
|
||||||
|
@ -289,19 +289,19 @@ static void PrintNumPlayersWaitingForMsg(u8 windowId, u8 capacityCode, u8 string
|
|||||||
switch (capacityCode << 8)
|
switch (capacityCode << 8)
|
||||||
{
|
{
|
||||||
case LINK_GROUP_CAPACITY(0, 2):
|
case LINK_GROUP_CAPACITY(0, 2):
|
||||||
PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[0][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sPlayersNeededOrModeTexts[0][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
||||||
break;
|
break;
|
||||||
case LINK_GROUP_CAPACITY(0, 4):
|
case LINK_GROUP_CAPACITY(0, 4):
|
||||||
PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[1][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sPlayersNeededOrModeTexts[1][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
||||||
break;
|
break;
|
||||||
case LINK_GROUP_CAPACITY(2, 5):
|
case LINK_GROUP_CAPACITY(2, 5):
|
||||||
PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[2][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sPlayersNeededOrModeTexts[2][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
||||||
break;
|
break;
|
||||||
case LINK_GROUP_CAPACITY(3, 5):
|
case LINK_GROUP_CAPACITY(3, 5):
|
||||||
PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[3][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sPlayersNeededOrModeTexts[3][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
||||||
break;
|
break;
|
||||||
case LINK_GROUP_CAPACITY(2, 4):
|
case LINK_GROUP_CAPACITY(2, 4):
|
||||||
PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[4][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sPlayersNeededOrModeTexts[4][stringId - 1], 0, 1, UR_COLOR_DEFAULT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,10 +313,10 @@ static void PrintPlayerNameAndIdOnWindow(u8 windowId)
|
|||||||
u8 text[30];
|
u8 text[30];
|
||||||
u8 *txtPtr;
|
u8 *txtPtr;
|
||||||
|
|
||||||
PrintUnionRoomText(windowId, 1, gSaveBlock2Ptr->playerName, 0, 1, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 0, 1, UR_COLOR_DEFAULT);
|
||||||
txtPtr = StringCopy(text, sText_ID);
|
txtPtr = StringCopy(text, sText_ID);
|
||||||
ConvertIntToDecimalStringN(txtPtr, ReadAsU16(gSaveBlock2Ptr->playerTrainerId), STR_CONV_MODE_LEADING_ZEROS, 5);
|
ConvertIntToDecimalStringN(txtPtr, ReadAsU16(gSaveBlock2Ptr->playerTrainerId), STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||||
PrintUnionRoomText(windowId, 1, text, 0, 17, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, text, 0, 17, UR_COLOR_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetAwaitingCommunicationText(u8 *dst, u8 caseId)
|
static void GetAwaitingCommunicationText(u8 *dst, u8 caseId)
|
||||||
@ -431,7 +431,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
|||||||
data->nPlayerModeWindowId = AddWindow(&sWindowTemplate_NumPlayerMode);
|
data->nPlayerModeWindowId = AddWindow(&sWindowTemplate_NumPlayerMode);
|
||||||
|
|
||||||
FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2));
|
FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2));
|
||||||
PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_BButtonCancel, 8, 1, UR_COLOR_CANCEL);
|
PrintUnionRoomText(data->bButtonCancelWindowId, FONT_SMALL, sText_BButtonCancel, 8, 1, UR_COLOR_CANCEL);
|
||||||
PutWindowTilemap(data->bButtonCancelWindowId);
|
PutWindowTilemap(data->bButtonCancelWindowId);
|
||||||
CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX);
|
CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX);
|
||||||
|
|
||||||
@ -1011,7 +1011,7 @@ static void Task_TryJoinLinkGroup(u8 taskId)
|
|||||||
data->playerNameAndIdWindowId = AddWindow(&sWindowTemplate_PlayerNameAndId);
|
data->playerNameAndIdWindowId = AddWindow(&sWindowTemplate_PlayerNameAndId);
|
||||||
|
|
||||||
FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2));
|
FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2));
|
||||||
PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_ChooseJoinCancel, 8, 1, UR_COLOR_CANCEL);
|
PrintUnionRoomText(data->bButtonCancelWindowId, FONT_SMALL, sText_ChooseJoinCancel, 8, 1, UR_COLOR_CANCEL);
|
||||||
PutWindowTilemap(data->bButtonCancelWindowId);
|
PutWindowTilemap(data->bButtonCancelWindowId);
|
||||||
CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX);
|
CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX);
|
||||||
|
|
||||||
@ -2469,7 +2469,7 @@ static void ScheduleFieldMessageAndExit(const u8 *src)
|
|||||||
static void CopyPlayerListToBuffer(struct WirelessLink_URoom *uroom)
|
static void CopyPlayerListToBuffer(struct WirelessLink_URoom *uroom)
|
||||||
{
|
{
|
||||||
memcpy(&gDecompressionBuffer[sizeof(gDecompressionBuffer) - (MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer))],
|
memcpy(&gDecompressionBuffer[sizeof(gDecompressionBuffer) - (MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer))],
|
||||||
uroom->playerList,
|
uroom->playerList,
|
||||||
MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer));
|
MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3656,7 +3656,7 @@ static u8 CreateTradeBoardWindow(const struct WindowTemplate * template)
|
|||||||
u8 windowId = AddWindow(template);
|
u8 windowId = AddWindow(template);
|
||||||
DrawStdWindowFrame(windowId, FALSE);
|
DrawStdWindowFrame(windowId, FALSE);
|
||||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(15));
|
FillWindowPixelBuffer(windowId, PIXEL_FILL(15));
|
||||||
PrintUnionRoomText(windowId, 1, sText_NameWantedOfferLv, 8, 1, UR_COLOR_TRADE_BOARD_OTHER);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sText_NameWantedOfferLv, 8, 1, UR_COLOR_TRADE_BOARD_OTHER);
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
return windowId;
|
return windowId;
|
||||||
@ -3971,17 +3971,17 @@ static void PrintGroupMemberOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlayer *
|
|||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar4, id + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar4, id + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
StringAppend(gStringVar4, sText_Colon);
|
StringAppend(gStringVar4, sText_Colon);
|
||||||
PrintUnionRoomText(windowId, 1, gStringVar4, x, y, UR_COLOR_DEFAULT);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gStringVar4, x, y, UR_COLOR_DEFAULT);
|
||||||
x += 18;
|
x += 18;
|
||||||
activity = player->rfu.data.activity;
|
activity = player->rfu.data.activity;
|
||||||
if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN && !(activity & IN_UNION_ROOM))
|
if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN && !(activity & IN_UNION_ROOM))
|
||||||
{
|
{
|
||||||
CopyAndTranslatePlayerName(gStringVar4, player);
|
CopyAndTranslatePlayerName(gStringVar4, player);
|
||||||
PrintUnionRoomText(windowId, 1, gStringVar4, x, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gStringVar4, x, y, colorIdx);
|
||||||
ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5);
|
ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||||
StringCopy(gStringVar4, sText_ID);
|
StringCopy(gStringVar4, sText_ID);
|
||||||
StringAppend(gStringVar4, trainerId);
|
StringAppend(gStringVar4, trainerId);
|
||||||
PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x88), y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x88), y, colorIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3992,11 +3992,11 @@ static void PrintGroupCandidateOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlaye
|
|||||||
if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN)
|
if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN)
|
||||||
{
|
{
|
||||||
CopyAndTranslatePlayerName(gStringVar4, player);
|
CopyAndTranslatePlayerName(gStringVar4, player);
|
||||||
PrintUnionRoomText(windowId, 1, gStringVar4, x, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gStringVar4, x, y, colorIdx);
|
||||||
ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5);
|
ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||||
StringCopy(gStringVar4, sText_ID);
|
StringCopy(gStringVar4, sText_ID);
|
||||||
StringAppend(gStringVar4, trainerId);
|
StringAppend(gStringVar4, trainerId);
|
||||||
PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x68), y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x68), y, colorIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4101,17 +4101,17 @@ static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData * data
|
|||||||
u8 type = data->tradeType;
|
u8 type = data->tradeType;
|
||||||
u8 level = data->tradeLevel;
|
u8 level = data->tradeLevel;
|
||||||
|
|
||||||
PrintUnionRoomText(windowId, 1, playerName, 8, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, playerName, 8, y, colorIdx);
|
||||||
if (species == SPECIES_EGG)
|
if (species == SPECIES_EGG)
|
||||||
{
|
{
|
||||||
PrintUnionRoomText(windowId, 1, sText_EggTrade, 68, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, sText_EggTrade, 68, y, colorIdx);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BlitMenuInfoIcon(windowId, type + 1, 68, y);
|
BlitMenuInfoIcon(windowId, type + 1, 68, y);
|
||||||
PrintUnionRoomText(windowId, 1, gSpeciesNames[species], 118, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, gSpeciesNames[species], 118, y, colorIdx);
|
||||||
ConvertIntToDecimalStringN(levelStr, level, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(levelStr, level, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
PrintUnionRoomText(windowId, 1, levelStr, 198, y, colorIdx);
|
PrintUnionRoomText(windowId, FONT_NORMAL, levelStr, 198, y, colorIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user