Merge pull request #39 from Diegoisawesome/master
Extract baserom calls from various battle data files and crt0.s
This commit is contained in:
12
src/item.c
12
src/item.c
@@ -8,9 +8,9 @@
|
||||
extern void ApplyNewEncyprtionKeyToHword(u16* hword, u32 newKey);
|
||||
extern bool8 InBattlePyramid(void);
|
||||
|
||||
extern const u8 gOtherText_PokeBalls[];
|
||||
extern const u8 gOtherText_Berries[];
|
||||
extern const u8 gOtherText_Berry[];
|
||||
extern const u8 gText_PokeBalls[];
|
||||
extern const u8 gText_Berries[];
|
||||
extern const u8 gText_Berry[];
|
||||
extern const u8 gUnknown_085897E4[][28]; // not sure what this one is
|
||||
|
||||
bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
||||
@@ -92,7 +92,7 @@ void CopyItemNameHandlePlural(u16 itemId, u8 *string, u32 quantity)
|
||||
if (quantity < 2)
|
||||
StringCopy(string, ItemId_GetItem(ITEM_POKE_BALL)->name);
|
||||
else
|
||||
StringCopy(string, gOtherText_PokeBalls);
|
||||
StringCopy(string, gText_PokeBalls);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,9 +109,9 @@ void GetBerryCountString(u8* dst, const u8* berryName, u32 quantity)
|
||||
u8* txtPtr;
|
||||
|
||||
if (quantity < 2)
|
||||
berryString = gOtherText_Berry;
|
||||
berryString = gText_Berry;
|
||||
else
|
||||
berryString = gOtherText_Berries;
|
||||
berryString = gText_Berries;
|
||||
txtPtr = StringCopy(dst, berryName);
|
||||
*txtPtr = CHAR_SPACE;
|
||||
StringCopy(txtPtr + 1, berryString);
|
||||
|
||||
@@ -31,7 +31,7 @@ extern const union AnimCmd* gUnknown_082FF70C[];
|
||||
extern const union AnimCmd* const * const gUnknown_08309AAC[];
|
||||
extern const union AnimCmd* const * const gUnknown_08305D0C[];
|
||||
extern const union AnimCmd* const * const gUnknown_0830536C[];
|
||||
extern const u8 gBadEggNickname[];
|
||||
extern const u8 gText_BadEgg[];
|
||||
extern const u8 gText_EggNickname[];
|
||||
|
||||
extern u8 GetBankSide(u8 bank);
|
||||
@@ -409,8 +409,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
if (boxMon->isBadEgg)
|
||||
{
|
||||
for (retVal = 0;
|
||||
retVal < POKEMON_NAME_LENGTH && gBadEggNickname[retVal] != EOS;
|
||||
data[retVal] = gBadEggNickname[retVal], retVal++) {}
|
||||
retVal < POKEMON_NAME_LENGTH && gText_BadEgg[retVal] != EOS;
|
||||
data[retVal] = gText_BadEgg[retVal], retVal++) {}
|
||||
|
||||
data[retVal] = EOS;
|
||||
}
|
||||
|
||||
@@ -46,16 +46,16 @@ extern const struct SpindaSpot gSpindaSpotGraphics[];
|
||||
extern const u8* const gStatNamesTable[];
|
||||
extern const u8 gSpeciesNames[][11];
|
||||
extern const u8 gUnknown_08329EC8[];
|
||||
extern const u8 gUnknown_085CB38A[];
|
||||
extern const u8 gUnknown_085CB3AA[];
|
||||
extern const u8 gUnknown_085CA459[];
|
||||
extern const u8 gUnknown_085CA424[];
|
||||
extern const u8 gText_StatRose[];
|
||||
extern const u8 gText_PkmnsStatChanged2[];
|
||||
extern const u8 gText_PkmnGettingPumped[];
|
||||
extern const u8 gText_PkmnShroudedInMist[];
|
||||
extern const s8 gNatureStatTable[][5];
|
||||
extern const s8 gUnknown_08329ECE[][3];
|
||||
extern const u32 gBitTable[];
|
||||
extern const u32 gTMHMLearnsets[][2];
|
||||
extern const u8 BattleText_Wally[];
|
||||
extern const u8 BattleText_PreventedSwitch[];
|
||||
extern const u8 gText_BattleWallyName[];
|
||||
extern const u8 gText_PkmnsXPreventsSwitching[];
|
||||
extern const struct CompressedSpritePalette gMonPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
|
||||
extern const u16 gHMMoves[];
|
||||
@@ -215,8 +215,8 @@ void sub_806CF24(s32 stat)
|
||||
{
|
||||
gBankTarget = gBankInMenu;
|
||||
StringCopy(gBattleTextBuff1, gStatNamesTable[gUnknown_08329EC8[stat]]);
|
||||
StringCopy(gBattleTextBuff2, gUnknown_085CB38A);
|
||||
StrCpyDecodeToDisplayedStringBattle(gUnknown_085CB3AA);
|
||||
StringCopy(gBattleTextBuff2, gText_StatRose);
|
||||
StrCpyDecodeToDisplayedStringBattle(gText_PkmnsStatChanged2);
|
||||
}
|
||||
|
||||
u8 *sub_806CF78(u16 itemId)
|
||||
@@ -251,7 +251,7 @@ u8 *sub_806CF78(u16 itemId)
|
||||
else
|
||||
{
|
||||
gBankAttacker = gBankInMenu;
|
||||
StrCpyDecodeToDisplayedStringBattle(gUnknown_085CA459);
|
||||
StrCpyDecodeToDisplayedStringBattle(gText_PkmnGettingPumped);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,7 +259,7 @@ u8 *sub_806CF78(u16 itemId)
|
||||
if (itemEffect[3] & 0x80)
|
||||
{
|
||||
gBankAttacker = gBankInMenu;
|
||||
StrCpyDecodeToDisplayedStringBattle(gUnknown_085CA424);
|
||||
StrCpyDecodeToDisplayedStringBattle(gText_PkmnShroudedInMist);
|
||||
}
|
||||
|
||||
return gDisplayedStringBattle;
|
||||
@@ -1177,7 +1177,7 @@ u16 GetBattleBGM(void)
|
||||
case CLASS_PKMN_TRAINER_RIVAL:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
return 0x1E1;
|
||||
if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, BattleText_Wally))
|
||||
if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, gText_BattleWallyName))
|
||||
return 0x1DC;
|
||||
return 0x1E1;
|
||||
case CLASS_ELITE_FOUR:
|
||||
@@ -1374,7 +1374,7 @@ void sub_806E994(void)
|
||||
gBattleTextBuff2[2] = gBankInMenu;
|
||||
gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]);
|
||||
gBattleTextBuff2[4] = EOS;
|
||||
StrCpyDecodeBattle(BattleText_PreventedSwitch, gStringVar4);
|
||||
StrCpyDecodeBattle(gText_PkmnsXPreventsSwitching, gStringVar4);
|
||||
}
|
||||
|
||||
struct PokeItem
|
||||
|
||||
@@ -45,8 +45,8 @@ static const u8 sGiftRibbonsMonDataIds[] =
|
||||
MON_DATA_GIFT_RIBBON_7
|
||||
};
|
||||
|
||||
extern const u8 gOtherText_DecimalPoint[];
|
||||
extern const u8 gOtherText_Marco[];
|
||||
extern const u8 gText_DecimalPoint[];
|
||||
extern const u8 gText_Marco[];
|
||||
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
|
||||
|
||||
#define CM_PER_INCH 2.54
|
||||
@@ -103,7 +103,7 @@ static void FormatMonSizeRecord(u8 *string, u32 size)
|
||||
#endif
|
||||
|
||||
string = ConvertIntToDecimalStringN(string, size / 10, 0, 8);
|
||||
string = StringAppend(string, gOtherText_DecimalPoint);
|
||||
string = StringAppend(string, gText_DecimalPoint);
|
||||
ConvertIntToDecimalStringN(string, size % 10, 0, 1);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ static void GetMonSizeRecordInfo(u16 species, u16 *sizeRecord)
|
||||
FormatMonSizeRecord(gStringVar3, size);
|
||||
StringCopy(gStringVar1, gSpeciesNames[species]);
|
||||
if (*sizeRecord == DEFAULT_MAX_SIZE)
|
||||
StringCopy(gStringVar2, gOtherText_Marco);
|
||||
StringCopy(gStringVar2, gText_Marco);
|
||||
else
|
||||
StringCopy(gStringVar2, gSaveBlock2Ptr->playerName);
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ static void BuildStartMenuActions_MultiBattleRoom(void)
|
||||
extern const struct WindowTemplate gSafariBallsWindowTemplate;
|
||||
extern const struct WindowTemplate gPyramidFloorWindowTemplate_1;
|
||||
extern const struct WindowTemplate gPyramidFloorWindowTemplate_2;
|
||||
extern const u8 gOtherText_SafariStock[];
|
||||
extern const u8 gText_SafariBallStock[];
|
||||
|
||||
void DisplaySafariBallsWindow(void)
|
||||
{
|
||||
@@ -159,13 +159,13 @@ void DisplaySafariBallsWindow(void)
|
||||
PutWindowTilemap(sSafariBallsWindowId);
|
||||
sub_81973FC(sSafariBallsWindowId, 0);
|
||||
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gOtherText_SafariStock);
|
||||
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
|
||||
PrintTextOnWindow(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(sSafariBallsWindowId, 2);
|
||||
}
|
||||
|
||||
extern const u8* const gUnknown_08510510[];
|
||||
extern const u8 gOtherText_BattlePyramid_X[];
|
||||
extern const u8 gText_BattlePyramidFloor[];
|
||||
|
||||
void DisplayPyramidFloorWindow(void)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ void DisplayPyramidFloorWindow(void)
|
||||
PutWindowTilemap(sBattlePyramidFloorWindowId);
|
||||
sub_81973FC(sBattlePyramidFloorWindowId, 0);
|
||||
StringCopy(gStringVar1, gUnknown_08510510[*(u16*)(&gSaveBlock2Ptr->field_CAA[8])]);
|
||||
StringExpandPlaceholders(gStringVar4, gOtherText_BattlePyramid_X);
|
||||
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
|
||||
PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(sBattlePyramidFloorWindowId, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user