diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_party_menu.c | 11 | ||||
-rw-r--r-- | src/battle_setup.c | 9 | ||||
-rw-r--r-- | src/berry_tag_screen.c | 5 | ||||
-rw-r--r-- | src/coins.c | 3 | ||||
-rw-r--r-- | src/contest_painting.c | 38 | ||||
-rw-r--r-- | src/item.c | 2 | ||||
-rw-r--r-- | src/item_use.c | 18 | ||||
-rw-r--r-- | src/main_menu.c | 22 | ||||
-rw-r--r-- | src/mauville_old_man.c | 3 | ||||
-rw-r--r-- | src/menu.c | 8 | ||||
-rw-r--r-- | src/party_menu.c | 45 | ||||
-rw-r--r-- | src/player_pc.c | 9 | ||||
-rw-r--r-- | src/pokedex.c | 7 | ||||
-rw-r--r-- | src/save_failed_screen.c | 8 | ||||
-rw-r--r-- | src/shop.c | 5 | ||||
-rw-r--r-- | src/start_menu.c | 7 | ||||
-rw-r--r-- | src/starter_choose.c | 4 | ||||
-rw-r--r-- | src/string_util.c | 29 |
18 files changed, 38 insertions, 195 deletions
diff --git a/src/battle_party_menu.c b/src/battle_party_menu.c index 690ef99be..359517ecd 100644 --- a/src/battle_party_menu.c +++ b/src/battle_party_menu.c @@ -8,6 +8,7 @@ #include "songs.h" #include "sound.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "text.h" @@ -58,16 +59,6 @@ extern u8 gUnknown_0202E8F6; extern u8 gUnknown_02038473; extern u8 gUnknown_020384F0; extern void (*gUnknown_03004AE4)(); //don't know types yet -extern const u8 gOtherText_CantSwitchPokeWithYours[]; -extern const u8 gOtherText_NoEnergyLeft[]; -extern const u8 gOtherText_EGGCantBattle[]; -extern const u8 gOtherText_AlreadySelected[]; -extern const u8 gOtherText_CantBeSwitched[]; -extern const u8 gOtherText_AlreadyBattle[]; -extern const u8 OtherText_Summary[]; -extern const u8 gOtherText_CancelNoTerminator[]; -extern const u8 OtherText_Shift[]; -extern const u8 OtherText_SendOut[]; static void Task_809527C(u8); static void Task_80952B4(u8); diff --git a/src/battle_setup.c b/src/battle_setup.c index 0753fba70..61b9bb1e9 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -23,6 +23,7 @@ #include "species.h" #include "starter_choose.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "text.h" #include "trainer.h" @@ -45,8 +46,6 @@ EWRAM_DATA u8 *gTrainerCannotBattleSpeech = NULL; EWRAM_DATA u8 *gTrainerBattleScriptReturnAddress = NULL; EWRAM_DATA u8 *gTrainerBattleEndScript = NULL; -extern u8 gOtherText_CancelWithTerminator[]; - extern u16 gBattleTypeFlags; extern u16 gScriptLastTalked; extern u8 gUnknown_02024D26; @@ -1169,12 +1168,12 @@ void PlayTrainerEncounterMusic(void) } //Returns an empty string if a null pointer was passed, otherwise returns str -u8 *SanitizeString(u8 *str) +u8 *SanitizeString(const u8 *str) { if (str) - return str; + return (u8 *) str; else - return gOtherText_CancelWithTerminator; + return (u8 *) gOtherText_CancelWithTerminator; } u8 *sub_808281C(void) diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index 511b88c5a..f0bcb4f27 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -12,6 +12,7 @@ #include "sound.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "text.h" @@ -38,10 +39,6 @@ extern u16 gUnknown_030041B4; extern const struct SpriteSheet gUnknown_083C1F74; extern const struct SpritePalette gUnknown_083C1F7C; -extern u8 gOtherText_ThreeQuestions2[]; -extern u8 gOtherText_Size[]; -extern u8 gOtherText_Firm[]; -extern u8 gContestStatsText_Unknown1[]; extern u8 *gUnknown_0841192C[]; extern u8 gBerryCheck_Gfx[]; diff --git a/src/coins.c b/src/coins.c index 193ea249e..3c6356612 100644 --- a/src/coins.c +++ b/src/coins.c @@ -2,11 +2,10 @@ #include "coins.h" #include "menu.h" #include "string_util.h" +#include "strings.h" #define MAX_COINS 9999 -extern u8 gOtherText_Coins2[]; - void UpdateCoinsWindow(s32 a, u8 b, u8 c) { PrintCoins(a, 4, b + 2, c + 1); diff --git a/src/contest_painting.c b/src/contest_painting.c index 2ef50ee17..c970deaf2 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -8,6 +8,7 @@ #include "rng.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "text.h" extern u8 unk_2000000[]; @@ -28,43 +29,6 @@ extern const struct MonCoords gMonFrontPicCoords[]; extern const struct SpriteSheet gMonBackPicTable[]; extern const struct MonCoords gMonBackPicCoords[]; extern void *gUnknown_081FAF4C[]; -extern const u8 OtherText_Cool[]; -extern const u8 OtherText_Beauty2[]; -extern const u8 OtherText_Cute[]; -extern const u8 OtherText_Smart[]; -extern const u8 OtherText_Tough[]; -extern const u8 OtherText_NonstopSuperCool[]; -extern const u8 OtherText_Terminator6[]; -extern const u8 OtherText_GoodLookingPoke[]; -extern const u8 OtherText_Terminator7[]; -extern const u8 OtherText_MarvelousGreat[]; -extern const u8 OtherText_Terminator8[]; -extern const u8 OtherText_CenturyLastVenus[]; -extern const u8 OtherText_Terminator9[]; -extern const u8 OtherText_Terminator10[]; -extern const u8 OtherText_DazzlingSmile[]; -extern const u8 OtherText_PokeCenterIdol[]; -extern const u8 OtherText_Terminator11[]; -extern const u8 OtherText_LovelyAndSweet[]; -extern const u8 OtherText_Terminator12[]; -extern const u8 OtherText_ThePretty[]; -extern const u8 OtherText_WinningPortrait[]; -extern const u8 OtherText_GiveUsWink[]; -extern const u8 OtherText_Terminator13[]; -extern const u8 OtherText_SmartnessMaestro[]; -extern const u8 OtherText_Terminator14[]; -extern const u8 OtherText_ChosenPokeAmong[]; -extern const u8 OtherText_Terminator15[]; -extern const u8 OtherText_TheExcellent[]; -extern const u8 OtherText_ItsMomentOfElegance[]; -extern const u8 OtherText_PowerfullyMuscular[]; -extern const u8 OtherText_Terminator16[]; -extern const u8 OtherText_StrongErEst[]; -extern const u8 OtherText_Terminator17[]; -extern const u8 OtherText_MightyTough[]; -extern const u8 OtherText_Exclamation[]; -extern const u8 gContestText_ContestWinner[]; -extern const u8 gOtherText_Unknown1[]; static const u16 gPictureFramePalettes[][16] = { diff --git a/src/item.c b/src/item.c index 7257c3649..ad2b9aed3 100644 --- a/src/item.c +++ b/src/item.c @@ -1,10 +1,10 @@ #include "global.h" #include "item.h" #include "string_util.h" +#include "strings.h" extern struct Berry *GetBerryInfo(u8 berry); -extern u8 gOtherText_Berry2[]; extern u8 gUnknown_02038560; extern struct Item gItems[]; diff --git a/src/item_use.c b/src/item_use.c index 4047ade5c..a310df2ce 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -22,6 +22,7 @@ #include "songs.h" #include "sound.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "vars.h" @@ -74,23 +75,6 @@ extern u8 GetItemEffectType(); extern void sub_808B020(void); extern void sub_810B96C(void); -extern u8 gOtherText_DadsAdvice[]; -extern u8 gOtherText_CantGetOffBike[]; -extern u8 gOtherText_NoResponse[]; -extern u8 gOtherText_ItemfinderResponding[]; -extern u8 gOtherText_ItemfinderItemUnderfoot[]; -extern u8 gOtherText_Coins3[]; -extern u8 gOtherText_BootedHM[]; -extern u8 gOtherText_BootedTM[]; -extern u8 gOtherText_ContainsMove[]; -extern u8 gOtherText_UsedItem[]; -extern u8 gOtherText_RepelLingers[]; -extern u8 gOtherText_UsedFlute[]; -extern u8 gOtherText_UsedRepel[]; -extern u8 gOtherText_BoxIsFull[]; -extern u8 gOtherText_WontHaveAnyEffect[]; -extern u8 gOtherText_SnapConfusion[]; - extern u16 gScriptItemId; extern u16 gBattleTypeFlags; diff --git a/src/main_menu.c b/src/main_menu.c index 50fefc471..e5ab0c822 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -15,6 +15,7 @@ #include "sound.h" #include "species.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "text.h" #include "title_screen.h" @@ -41,18 +42,6 @@ extern const u8 gBirchSpeech_WhatsYourName[]; extern u8 gBirchSpeech_SoItsPlayer[]; extern u8 gBirchSpeech_AhOkayYouArePlayer[]; extern u8 gBirchSpeech_AreYouReady[]; -extern u8 gSaveFileDeletedMessage[]; -extern u8 gSaveFileCorruptMessage[]; -extern u8 gBoardNotInstalledMessage[]; -extern u8 gBatteryDryMessage[]; -extern u8 gMainMenuString_Continue[]; -extern u8 gMainMenuString_NewGame[]; -extern u8 gMainMenuString_MysteryEvents[]; -extern u8 gMainMenuString_Option[]; -extern u8 gMainMenuString_Player[]; -extern u8 gMainMenuString_Time[]; -extern u8 gMainMenuString_Pokedex[]; -extern u8 gMainMenuString_Badges[]; extern const struct MonCoords gMonFrontPicCoords[]; extern const struct SpriteSheet gMonFrontPicTable[]; @@ -68,7 +57,6 @@ extern const u8 gUnknown_081E764C[]; extern const u8 gBirchIntroShadowGfx[]; extern const u8 gUnknown_081E7834[]; extern const u8 gUnknown_081E796C[]; -extern const u8 gSystemText_NewPara[]; extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E79AC[]; @@ -115,7 +103,7 @@ static void Task_MainMenuProcessKeyInput(u8 taskId); static void Task_MainMenuPressedA(u8 taskId); static void Task_MainMenuPressedB(u8 taskId); static void HighlightCurrentMenuItem(u8 layout, u8 menuItem); -static void PrintMainMenuItem(u8 *text, u8 left, u8 top); +static void PrintMainMenuItem(const u8 *text, u8 left, u8 top); static void PrintSaveFileInfo(void); static void PrintPlayerName(void); static void PrintPlayTime(void); @@ -657,7 +645,7 @@ void HighlightCurrentMenuItem(u8 layout, u8 menuItem) } } -void PrintMainMenuItem(u8 *text, u8 left, u8 top) +void PrintMainMenuItem(const u8 *text, u8 left, u8 top) { u8 i; u8 buffer[32]; @@ -1646,9 +1634,9 @@ static void SetPresetPlayerName(u8 index) u8 *name; if (gSaveBlock2.playerGender == MALE) - name = gMalePresetNames[index].text; + name = (u8 *) gMalePresetNames[index].text; else - name = gFemalePresetNames[index].text; + name = (u8 *) gFemalePresetNames[index].text; for (i = 0; i < 7; i++) gSaveBlock2.playerName[i] = name[i]; diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 11dadf380..d6cbbce53 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -4,6 +4,7 @@ #include "rng.h" #include "script.h" #include "string_util.h" +#include "strings.h" extern u16 gScriptResult; extern u16 gSpecialVar_0x8004; @@ -14,8 +15,6 @@ extern void sub_80F83D0(void); extern void sub_80F7F80(u8); extern u16 sub_80EB8EC(void); extern void sub_80F7DC0(void); -extern u8 gOtherText_Is[]; -extern u8 gOtherText_DontYouAgree[]; extern u32 gUnknown_083E5388[]; extern u32 gUnknown_083E53A8[]; diff --git a/src/menu.c b/src/menu.c index 3759d22c9..f9b9dbf0b 100644 --- a/src/menu.c +++ b/src/menu.c @@ -6,6 +6,7 @@ #include "script.h" #include "songs.h" #include "sound.h" +#include "strings.h" #include "text.h" #include "text_window.h" @@ -22,9 +23,6 @@ struct Menu u8 columnXCoords[8]; }; -extern u8 OtherText_Yes[]; -extern u8 OtherText_No[]; - static void MultistepInitMenuWindowInternal(const struct WindowConfig *, u16); static void InitMenuWindowInternal(const struct WindowConfig *, u16); static bool8 sub_80723D4(void); @@ -603,7 +601,7 @@ u8 MenuPrint_PixelCoords(const u8 *text, u8 left, u16 top, u8 a4) return sub_8004D04(gMenuWindowPtr, text, gMenuTextTileOffset, left, top, a4); } -u8 sub_8072A18(u8 *text, u8 left, u16 top, u8 width, u32 a5) +u8 sub_8072A18(const u8 *text, u8 left, u16 top, u8 width, u32 a5) { return sub_8004FD0(gMenuWindowPtr, 0, text, gMenuTextTileOffset, left, top, width, a5); } @@ -659,7 +657,7 @@ u8 *sub_8072C74(u8 *a1, const u8 *a2, u8 a3, u8 a4) return AlignString(gMenuWindowPtr, a1, a2, a3, a4); } -u8 sub_8072CA4(u8 *str) +u8 sub_8072CA4(const u8 *str) { return GetStringWidth(gMenuWindowPtr, str); } diff --git a/src/party_menu.c b/src/party_menu.c index 8eb181f46..82f234ae4 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5,6 +5,7 @@ #include "songs.h" #include "sound.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "sprite.h" #include "palette.h" @@ -86,50 +87,6 @@ extern const u16 gUnknown_08376504[]; extern void (*const gUnknown_08376B54[])(u8); extern const u8 *const gUnknown_08376D04[DATA_COUNT]; extern const struct UnknownStruct5 gUnknown_08376BB4[][6]; -extern const u8 gOtherText_TallPlusAndRightArrow[]; -extern const u8 gOtherText_WontHaveAnyEffect[]; -extern const u8 gOtherText_ElevatedTo[]; -extern const u8 gOtherText_MailMustBeRemoved[]; -extern const u8 gOtherText_AlreadyHolding[]; -extern const u8 gOtherText_TakenAndReplaced[]; -extern const u8 gOtherText_BagFullCannotRemoveItem[]; -extern const u8 gOtherText_WasGivenToHold[]; -extern const u8 gOtherText_PokeHoldingItemCantMail[]; -extern const u8 gOtherText_MailTransferredMailbox[]; -extern const u8 gOtherText_NotHoldingAnything[]; -extern const u8 gOtherText_ReceivedTheThingFrom[]; -extern const u8 gOtherText_SendRemovedMailPrompt[]; -extern const u8 gOtherText_MailTaken[]; -extern const u8 gOtherText_MailWasSent[]; -extern const u8 gOtherText_MailboxIsFull[]; -extern const u8 gOtherText_MailRemovedMessageLost[]; -extern const u8 gOtherText_WantsToLearn[]; -extern const u8 gOtherText_NotCompatible[]; -extern const u8 gOtherText_AlreadyKnows[]; -extern const u8 gOtherText_LearnedMove[]; -extern const u8 gOtherText_WhichMoveToForget2[]; -extern const u8 gOtherText_ForgetMove123_2[]; -extern const u8 gOtherText_StopTryingTo[]; -extern const u8 gOtherText_DidNotLearnMove2[]; -extern const u8 gOtherText_RegainedHealth[]; -extern const u8 gOtherText_HPRestoredBy[]; -extern const u8 gOtherText_CuredPoisoning[]; -extern const u8 gOtherText_WokeUp[]; -extern const u8 gOtherText_BurnHealed[]; -extern const u8 gOtherText_ThawedOut[]; -extern const u8 gOtherText_CuredParalysis[]; -extern const u8 gOtherText_SnapConfusion[]; -extern const u8 gOtherText_GotOverLove[]; -extern const u8 gOtherText_BecameHealthy[]; -extern const u8 gOtherText_Hp2[]; -extern const u8 gOtherText_Attack[]; -extern const u8 gOtherText_Defense[]; -extern const u8 gOtherText_Speed[]; -extern const u8 gOtherText_SpAtk2[]; -extern const u8 gOtherText_SpDef2[]; -extern const u8 gOtherText_WasRaised[]; -extern const u8 gOtherText_PPIncreased[]; -extern const u8 gOtherText_PPRestored[]; extern const u8 gMoveNames[][13]; extern const u8 *const gItemEffectTable[]; diff --git a/src/player_pc.c b/src/player_pc.c index f0f0709b1..a34863be4 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -10,6 +10,7 @@ #include "script.h" #include "sound.h" #include "string_util.h" +#include "strings.h" #include "task.h" #define NEW_GAME_PC_ITEMS(i, type) ((u16)(gNewGamePCItems + type)[i * 2]) @@ -21,7 +22,7 @@ enum QUANTITY, }; -extern void DisplayItemMessageOnField(u8, u8*, TaskFunc, u16); +extern void DisplayItemMessageOnField(u8, const u8*, TaskFunc, u16); extern void DoPlayerPCDecoration(u8); extern void BuyMenuFreeMemory(void); extern void DestroyVerticalScrollIndicator(u8); @@ -40,13 +41,8 @@ extern void sub_80F98DC(int); extern void sub_80A4164(u8 *, u16, enum StringConvertMode, u8); extern void CreateVerticalScrollIndicators(u32, u32, u32); // unknown args -extern u8 gOtherText_NoItems[]; - extern u16 gNewGamePCItems[]; -extern u8 gOtherText_WhatWillYouDo[]; -extern u8 gOtherText_NoMailHere[]; - extern u8 *gUnknown_02039314; extern struct MenuAction gUnknown_08406298[]; @@ -57,7 +53,6 @@ extern u8 gUnknown_08406327[]; extern u8 gUnknown_08406330[]; extern u8 gUnknown_0840631E[]; extern u8 gUnknown_08406318[]; -extern u8 gOtherText_CancelNoTerminator[]; extern u8 gUnknown_030007B4; extern u8 unk_201FE00[]; diff --git a/src/pokedex.c b/src/pokedex.c index 5ea1f9938..057fa2d49 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -12,6 +12,7 @@ #include "songs.h" #include "sound.h" #include "string_util.h" +#include "strings.h" #include "task.h" // I'm #define-ing these just for now so I can keep using the old unkXXX member names @@ -90,12 +91,6 @@ extern u8 gUnknown_08E96ACC[]; extern u8 gUnknown_08E96B58[]; extern struct PokedexEntry gPokedexEntries[]; -extern u8 gDexText_UnknownPoke[]; -extern u8 gDexText_UnknownHeight[]; -extern u8 gDexText_UnknownWeight[]; -extern u8 gDexText_CryOf[]; -extern u8 gDexText_SizeComparedTo[]; -extern u8 gDexText_RegisterComplete[]; extern void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume); extern bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16); diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index d46abc74d..af5c385f5 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -7,6 +7,7 @@ #include "palette.h" #include "save.h" #include "sprite.h" +#include "strings.h" #include "task.h" #include "text.h" @@ -36,13 +37,6 @@ extern u32 gGameContinueCallback; extern u8 gBirchHelpGfx[]; -extern u8 gSystemText_SaveFailedBackupCheck[]; -extern u8 gSystemText_CheckCompleteSaveAttempt[]; -extern u8 gSystemText_BackupDamagedGameContinue[]; -extern u8 gSystemText_SaveCompletedPressA[]; -extern u8 gSystemText_SaveCompletedGameEnd[]; -extern u8 gSystemText_GameplayEnded[]; - extern u8 gBirchGrassTilemap[]; extern u8 gBirchBagTilemap[]; extern u8 gBirchBagGrassPal[0x40]; diff --git a/src/shop.c b/src/shop.c index 780dff02a..ea3840f60 100644 --- a/src/shop.c +++ b/src/shop.c @@ -9,6 +9,7 @@ #include "script.h" #include "sound.h" #include "sprite.h" +#include "strings.h" #include "task.h" struct UnknownShopStruct @@ -28,8 +29,6 @@ extern struct MenuAction gUnknown_083CC6D0[]; extern u8 gUnknown_083CC6E8[]; extern u8 gUnknown_083CC6EB[]; -extern u8 gOtherText_CanIHelpYou[]; -extern u8 gOtherText_AnythingElse[]; extern u8 gBuyMenuFrame_Gfx[]; extern u16 gBuyMenuFrame_Tilemap[]; @@ -38,7 +37,7 @@ extern u16 gUnknown_083CC710[2]; extern void sub_80A6300(void); extern void sub_80BE3BC(void); -extern void DisplayItemMessageOnField(u8, u8*, TaskFunc, u16); +extern void DisplayItemMessageOnField(u8, const u8*, TaskFunc, u16); extern u8 sub_807D770(void); extern void pal_fill_black(void); extern void sub_80B3764(int, int); diff --git a/src/start_menu.c b/src/start_menu.c index 37d361c0b..c95c8b3f0 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -21,6 +21,7 @@ #include "sound.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "trainer_card.h" @@ -54,10 +55,8 @@ EWRAM_DATA static u8 sNumStartMenuActions = 0; EWRAM_DATA static u8 sCurrentStartMenuActions[10] = {0}; //Text strings -extern u8 gSystemText_Saving[]; extern u8 gSaveText_PlayerSavedTheGame[]; extern u8 gSaveText_DontTurnOff[]; -extern u8 gSystemText_SaveErrorExchangeBackup[]; extern u8 gSaveText_ThereIsAlreadyAFile[]; extern u8 gSaveText_ThereIsADifferentFile[]; extern u8 gSaveText_WouldYouLikeToSave[]; @@ -113,7 +112,7 @@ static u8 SaveCallback1(void); static u8 SaveCallback2(void); static void sub_807160C(void); static u8 RunSaveDialogCallback(void); -static void DisplaySaveMessageWithCallback(u8 *ptr, u8 (*func)(void)); +static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void)); static void Task_SaveDialog(u8 taskId); static void sub_8071700(void); static void HideSaveDialog(void); @@ -517,7 +516,7 @@ void InitSaveDialog(void) CreateTask(Task_SaveDialog, 0x50); } -static void DisplaySaveMessageWithCallback(u8 *ptr, u8 (*func)(void)) +static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void)) { StringExpandPlaceholders(gStringVar4, ptr); MenuDisplayMessageBox(); diff --git a/src/starter_choose.c b/src/starter_choose.c index 6ef410d21..358fe8fca 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -11,6 +11,7 @@ #include "species.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "trig.h" @@ -20,14 +21,11 @@ struct MonCoords }; extern void * const gUnknown_081FAF4C[]; -extern const u8 gOtherText_DoYouChoosePoke[]; extern u16 gScriptResult; extern const u8 gSpeciesNames[][11]; -extern const u8 gOtherText_Poke[]; extern const struct SpriteSheet gMonFrontPicTable[]; extern const struct MonCoords gMonFrontPicCoords[]; extern const struct SpritePalette gMonPaletteTable[]; -extern const u8 gOtherText_BirchInTrouble[]; extern struct SpriteTemplate gUnknown_02024E8C; //-------------------------------------------------- diff --git a/src/string_util.c b/src/string_util.c index 957d70153..9686256a1 100644 --- a/src/string_util.c +++ b/src/string_util.c @@ -1,5 +1,6 @@ #include "global.h" #include "string_util.h" +#include "strings.h" #include "text.h" u8 gUnknownStringVar[16]; @@ -23,20 +24,6 @@ static const s32 sPowersOfTen[] = 1000000000, }; -extern u8 gExpandedPlaceholder_Empty[]; -extern u8 gExpandedPlaceholder_Kun[]; -extern u8 gExpandedPlaceholder_Chan[]; -extern u8 gExpandedPlaceholder_Sapphire[]; -extern u8 gExpandedPlaceholder_Ruby[]; -extern u8 gExpandedPlaceholder_Aqua[]; -extern u8 gExpandedPlaceholder_Magma[]; -extern u8 gExpandedPlaceholder_Archie[]; -extern u8 gExpandedPlaceholder_Maxie[]; -extern u8 gExpandedPlaceholder_Kyogre[]; -extern u8 gExpandedPlaceholder_Groudon[]; -extern u8 gExpandedPlaceholder_Brendan[]; -extern u8 gExpandedPlaceholder_May[]; - u8 *StringCopy10(u8 *dest, const u8 *src) { u8 i; @@ -473,17 +460,17 @@ static u8 *ExpandPlaceholder_StringVar3(void) static u8 *ExpandPlaceholder_KunChan(void) { if (gSaveBlock2.playerGender == MALE) - return gExpandedPlaceholder_Kun; + return (u8 *) gExpandedPlaceholder_Kun; else - return gExpandedPlaceholder_Chan; + return (u8 *) gExpandedPlaceholder_Chan; } static u8 *ExpandPlaceholder_RivalName(void) { if (gSaveBlock2.playerGender == MALE) - return gExpandedPlaceholder_May; + return (u8 *) gExpandedPlaceholder_May; else - return gExpandedPlaceholder_Brendan; + return (u8 *) gExpandedPlaceholder_Brendan; } #define VERSION_DEPENDENT_PLACEHOLDER_LIST \ @@ -497,11 +484,11 @@ static u8 *ExpandPlaceholder_RivalName(void) #ifdef SAPPHIRE #define X(ph, r, s) \ -static u8 *ExpandPlaceholder_##ph(void) { return gExpandedPlaceholder_##s; } +static u8 *ExpandPlaceholder_##ph(void) { return (u8 *) gExpandedPlaceholder_##s; } VERSION_DEPENDENT_PLACEHOLDER_LIST #else #define X(ph, r, s) \ -static u8 *ExpandPlaceholder_##ph(void) { return gExpandedPlaceholder_##r; } +static u8 *ExpandPlaceholder_##ph(void) { return (u8 *) gExpandedPlaceholder_##r; } VERSION_DEPENDENT_PLACEHOLDER_LIST #endif @@ -530,7 +517,7 @@ u8 *GetExpandedPlaceholder(u32 id) }; if (id >= ARRAY_COUNT(funcs)) - return gExpandedPlaceholder_Empty; + return (u8 *) gExpandedPlaceholder_Empty; else return funcs[id](); } |