mirror of
https://github.com/pret/pokeemerald.git
synced 2026-08-24 11:10:48 -05:00
37/654
This commit is contained in:
4
Makefile
4
Makefile
@@ -446,7 +446,9 @@ $(ROM): $(ELF)
|
||||
modern: all
|
||||
|
||||
# "friendly" target names for convenience sake
|
||||
french: ; @$(MAKE) GAME_LANGUAGE=FRENCH
|
||||
english: ; @$(MAKE) GAME_LANGUAGE=ENGLISH
|
||||
french: ; @$(MAKE) GAME_LANGUAGE=FRENCH
|
||||
compare_english: ; @$(MAKE) GAME_LANGUAGE=ENGLISH COMPARE=1
|
||||
compare_french: ; @$(MAKE) GAME_LANGUAGE=FRENCH COMPARE=1
|
||||
|
||||
libagbsyscall:
|
||||
|
||||
@@ -59,6 +59,9 @@ void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm);
|
||||
u8 GetFrontierTrainerFrontSpriteId(u16 trainerId);
|
||||
u8 GetFrontierOpponentClass(u16 trainerId);
|
||||
void GetFrontierTrainerName(u8 *dst, u16 trainerId);
|
||||
#if FRENCH
|
||||
bool8 IsFrontierTrainerFemale(u16 trainerId);
|
||||
#endif
|
||||
void FillFrontierTrainerParty(u8 monsCount);
|
||||
void FillFrontierTrainersParties(u8 monsCount);
|
||||
u16 GetRandomFrontierMonFromSet(u16 trainerId);
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
// printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
|
||||
// would normally use AGBPrint() and AGBPrintf().
|
||||
|
||||
// Using English as default.
|
||||
#if !defined(ENGLISH) && !defined(FRENCH)
|
||||
#define ENGLISH 1
|
||||
#endif
|
||||
|
||||
#ifdef ENGLISH
|
||||
#define UNITS_IMPERIAL
|
||||
#else
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define BATTLE_TOWER_FUNC_TRY_CLOSE_LINK 13
|
||||
#define BATTLE_TOWER_FUNC_SET_PARTNER_GFX 14
|
||||
#define BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA 15
|
||||
#define BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO2 16 // French version only
|
||||
|
||||
#define TOWER_DATA_WIN_STREAK 1
|
||||
#define TOWER_DATA_WIN_STREAK_ACTIVE 2
|
||||
|
||||
@@ -27,7 +27,12 @@
|
||||
#define NUM_LANGUAGES 7
|
||||
|
||||
#define GAME_VERSION (VERSION_EMERALD)
|
||||
|
||||
#if ENGLISH
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
#elif FRENCH
|
||||
#define GAME_LANGUAGE (LANGUAGE_FRENCH)
|
||||
#endif
|
||||
|
||||
// party sizes
|
||||
#define PARTY_SIZE 6
|
||||
|
||||
@@ -126,6 +126,9 @@ u8 * CopyEasyChatWord(u8 *dest, u16 word);
|
||||
bool32 IsEasyChatAnswerUnlocked(int word);
|
||||
void InitializeEasyChatWordArray(u16 *words, u16 length);
|
||||
u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows);
|
||||
#if FRENCH
|
||||
u8 *UnusedConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows);
|
||||
#endif
|
||||
bool8 IsBardWordInvalid(u16 word);
|
||||
u16 GetRandomEasyChatWordFromGroup(u16 group);
|
||||
u16 GetNewHipsterPhraseToTeach(void);
|
||||
|
||||
@@ -20,5 +20,9 @@ void ConvertInternationalPlayerNameStripChar(u8 *, u8);
|
||||
void ConvertInternationalContestantName(u8 *);
|
||||
int GetNicknameLanguage(u8 *);
|
||||
void FillWindowTilesByRow(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows);
|
||||
#if FRENCH
|
||||
u8 *StringAppendWithPlaceholder(u8 *dest, const u8 *src, u8 *placeholderStr);
|
||||
const u8 *GetTrainerClassNameGenderSpecific(s32 trainerClassId, u32 trainerGender, const u8 *trainerName);
|
||||
#endif
|
||||
|
||||
#endif // GUARD_INTERNATIONAL_STRING_UTIL_H
|
||||
|
||||
@@ -213,6 +213,9 @@ extern const u8 gMenuText_Walk[];
|
||||
extern const u8 gMenuText_Deselect[];
|
||||
extern const u8 gMenuText_CheckTag[];
|
||||
extern const u8 gMenuText_Confirm[];
|
||||
#if FRENCH
|
||||
extern const u8 gMenuText_Confirm2[];
|
||||
#endif
|
||||
extern const u8 gMenuText_Show[];
|
||||
extern const u8 gMenuText_Give2[];
|
||||
|
||||
@@ -527,6 +530,13 @@ extern const u8 gText_NumberClear01[];
|
||||
extern const u8 gText_5MarksPokemon[];
|
||||
extern const u8 gText_UnkHeight[];
|
||||
extern const u8 gText_UnkWeight[];
|
||||
#if FRENCH
|
||||
extern const u8 gText_EmptyPkmnCategory[];
|
||||
extern const u8 gText_EmptyHeight[];
|
||||
extern const u8 gText_EmptyWeight[];
|
||||
extern const u8 gText_EmptyPokedexInfo1[];
|
||||
extern const u8 gText_EmptyPokedexInfo2[];
|
||||
#endif
|
||||
extern const u8 gText_HTHeight[];
|
||||
extern const u8 gText_WTWeight[];
|
||||
extern const u8 gText_SearchingPleaseWait[];
|
||||
@@ -2482,7 +2492,12 @@ extern const u8 gText_MrStoneMatchCallDesc[];
|
||||
extern const u8 gText_MrStoneMatchCallName[];
|
||||
extern const u8 gText_StevenMatchCallDesc[];
|
||||
extern const u8 gText_StevenMatchCallName[];
|
||||
#if ENGLISH
|
||||
extern const u8 gText_MayBrendanMatchCallDesc[];
|
||||
#elif FRENCH
|
||||
extern const u8 gText_BrendanMatchCallDesc[];
|
||||
extern const u8 gText_MayMatchCallDesc[];
|
||||
#endif
|
||||
extern const u8 gText_WallyMatchCallDesc[];
|
||||
extern const u8 gText_NormanMatchCallDesc[];
|
||||
extern const u8 gText_NormanMatchCallName[];
|
||||
@@ -3021,4 +3036,10 @@ extern const u8 gText_PkmnForSwap[];
|
||||
extern const u8 gText_SamePkmnInPartyAlready[];
|
||||
extern const u8 gText_Cancel3[];
|
||||
|
||||
#if FRENCH
|
||||
extern const u8 gText_Eleve[];
|
||||
extern const u8 gText_Dresseur[];
|
||||
extern const u8 gText_Champion[];
|
||||
#endif
|
||||
|
||||
#endif // GUARD_STRINGS_H
|
||||
|
||||
@@ -694,6 +694,7 @@ SECTIONS {
|
||||
src/battle_transition_frontier.o(.rodata);
|
||||
src/text_input_strings.o(.rodata);
|
||||
src/fonts.o(.rodata);
|
||||
src/international_string_util.o(.rodata);
|
||||
src/mystery_event_msg.o(.rodata);
|
||||
data/mystery_gift.o(.rodata);
|
||||
src/m4a_tables.o(.rodata);
|
||||
|
||||
@@ -165,7 +165,11 @@ static const struct WindowTemplate sStandardBattleWindowTemplates[] =
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
#if ENGLISH
|
||||
.width = 26,
|
||||
#elif FRENCH
|
||||
.width = 27,
|
||||
#endif
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
@@ -271,9 +275,15 @@ static const struct WindowTemplate sStandardBattleWindowTemplates[] =
|
||||
},
|
||||
[B_WIN_YESNO] = {
|
||||
.bg = 0,
|
||||
#if ENGLISH
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
.width = 3,
|
||||
#elif FRENCH
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 9,
|
||||
.width = 4,
|
||||
#endif
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
@@ -386,7 +396,11 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
#if ENGLISH
|
||||
.width = 26,
|
||||
#elif FRENCH
|
||||
.width = 27,
|
||||
#endif
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
@@ -492,9 +506,15 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
||||
},
|
||||
[B_WIN_YESNO] = {
|
||||
.bg = 0,
|
||||
#if ENGLISH
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
.width = 3,
|
||||
#elif FRENCH
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 9,
|
||||
.width = 4,
|
||||
#endif
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
@@ -555,9 +575,15 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
||||
},
|
||||
[ARENA_WIN_SKILL] = {
|
||||
.bg = 0,
|
||||
#if ENGLISH
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 6,
|
||||
.width = 6,
|
||||
#elif FRENCH
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 6,
|
||||
.width = 8,
|
||||
#endif
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0130,
|
||||
@@ -569,7 +595,11 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
#if ENGLISH
|
||||
.baseBlock = 0x013c,
|
||||
#elif FRENCH
|
||||
.baseBlock = 0x0140,
|
||||
#endif
|
||||
},
|
||||
[ARENA_WIN_JUDGEMENT_TITLE] = {
|
||||
.bg = 0,
|
||||
@@ -578,13 +608,21 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
|
||||
.width = 14,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
#if ENGLISH
|
||||
.baseBlock = 0x0148,
|
||||
#elif FRENCH
|
||||
.baseBlock = 0x014C,
|
||||
#endif
|
||||
},
|
||||
[ARENA_WIN_JUDGEMENT_TEXT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
#if ENGLISH
|
||||
.width = 26,
|
||||
#elif FRENCH
|
||||
.width = 27,
|
||||
#endif
|
||||
.height = 4,
|
||||
.paletteNum = 7,
|
||||
.baseBlock = 0x0090,
|
||||
|
||||
@@ -1435,7 +1435,11 @@ static void PlayerHandleYesNoInput(void)
|
||||
}
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#endif
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
if (gMultiUsePlayerCursor != 0)
|
||||
@@ -1447,7 +1451,11 @@ static void PlayerHandleYesNoInput(void)
|
||||
}
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#endif
|
||||
PlaySE(SE_SELECT);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
@@ -2592,7 +2600,11 @@ static void PlayerHandleYesNoBox(void)
|
||||
{
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gMultiUsePlayerCursor = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
|
||||
@@ -4258,8 +4258,14 @@ static u8 Task_GetInfoCardInput(u8 taskId)
|
||||
|
||||
static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
{
|
||||
#if ENGLISH
|
||||
struct TextPrinterTemplate textPrinter;
|
||||
int i, j, k;
|
||||
#elif FRENCH
|
||||
const u8 *trClassName;
|
||||
struct TextPrinterTemplate textPrinter;
|
||||
int i, j, k, trGender;
|
||||
#endif
|
||||
int trainerId = 0;
|
||||
u8 nature = 0;
|
||||
int arrId = 0;
|
||||
@@ -4341,6 +4347,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
|
||||
// Get class and trainer name
|
||||
i = 0;
|
||||
#if ENGLISH
|
||||
if (trainerId == TRAINER_PLAYER)
|
||||
j = gFacilityClassToTrainerClass[FACILITY_CLASS_BRENDAN];
|
||||
else if (trainerId == TRAINER_FRONTIER_BRAIN)
|
||||
@@ -4350,6 +4357,18 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
|
||||
for (;gTrainerClassNames[j][i] != EOS; i++)
|
||||
gStringVar1[i] = gTrainerClassNames[j][i];
|
||||
#elif FRENCH
|
||||
if (trainerId == TRAINER_PLAYER)
|
||||
j = gFacilityClassToTrainerClass[FACILITY_CLASS_BRENDAN], trGender = gSaveBlock2Ptr->playerGender;
|
||||
else if (trainerId == TRAINER_FRONTIER_BRAIN)
|
||||
j = GetDomeBrainTrainerClass(), trGender = -1;
|
||||
else
|
||||
j = GetFrontierOpponentClass(trainerId), trGender = IsFrontierTrainerFemale(trainerId);
|
||||
|
||||
trClassName = GetTrainerClassNameGenderSpecific(j, trGender, NULL);
|
||||
for (; *trClassName != EOS; trClassName++, i++)
|
||||
gStringVar1[i] = *trClassName;
|
||||
#endif
|
||||
gStringVar1[i] = CHAR_SPACE;
|
||||
gStringVar1[i + 1] = EOS;
|
||||
|
||||
|
||||
@@ -2106,10 +2106,10 @@ static void SpriteCB_CloseChosenMonPics(struct Sprite *sprite)
|
||||
|
||||
// Task data for Select_Task_OpenChosenMonPics, Select_Task_CloseChosenMonPics, Task_CloseMonPic, and Task_OpenMonPic
|
||||
#define tWinLeft data[3]
|
||||
#ifndef UBFIX
|
||||
#define tWinRight data[24] // UB: Typo? Likely meant data[4], 24 is out of bounds
|
||||
#else
|
||||
#if FRENCH || defined(UBFIX)
|
||||
#define tWinRight data[4]
|
||||
#else
|
||||
#define tWinRight data[24] // UB: Typo? Likely meant data[4], 24 is out of bounds
|
||||
#endif
|
||||
#define tWinTop data[5]
|
||||
#define tWinBottom data[8]
|
||||
|
||||
@@ -433,6 +433,7 @@ const u8 gTypeEffectiveness[336] =
|
||||
|
||||
const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1] =
|
||||
{
|
||||
#if ENGLISH
|
||||
[TYPE_NORMAL] = _("NORMAL"),
|
||||
[TYPE_FIGHTING] = _("FIGHT"),
|
||||
[TYPE_FLYING] = _("FLYING"),
|
||||
@@ -451,6 +452,26 @@ const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1] =
|
||||
[TYPE_ICE] = _("ICE"),
|
||||
[TYPE_DRAGON] = _("DRAGON"),
|
||||
[TYPE_DARK] = _("DARK"),
|
||||
#elif FRENCH
|
||||
[TYPE_NORMAL] = _("NORMAL"),
|
||||
[TYPE_FIGHTING] = _("COMBAT"),
|
||||
[TYPE_FLYING] = _("VOL"),
|
||||
[TYPE_POISON] = _("POISON"),
|
||||
[TYPE_GROUND] = _("SOL"),
|
||||
[TYPE_ROCK] = _("ROCHE"),
|
||||
[TYPE_BUG] = _("INSECT"),
|
||||
[TYPE_GHOST] = _("SPECTR"),
|
||||
[TYPE_STEEL] = _("ACIER"),
|
||||
[TYPE_MYSTERY] = _("???"),
|
||||
[TYPE_FIRE] = _("FEU"),
|
||||
[TYPE_WATER] = _("EAU"),
|
||||
[TYPE_GRASS] = _("PLANTE"),
|
||||
[TYPE_ELECTRIC] = _("ELECTR"),
|
||||
[TYPE_PSYCHIC] = _("PSY"),
|
||||
[TYPE_ICE] = _("GLACE"),
|
||||
[TYPE_DRAGON] = _("DRAGON"),
|
||||
[TYPE_DARK] = _("TENEBR"),
|
||||
#endif
|
||||
};
|
||||
|
||||
// This is a factor in how much money you get for beating a trainer.
|
||||
@@ -1068,7 +1089,7 @@ static void CB2_HandleStartBattle(void)
|
||||
// Recv Pokémon 5-6
|
||||
ResetBlockReceivedFlags();
|
||||
memcpy(&gEnemyParty[4], gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2);
|
||||
|
||||
|
||||
TryCorrectShedinjaLanguage(&gEnemyParty[0]);
|
||||
TryCorrectShedinjaLanguage(&gEnemyParty[1]);
|
||||
TryCorrectShedinjaLanguage(&gEnemyParty[2]);
|
||||
@@ -2489,7 +2510,11 @@ static void AskRecordBattle(void)
|
||||
case STATE_PRINT_YES_NO:
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
@@ -2524,8 +2549,12 @@ static void AskRecordBattle(void)
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
// Selected Yes
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
// Selected Yes
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#endif
|
||||
gBattleCommunication[1] = MoveRecordedBattleToSaveData();
|
||||
gBattleCommunication[MULTIUSE_STATE] = STATE_RECORD_YES;
|
||||
}
|
||||
@@ -2544,7 +2573,11 @@ static void AskRecordBattle(void)
|
||||
case STATE_RECORD_NO:
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
#endif
|
||||
if (gMain.anyLinkBattlerHasFrontierPass)
|
||||
{
|
||||
// Other battlers may be recording, wait for them
|
||||
@@ -2985,7 +3018,7 @@ static void SpriteCB_TrainerThrowObject_Main(struct Sprite *sprite)
|
||||
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)
|
||||
void SpriteCB_TrainerThrowObject(struct Sprite *sprite)
|
||||
{
|
||||
|
||||
@@ -420,6 +420,7 @@ static const struct PikeRoomNPC sNPCTable[] =
|
||||
|
||||
static const u16 sNPCSpeeches[][EASY_CHAT_BATTLE_WORDS_COUNT] =
|
||||
{
|
||||
#if ENGLISH
|
||||
{EC_WORD_I_AM, EC_WORD_LOST, EC_WORD_I, EC_WORD_NEED, EC_WORD_A, EC_MOVE2(HELPING_HAND)},
|
||||
{EC_WORD_I_VE, EC_WORD_NO, EC_WORD_SENSE, EC_WORD_OF, EC_WORD_WHERE, EC_WORD_I_AM},
|
||||
{EC_WORD_WHAT, EC_WORD_SHOULD, EC_WORD_I, EC_WORD_DO, EC_WORD_NOW, EC_WORD_QUES},
|
||||
@@ -462,6 +463,50 @@ static const u16 sNPCSpeeches[][EASY_CHAT_BATTLE_WORDS_COUNT] =
|
||||
{EC_WORD_MY, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_STRONG, EC_WORD_TO, EC_WORD_POISON},
|
||||
{EC_WORD_LALALA, EC_WORD_LALALA, EC_WORD_EXCL, EC_WORD_I_AM, EC_WORD_AWESOME, EC_WORD_LALALA},
|
||||
{EC_MOVE2(TOXIC), EC_WORD_IS, EC_WORD_A, EC_WORD_TERRIBLE, EC_WORD_THING, EC_WORD_ISN_T_IT_QUES},
|
||||
#elif FRENCH
|
||||
{EC_WORD_I_AM, EC_WORD_LOST, EC_WORD_GIVE_ME, EC_WORD_A, EC_MOVE2(HELPING_HAND), EC_WORD_EXCL},
|
||||
{EC_WORD_HIM, EC_WORD_ALSO, EC_WORD_YOU_RE, EC_EMPTY_WORD, EC_WORD_LOST, EC_WORD_QUES},
|
||||
{EC_WORD_THAT, EC_WORD_MAKE, EC_WORD_NOW, EC_WORD_QUES, EC_EMPTY_WORD, EC_EMPTY_WORD},
|
||||
{EC_WORD_IT_S, EC_WORD_RECOMMEND, EC_WORD_EXCITING, EC_WORD_FOR, EC_WORD_ME, EC_WORD_EXCL},
|
||||
{EC_WORD_WHOM, EC_WORD_DIDN_T, EC_WORD_AN, EC_EMPTY_WORD, EC_WORD_MISTAKE, EC_WORD_QUES},
|
||||
{EC_WORD_IT_S, EC_WORD_REALLY, EC_WORD_RECOMMEND, EC_WORD_MEAN, EC_WORD_THERE, EC_WORD_EXCL},
|
||||
{EC_WORD_NEED, EC_EMPTY_WORD, EC_WORD_WONDER, EC_WORD_AN, EC_WORD_NAP, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_SOMEONE, EC_WORD_EVER, EC_WORD_A_LOT, EC_WORD_THIS, EC_WORD_CHALLENGE, EC_WORD_EXCL},
|
||||
{EC_WORD_LOOKS, EC_EMPTY_WORD, EC_WORD_WILL, EC_EMPTY_WORD, EC_WORD_WIN, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_READY, EC_WORD_EVEN_SO, EC_WORD_GIVE_UP, EC_WORD_MY, EC_WORD_SMALL, EC_WORD_QUES},
|
||||
{EC_WORD_OH, EC_WORD_ELLIPSIS, EC_WORD_WHO, EC_WORD_ELLIPSIS, EC_WORD_DOES, EC_WORD_QUES},
|
||||
{EC_WORD_I_AM, EC_WORD_THERE, EC_WORD_SINCE, EC_WORD_MOOD, EC_WORD_DAYS, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_I, EC_WORD_THINKS, EC_WORD_THAT, EC_WORD_WILL, EC_WORD_GIVE_UP, EC_WORD_EXCL},
|
||||
{EC_WORD_THAT, EC_EMPTY_WORD, EC_WORD_MAKE, EC_WORD_QUES, EC_EMPTY_WORD, EC_EMPTY_WORD},
|
||||
{EC_WORD_I, EC_WORD_COULD, EC_WORD_WIN, EC_WORD_WITH, EC_WORD_FEELING, EC_MOVE(SHEER_COLD)},
|
||||
{EC_WORD_I, EC_WORD_ON, EC_WORD_LISTEN, EC_WORD_OF, EC_WORD_COOL, EC_WORD_EXCL},
|
||||
{EC_WORD_FIGHT, EC_WORD_ELLIPSIS, EC_WORD_IT_S, EC_WORD_REALLY, EC_WORD_MEAN, EC_WORD_EXCL},
|
||||
{EC_WORD_TODAY, EC_WORD_ELLIPSIS, EC_WORD_I_AM, EC_EMPTY_WORD, EC_WORD_WEAK, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_THE, EC_WORD_TIME, EC_WORD_IS, EC_EMPTY_WORD, EC_WORD_GREAT, EC_WORD_EXCL_EXCL},
|
||||
{EC_WORD_NOT, EC_WORD_LAY, EC_WORD_A, EC_WORD_OTHER, EC_WORD_TRAINER, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_I, EC_WORD_THINKS, EC_WORD_THAT, EC_WORD_IT_S, EC_WORD_EVEN_SO, EC_WORD_LEFT},
|
||||
{EC_WORD_IT_S, EC_EMPTY_WORD, EC_WORD_SOON, EC_WORD_FEELING, EC_WORD_END, EC_WORD_QUES},
|
||||
{EC_WORD_IT_S, EC_WORD_REALLY, EC_WORD_RECOMMEND, EC_EMPTY_WORD, EC_WORD_EASY, EC_WORD_EXCL},
|
||||
{EC_WORD_APOLOGIZE, EC_WORD_I, EC_MOVE2(TACKLE), EC_WORD_DAUGHTER, EC_MOVE(FOCUS_ENERGY), EC_WORD_EXCL},
|
||||
{EC_WORD_SURRENDER, EC_WORD_QUES, EC_WORD_I, EC_EMPTY_WORD, EC_WORD_REFUSE, EC_WORD_EXCL},
|
||||
{EC_WORD_I_AM, EC_WORD_A_LOT, EC_WORD_TOO_WEAK, EC_EMPTY_WORD, EC_WORD_TODAY, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_I, EC_WORD_ISN_T, EC_WORD_COULD, EC_WORD_PLUS, EC_WORD_WHO_WAS, EC_WORD_WHEN_I_WIN},
|
||||
{EC_WORD_A, EC_WORD_TRAINER, EC_WORD_FOREVER, EC_EMPTY_WORD, EC_WORD_MISS, EC_WORD_OTHER},
|
||||
{EC_WORD_CASE, EC_WORD_POKEMON, EC_WORD_STEEL, EC_WORD_ELLIPSIS, EC_WORD_IT_S, EC_WORD_AWESOME},
|
||||
{EC_WORD_THERE, EC_WORD_ELLIPSIS, EC_WORD_I_AM, EC_WORD_THE, EC_WORD_BEST, EC_WORD_TRAINER},
|
||||
{EC_WORD_IT_S, EC_WORD_HARD, EC_WORD_BUT, EC_WORD_IT_S, EC_WORD_ENTERTAINING, EC_WORD_EXCL_EXCL},
|
||||
{EC_WORD_AND, EC_EMPTY_WORD, EC_WORD_FOREVER, EC_WORD_QUES, EC_EMPTY_WORD, EC_EMPTY_WORD},
|
||||
{EC_WORD_I_AM, EC_WORD_RATHER, EC_WORD_CONFUSED, EC_WORD_ELLIPSIS, EC_EMPTY_WORD, EC_EMPTY_WORD},
|
||||
{EC_WORD_GOOD_BYE, EC_WORD_ELLIPSIS, EC_WORD_WILL, EC_WORD_EVEN_SO, EC_WORD_FEELING, EC_WORD_HOME},
|
||||
{EC_WORD_IT_S, EC_WORD_REALLY, EC_WORD_NO_MATCH, EC_EMPTY_WORD, EC_WORD_THERE, EC_WORD_EXCL},
|
||||
{EC_WORD_A, EC_WORD_FIGHTING, EC_WORD_IT_S, EC_WORD_PROBABLY, EC_WORD_EXCITING, EC_WORD_EXCL},
|
||||
{EC_WORD_I_AM, EC_WORD_UP, EC_WORD_THAT, EC_WORD_IT_S, EC_WORD_EVEN_SO, EC_WORD_RIGHT},
|
||||
{EC_WORD_NO, EC_WORD_EXCL, EC_WORD_IT_S, EC_WORD_NOT, EC_WORD_JUST, EC_WORD_ELLIPSIS},
|
||||
{EC_WORD_WHO_IS, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_VERY, EC_WORD_NEVER, EC_WORD_EXCL},
|
||||
{EC_WORD_WHO_IS, EC_WORD_POKEMON, EC_WORD_ARE, EC_WORD_VERSUS, EC_WORD_THE, EC_WORD_POISON},
|
||||
{EC_WORD_LALALA, EC_WORD_LALALA, EC_WORD_I_AM, EC_WORD_THIN, EC_WORD_LALALA, EC_WORD_EXCL},
|
||||
{EC_MOVE2(TOXIC), EC_WORD_IT_S, EC_WORD_REALLY, EC_EMPTY_WORD, EC_WORD_AWFUL, EC_WORD_EXCL},
|
||||
#endif
|
||||
};
|
||||
|
||||
// Table duplicated from frontier_util, only Battle Pike entry used
|
||||
|
||||
@@ -5369,7 +5369,11 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
switch (gBattleScripting.learnMoveState)
|
||||
{
|
||||
case 0:
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
@@ -5395,7 +5399,11 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[1] == 0)
|
||||
{
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gBattleScripting.learnMoveState++;
|
||||
}
|
||||
@@ -5466,7 +5474,11 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
gBattlescriptCurrInstr += 5;
|
||||
break;
|
||||
case 6:
|
||||
@@ -5483,7 +5495,11 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
||||
switch (gBattleScripting.learnMoveState)
|
||||
{
|
||||
case 0:
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
@@ -5513,13 +5529,21 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
||||
else
|
||||
gBattlescriptCurrInstr += 5;
|
||||
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -5779,7 +5803,11 @@ static void Cmd_yesnobox(void)
|
||||
switch (gBattleCommunication[0])
|
||||
{
|
||||
case 0:
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gBattleCommunication[0]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
@@ -5804,13 +5832,21 @@ static void Cmd_yesnobox(void)
|
||||
{
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
PlaySE(SE_SELECT);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, WINDOW_CLEAR);
|
||||
#endif
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
break;
|
||||
@@ -10096,8 +10132,11 @@ void BattleCreateYesNoCursorAt(u8 cursorPosition)
|
||||
u16 src[2];
|
||||
src[0] = 1;
|
||||
src[1] = 2;
|
||||
|
||||
#if ENGLISH
|
||||
CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x19, 9 + (2 * cursorPosition), 1, 2, 0x11);
|
||||
#elif FRENCH
|
||||
CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x18, 9 + (2 * cursorPosition), 1, 2, 0x11);
|
||||
#endif
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
@@ -10107,7 +10146,11 @@ void BattleDestroyYesNoCursorAt(u8 cursorPosition)
|
||||
src[0] = 0x1016;
|
||||
src[1] = 0x1016;
|
||||
|
||||
#if ENGLISH
|
||||
CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x19, 9 + (2 * cursorPosition), 1, 2, 0x11);
|
||||
#elif FRENCH
|
||||
CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x18, 9 + (2 * cursorPosition), 1, 2, 0x11);
|
||||
#endif
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
@@ -10116,7 +10159,11 @@ static void Cmd_trygivecaughtmonnick(void)
|
||||
switch (gBattleCommunication[MULTIUSE_STATE])
|
||||
{
|
||||
case 0:
|
||||
#if ENGLISH
|
||||
HandleBattleWindow(24, 8, 29, 13, 0);
|
||||
#elif FRENCH
|
||||
HandleBattleWindow(23, 8, 29, 13, 0);
|
||||
#endif
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
|
||||
@@ -390,7 +390,7 @@ static void GenerateOpponentMons(void)
|
||||
while (i != FRONTIER_PARTY_SIZE)
|
||||
{
|
||||
sRandMonId = monSet[Random() % numMons];
|
||||
|
||||
|
||||
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
||||
for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,9 @@ static void SetTowerBattleWon(void);
|
||||
static void AwardBattleTowerRibbons(void);
|
||||
static void SaveTowerChallenge(void);
|
||||
static void GetOpponentIntroSpeech(void);
|
||||
#if FRENCH
|
||||
static void GetOpponentIntroSpeech2(void);
|
||||
#endif
|
||||
static void BattleTowerNop1(void);
|
||||
static void BattleTowerNop2(void);
|
||||
static void LoadMultiPartnerCandidatesData(void);
|
||||
@@ -818,6 +821,9 @@ static void (* const sBattleTowerFuncs[])(void) =
|
||||
[BATTLE_TOWER_FUNC_TRY_CLOSE_LINK] = TowerTryCloseLink,
|
||||
[BATTLE_TOWER_FUNC_SET_PARTNER_GFX] = SetMultiPartnerGfx,
|
||||
[BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA] = SetTowerInterviewData,
|
||||
#if FRENCH
|
||||
[BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO2] = GetOpponentIntroSpeech2,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u32 sWinStreakFlags[][2] =
|
||||
@@ -890,12 +896,20 @@ static const u8 sBattleTowerPartySizes[FRONTIER_MODE_COUNT] =
|
||||
|
||||
static const u16 sRecordTrainerSpeechWon[] =
|
||||
{
|
||||
#if ENGLISH
|
||||
EC_WORD_YAY, EC_WORD_YAY, EC_WORD_EXCL_EXCL, EC_WORD_I_VE, EC_WORD_WON, EC_WORD_EXCL_EXCL
|
||||
#elif FRENCH
|
||||
EC_WORD_YAY, EC_WORD_EXCL_EXCL, EC_WORD_I_VE, EC_EMPTY_WORD, EC_WORD_WINS, EC_WORD_EXCL_EXCL
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sRecordTrainerSpeechLost[] =
|
||||
{
|
||||
#if ENGLISH
|
||||
EC_WORD_TOO, EC_WORD_BAD, EC_WORD_ELLIPSIS, EC_WORD_WE, EC_WORD_LOST, EC_WORD_ELLIPSIS
|
||||
#elif FRENCH
|
||||
EC_WORD_SLIMY, EC_WORD_ELLIPSIS, EC_WORD_TO_US, EC_WORD_EVEN_SO, EC_WORD_LOST, EC_WORD_EXCL
|
||||
#endif
|
||||
};
|
||||
|
||||
// code
|
||||
@@ -1574,7 +1588,11 @@ void GetFrontierTrainerName(u8 *dst, u16 trainerId)
|
||||
dst[i] = EOS;
|
||||
}
|
||||
|
||||
#if ENGLISH
|
||||
static bool8 IsFrontierTrainerFemale(u16 trainerId)
|
||||
#elif FRENCH
|
||||
bool8 IsFrontierTrainerFemale(u16 trainerId)
|
||||
#endif
|
||||
{
|
||||
u32 i;
|
||||
u8 facilityClass;
|
||||
@@ -1918,6 +1936,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
|
||||
void FrontierSpeechToString(const u16 *words)
|
||||
{
|
||||
#if ENGLISH
|
||||
ConvertEasyChatWordsToString(gStringVar4, words, 3, 2);
|
||||
if (GetStringWidth(FONT_NORMAL, gStringVar4, -1) > 204u)
|
||||
{
|
||||
@@ -1931,6 +1950,9 @@ void FrontierSpeechToString(const u16 *words)
|
||||
|
||||
gStringVar4[i] = CHAR_PROMPT_SCROLL;
|
||||
}
|
||||
#elif FRENCH
|
||||
UnusedConvertEasyChatWordsToString(gStringVar4, words, 2, 3);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void GetOpponentIntroSpeech(void)
|
||||
@@ -1953,6 +1975,45 @@ static void GetOpponentIntroSpeech(void)
|
||||
BufferApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
}
|
||||
|
||||
#if FRENCH
|
||||
void FrontierSpeechToString2(const u16 *words)
|
||||
{
|
||||
ConvertEasyChatWordsToString(gStringVar4, words, 3, 2);
|
||||
if (GetStringWidth(FONT_NORMAL, gStringVar4, -1) > 204u)
|
||||
{
|
||||
s32 i = 0;
|
||||
|
||||
ConvertEasyChatWordsToString(gStringVar4, words, 2, 3);
|
||||
while (gStringVar4[i++] != CHAR_NEWLINE)
|
||||
;
|
||||
while (gStringVar4[i] != CHAR_NEWLINE)
|
||||
i++;
|
||||
|
||||
gStringVar4[i] = CHAR_PROMPT_SCROLL;
|
||||
}
|
||||
}
|
||||
|
||||
static void GetOpponentIntroSpeech2(void)
|
||||
{
|
||||
u16 trainerId;
|
||||
SetFacilityPtrsGetLevel();
|
||||
|
||||
if (gSpecialVar_0x8005)
|
||||
trainerId = gTrainerBattleOpponent_B;
|
||||
else
|
||||
trainerId = gTrainerBattleOpponent_A;
|
||||
|
||||
if (trainerId == TRAINER_EREADER)
|
||||
FrontierSpeechToString2(gSaveBlock2Ptr->frontier.ereaderTrainer.greeting);
|
||||
else if (trainerId < FRONTIER_TRAINERS_COUNT)
|
||||
FrontierSpeechToString2(gFacilityTrainers[trainerId].speechBefore);
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
FrontierSpeechToString2(gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].greeting);
|
||||
else
|
||||
BufferApprenticeChallengeText(trainerId - TRAINER_RECORD_MIXING_APPRENTICE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void HandleSpecialTrainerBattleEnd(void)
|
||||
{
|
||||
s32 i;
|
||||
@@ -2678,6 +2739,9 @@ static void SetTowerInterviewData(void)
|
||||
|
||||
GetFrontierTrainerName(text, gTrainerBattleOpponent_A);
|
||||
StripExtCtrlCodes(text);
|
||||
#if FRENCH
|
||||
text[7] = EOS;
|
||||
#endif
|
||||
StringCopy(gSaveBlock2Ptr->frontier.towerInterview.opponentName, text);
|
||||
GetBattleTowerTrainerLanguage(&gSaveBlock2Ptr->frontier.towerInterview.opponentLanguage, gTrainerBattleOpponent_A);
|
||||
gSaveBlock2Ptr->frontier.towerInterview.opponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[1]], MON_DATA_SPECIES, NULL);
|
||||
|
||||
@@ -679,15 +679,27 @@ static const u8 sAlphabetGroupIdMap[NUM_ALPHABET_ROWS][NUM_ALPHABET_COLUMNS] = {
|
||||
};
|
||||
|
||||
static const u16 sMysteryGiftPhrase[NUM_QUESTIONNAIRE_WORDS] = {
|
||||
#if ENGLISH
|
||||
EC_WORD_LINK,
|
||||
EC_WORD_TOGETHER,
|
||||
EC_WORD_WITH,
|
||||
EC_WORD_ALL,
|
||||
#elif FRENCH
|
||||
EC_WORD_LINK,
|
||||
EC_WORD_WITH,
|
||||
EC_WORD_CASE,
|
||||
EC_WORD_TRAINER,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sBerryMasterWifePhrases[][2] = {
|
||||
#if ENGLISH
|
||||
[PHRASE_GREAT_BATTLE - 1] = {EC_WORD_GREAT, EC_WORD_BATTLE},
|
||||
[PHRASE_CHALLENGE_CONTEST - 1] = {EC_WORD_CHALLENGE, EC_WORD_CONTEST},
|
||||
#elif FRENCH
|
||||
[PHRASE_GREAT_BATTLE - 1] = {EC_WORD_GREAT, EC_WORD_FIGHTING},
|
||||
[PHRASE_CHALLENGE_CONTEST - 1] = {EC_WORD_CONTEST, EC_WORD_CHALLENGE},
|
||||
#endif
|
||||
[PHRASE_OVERWHELMING_LATIAS - 1] = {EC_WORD_OVERWHELMING, EC_POKEMON(LATIAS)},
|
||||
[PHRASE_COOL_LATIOS - 1] = {EC_WORD_COOL, EC_POKEMON(LATIOS)},
|
||||
[PHRASE_SUPER_HUSTLE - 1] = {EC_WORD_SUPER, EC_WORD_HUSTLE},
|
||||
@@ -816,9 +828,15 @@ static const struct BgTemplate sEasyChatBgTemplates[] = {
|
||||
static const struct WindowTemplate sEasyChatWindowTemplates[] = {
|
||||
{
|
||||
.bg = 1,
|
||||
#if ENGLISH
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 0,
|
||||
.width = 18,
|
||||
#elif FRENCH
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 0,
|
||||
.width = 30,
|
||||
#endif
|
||||
.height = 2,
|
||||
.paletteNum = 10,
|
||||
.baseBlock = 0x10,
|
||||
@@ -1181,8 +1199,13 @@ static const struct SpriteTemplate sSpriteTemplate_ScrollIndicator = {
|
||||
|
||||
static const u8 sFooterOptionXOffsets[NUM_FOOTER_TYPES][4] = {
|
||||
[FOOTER_NORMAL] = {16, 111, 196, 0},
|
||||
#if ENGLISH
|
||||
[FOOTER_QUIZ] = {16, 78, 130, 160},
|
||||
[FOOTER_ANSWER] = {16, 80, 134, 170},
|
||||
#elif FRENCH
|
||||
[FOOTER_QUIZ] = {16, 82, 148, 184},
|
||||
[FOOTER_ANSWER] = {16, 78, 141, 174},
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u8 *const sFooterTextOptions[NUM_FOOTER_TYPES][4] = {
|
||||
@@ -1220,37 +1243,71 @@ static const u8 *const sEasyChatGroupNamePointers[EC_NUM_GROUPS] = {
|
||||
};
|
||||
|
||||
static const u16 sDefaultProfileWords[EASY_CHAT_BATTLE_WORDS_COUNT - 2] = {
|
||||
#if ENGLISH
|
||||
EC_WORD_I_AM,
|
||||
EC_WORD_A,
|
||||
EC_WORD_POKEMON,
|
||||
EC_WORD_FRIEND,
|
||||
#elif FRENCH
|
||||
EC_WORD_ADORE,
|
||||
EC_WORD_CASE,
|
||||
EC_WORD_POKEMON,
|
||||
EC_EMPTY_WORD,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sDefaultBattleStartWords[EASY_CHAT_BATTLE_WORDS_COUNT] = {
|
||||
#if ENGLISH
|
||||
EC_WORD_ARE,
|
||||
EC_WORD_YOU,
|
||||
EC_WORD_READY,
|
||||
EC_WORD_QUES,
|
||||
EC_WORD_HERE_I_COME,
|
||||
EC_WORD_EXCL,
|
||||
#elif FRENCH
|
||||
EC_WORD_APOLOGIZE,
|
||||
EC_WORD_EXCL,
|
||||
EC_WORD_HERE_I_COME,
|
||||
EC_WORD_EXCL,
|
||||
EC_EMPTY_WORD,
|
||||
EC_EMPTY_WORD,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sDefaultBattleWonWords[EASY_CHAT_BATTLE_WORDS_COUNT] = {
|
||||
#if ENGLISH
|
||||
EC_WORD_YAY,
|
||||
EC_WORD_YAY,
|
||||
EC_WORD_EXCL_EXCL,
|
||||
EC_WORD_I_VE,
|
||||
EC_WORD_WON,
|
||||
EC_WORD_EXCL_EXCL,
|
||||
#elif FRENCH
|
||||
EC_WORD_YAY,
|
||||
EC_WORD_YAY,
|
||||
EC_WORD_I_VE,
|
||||
EC_WORD_REALLY,
|
||||
EC_WORD_WINS,
|
||||
EC_WORD_EXCL_EXCL,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sDefaultBattleLostWords[EASY_CHAT_BATTLE_WORDS_COUNT] = {
|
||||
#if ENGLISH
|
||||
EC_WORD_TOO,
|
||||
EC_WORD_BAD,
|
||||
EC_WORD_ELLIPSIS,
|
||||
EC_WORD_WE,
|
||||
EC_WORD_LOST,
|
||||
EC_WORD_ELLIPSIS,
|
||||
#elif FRENCH
|
||||
EC_WORD_IT_S,
|
||||
EC_EMPTY_WORD,
|
||||
EC_WORD_AWFUL,
|
||||
EC_WORD_ELLIPSIS,
|
||||
EC_WORD_I_VE,
|
||||
EC_WORD_LOST,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const u16 sRestrictedWordSpecies[] = {
|
||||
@@ -3927,7 +3984,11 @@ static void PrintTitle(void)
|
||||
if (!titleText)
|
||||
return;
|
||||
|
||||
#if ENGLISH
|
||||
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144);
|
||||
#elif FRENCH
|
||||
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 240);
|
||||
#endif
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
|
||||
PutWindowTilemap(0);
|
||||
@@ -4025,7 +4086,11 @@ static void AddPhraseWindow(void)
|
||||
template.width = sPhraseFrameDimensions[frameId].width;
|
||||
template.height = sPhraseFrameDimensions[frameId].height;
|
||||
template.paletteNum = 11;
|
||||
#if ENGLISH
|
||||
template.baseBlock = 0x6C;
|
||||
#elif FRENCH
|
||||
template.baseBlock = 0x84;
|
||||
#endif
|
||||
sScreenControl->windowId = AddWindow(&template);
|
||||
PutWindowTilemap(sScreenControl->windowId);
|
||||
}
|
||||
@@ -5070,7 +5135,11 @@ static void AddMainScreenButtonWindow(void)
|
||||
template.width = 28;
|
||||
template.height = 2;
|
||||
template.paletteNum = 11;
|
||||
#if ENGLISH
|
||||
template.baseBlock = 0x34;
|
||||
#elif FRENCH
|
||||
template.baseBlock = 0x4C;
|
||||
#endif
|
||||
windowId = AddWindow(&template);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
for (i = 0; i < (int)ARRAY_COUNT(sFooterTextOptions[0]); i++)
|
||||
@@ -5246,7 +5315,11 @@ u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows
|
||||
return dest;
|
||||
}
|
||||
|
||||
#if ENGLISH
|
||||
static u8 *UnusedConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows)
|
||||
#elif FRENCH
|
||||
u8 *UnusedConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows)
|
||||
#endif
|
||||
{
|
||||
u16 i, j, k;
|
||||
u16 numColumns;
|
||||
|
||||
@@ -899,7 +899,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
case MVSTATE_PRINT_YES_NO:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, 0);
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
sEvoCursorPos = 0;
|
||||
@@ -928,7 +928,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
}
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
if (sEvoCursorPos != 0)
|
||||
@@ -947,7 +947,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
// Equivalent to selecting NO
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
HandleBattleWindow(24, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
PlaySE(SE_SELECT);
|
||||
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "data.h"
|
||||
#include "international_string_util.h"
|
||||
#include "list_menu.h"
|
||||
#include "pokedex.h"
|
||||
@@ -7,6 +8,7 @@
|
||||
#include "strings.h"
|
||||
#include "text.h"
|
||||
#include "window.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern const struct PokedexEntry gPokedexEntries[];
|
||||
|
||||
@@ -89,8 +91,10 @@ int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu)
|
||||
void CopyMonCategoryText(int dexNum, u8 *dest)
|
||||
{
|
||||
u8 *str = StringCopy(dest, gPokedexEntries[dexNum].categoryName);
|
||||
#if ENGLISH
|
||||
*str = CHAR_SPACE;
|
||||
StringCopy(str + 1, gText_Pokemon);
|
||||
#endif
|
||||
}
|
||||
|
||||
u8 *GetStringClearToWidth(u8 *dest, int fontId, const u8 *str, int totalStringWidth)
|
||||
@@ -234,3 +238,53 @@ void FillWindowTilesByRow(int windowId, int columnStart, int rowStart, int numFi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if FRENCH
|
||||
u8 *StringAppendWithPlaceholder(u8 *dest, const u8 *src, u8 *placeholderStr)
|
||||
{
|
||||
u8 text[32], c;
|
||||
|
||||
StringCopyN(text, placeholderStr, 31);
|
||||
text[31] = EOS;
|
||||
placeholderStr = text;
|
||||
while ((c = *src++) != EOS)
|
||||
{
|
||||
if (c == PLACEHOLDER_BEGIN)
|
||||
{
|
||||
src++;
|
||||
dest = StringCopy(dest, placeholderStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
*dest = c;
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
*dest = EOS;
|
||||
return dest;
|
||||
}
|
||||
|
||||
const u8 gText_LevyTatia[] = _("LEVY&TATIA");
|
||||
|
||||
const u8 *GetTrainerClassNameGenderSpecific(s32 trainerClassId, u32 trainerGender, const u8 *trainerName)
|
||||
{
|
||||
switch (trainerClassId)
|
||||
{
|
||||
case TRAINER_CLASS_SCHOOL_KID:
|
||||
if (trainerGender != 0)
|
||||
return gText_Eleve; // ELEVE
|
||||
return gTrainerClassNames[trainerClassId];
|
||||
case TRAINER_CLASS_RIVAL:
|
||||
case TRAINER_CLASS_RS_PROTAG:
|
||||
if (trainerGender != 0)
|
||||
return gText_Dresseur; // DRESSEUR
|
||||
break;
|
||||
case TRAINER_CLASS_LEADER:
|
||||
if (trainerName != NULL && StringCompare(trainerName, gText_LevyTatia) == 0)
|
||||
return gText_Champion; // CHAMPION
|
||||
break;
|
||||
}
|
||||
trainerName = gTrainerClassNames[trainerClassId];
|
||||
return trainerName;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#include "match_call.h"
|
||||
#include "pokenav.h"
|
||||
#include "strings.h"
|
||||
#if FRENCH
|
||||
#include "international_string_util.h"
|
||||
#endif
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
@@ -279,7 +282,11 @@ static const struct MatchCallRival sMayMatchCallHeader =
|
||||
.type = MC_TYPE_RIVAL,
|
||||
.playerGender = MALE,
|
||||
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
|
||||
#if ENGLISH
|
||||
.desc = gText_MayBrendanMatchCallDesc,
|
||||
#elif FRENCH
|
||||
.desc = gText_MayMatchCallDesc,
|
||||
#endif
|
||||
.name = gText_ExpandedPlaceholder_May,
|
||||
.textData = sMayTextScripts
|
||||
};
|
||||
@@ -308,7 +315,11 @@ static const struct MatchCallRival sBrendanMatchCallHeader =
|
||||
.type = MC_TYPE_RIVAL,
|
||||
.playerGender = FEMALE,
|
||||
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
|
||||
#if ENGLISH
|
||||
.desc = gText_MayBrendanMatchCallDesc,
|
||||
#elif FRENCH
|
||||
.desc = gText_BrendanMatchCallDesc,
|
||||
#endif
|
||||
.name = gText_ExpandedPlaceholder_Brendan,
|
||||
.textData = sBrendanTextScripts
|
||||
};
|
||||
@@ -1088,7 +1099,11 @@ static void MatchCall_GetNameAndDesc_Birch(match_call_t matchCall, const u8 **de
|
||||
static void MatchCall_GetNameAndDescByRematchIdx(u32 idx, const u8 **desc, const u8 **name)
|
||||
{
|
||||
const struct Trainer *trainer = gTrainers + GetTrainerIdxByRematchIdx(idx);
|
||||
#if ENGLISH
|
||||
*desc = gTrainerClassNames[trainer->trainerClass];
|
||||
#elif FRENCH
|
||||
*desc = GetTrainerClassNameGenderSpecific(trainer->trainerClass, trainer->encounterMusic_gender, trainer->trainerName);
|
||||
#endif
|
||||
*name = trainer->trainerName;
|
||||
}
|
||||
|
||||
|
||||
1800
src/strings.c
1800
src/strings.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user