mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-11 02:25:57 -05:00
Move data_810AE24 to C
This commit is contained in:
6233
data/data_810AE24.s
6233
data/data_810AE24.s
File diff suppressed because it is too large
Load Diff
@@ -3,13 +3,6 @@
|
||||
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
// size: 0x8
|
||||
typedef struct DungeonName
|
||||
{
|
||||
const u8 *name1;
|
||||
const u8 *name2;
|
||||
} DungeonName;
|
||||
|
||||
// size: 0x10
|
||||
typedef struct DungeonDataEntry
|
||||
{
|
||||
@@ -34,7 +27,6 @@ typedef struct DungeonDataEntry
|
||||
} DungeonDataEntry;
|
||||
|
||||
extern const DungeonDataEntry gDungeons[];
|
||||
extern const DungeonName gDungeonNames[];
|
||||
|
||||
s32 GetDungeonFloorCount(u8 dungeon);
|
||||
const u8 *GetDungeonName1(u8 dungeon);
|
||||
|
||||
@@ -62,9 +62,9 @@ bool8 TacticsTargetLeader(u8 tactic);
|
||||
bool8 HasIQForSkill(s32 pokeIQ, u8 IQSkillIndex);
|
||||
s32 GetNumAvailableIQSkills(u8 *iqSkillBuffer, s32 pokeIQ);
|
||||
void CopyTacticsNameToBuffer(char *buffer, u8 tactic);
|
||||
u8 *GetIQSkillName(u8 skill);
|
||||
u8 *GetIQSkillDescription(u8 skill);
|
||||
u8 *GetTacticsDescription(u8 tactic);
|
||||
const u8 *GetIQSkillName(u8 skill);
|
||||
const u8 *GetIQSkillDescription(u8 skill);
|
||||
const u8 *GetTacticsDescription(u8 tactic);
|
||||
void ToggleIQSkill(IqSkillFlags *iq, u32 skillIndex);
|
||||
void SetIQSkill(IqSkillFlags *iq, u32 skillIndex);
|
||||
bool8 IsIQSkillSet(IqSkillFlags *iq, u32 IQSkillBit);
|
||||
|
||||
114
include/strings.h
Normal file
114
include/strings.h
Normal file
@@ -0,0 +1,114 @@
|
||||
#ifndef GUARD_STRINGS_H
|
||||
#define GUARD_STRINGS_H
|
||||
|
||||
#include "structs/str_status_text.h"
|
||||
|
||||
// size: 0x8
|
||||
typedef struct DungeonName
|
||||
{
|
||||
const u8 *name1;
|
||||
const u8 *name2;
|
||||
} DungeonName;
|
||||
|
||||
struct unkStruct_8113080
|
||||
{
|
||||
u8 unk0;
|
||||
const u8 *text;
|
||||
};
|
||||
|
||||
#define NUM_POKEMON_TYPES 18
|
||||
extern const char * const gUnformattedTypeStrings[NUM_POKEMON_TYPES];
|
||||
extern const char * const gFormattedTypeStrings[NUM_POKEMON_TYPES];
|
||||
extern const u8 *const gUnknown_810AF50[];
|
||||
extern const u8 *const gAdventureLogText[];
|
||||
extern const u8 *const gRescueTeamRanks[];
|
||||
extern const u8 *const gAbilityNames[];
|
||||
extern const u8 *const AbilityDescriptions[];
|
||||
extern const u8 *const gRangeNames[];
|
||||
extern const u8 *const gUnknown_810CF00;
|
||||
extern const u8 *const gTextType;
|
||||
extern const u8 *const gTextPower;
|
||||
extern const u8 *const gStatusNames[];
|
||||
extern const u8 *const gFormattedStatusNames[];
|
||||
extern const u8 *const gUnknown_810DD58;
|
||||
extern const u8 *const gText_IqSkills;
|
||||
extern const u8 *const gText_LevelUnkMacro;
|
||||
extern const u8 *const gText_ExpPtsUnkMacro;
|
||||
extern const u8 *const gText_ToNextLevel;
|
||||
extern const u8 *const gUnknown_810DDD0;
|
||||
extern const u8 *const gUnknown_810DDE4;
|
||||
extern const u8 *const gUnknown_810DDFC;
|
||||
extern const u8 *const gUnknown_810DE0C;
|
||||
extern const u8 *const gUnknown_810DE20;
|
||||
extern const u8 *const gUnknown_810DE24;
|
||||
extern const u8 *const gUnknown_810DE28;
|
||||
extern const u8 *const gUnknown_810DE38;
|
||||
extern const u8 *const gUnknown_810DE4C;
|
||||
extern const u8 *const gUnknown_810DE50;
|
||||
extern const u8 *const gUnknown_810DE54;
|
||||
extern const u8 *const gUnknown_810DE58;
|
||||
extern const u8 *const gUnknown_810DE6C;
|
||||
extern const u8 *const gUnknown_810DE80;
|
||||
extern const u8 *const gUnknown_810DE98;
|
||||
extern const u8 *const gUnknown_810DEB4;
|
||||
extern const u8 *const gUnknown_810DEC8;
|
||||
extern const u8 *const gUnknown_810DEDC;
|
||||
extern const u8 *const gUnknown_810DEF4;
|
||||
extern const u8 *const gUnknown_810DEF8;
|
||||
extern const u8 *const gUnknown_810DF1C;
|
||||
extern const u8 *const gUnknown_810DF34;
|
||||
extern const u8 *const gUnknown_810DF50;
|
||||
extern const u8 *const gUnknown_810DF78;
|
||||
extern const u8 *const gUnknown_810DF84;
|
||||
extern const u8 *const gUnknown_810DF98;
|
||||
extern const u8 *const gUnknown_810DFB4;
|
||||
extern const u8 *const gUnknown_810DFC8;
|
||||
extern const u8 *const gEvolutionStrings[];
|
||||
extern const u8 *const gUnknown_810E02C[];
|
||||
extern const StatusText gStatusDescriptions[99];
|
||||
extern const DungeonName gDungeonNames[];
|
||||
extern const u8 *const gIQSkillNames[];
|
||||
extern const u8 *const gIQSkillDescriptions[];
|
||||
extern const u8 *const gTacticsNames[];
|
||||
extern const u8 *const gTacticsDescriptions[];
|
||||
extern const struct unkStruct_8113080 gSpecialDeathTexts[];
|
||||
extern const u8 *const gText_DeathToMove;
|
||||
extern const u8 *const gUnknown_8113850;
|
||||
extern const u8 *const gText_Pokemon1WasDefeatedBy;
|
||||
extern const u8 *const gText_Pokemon1;
|
||||
extern const u8 *const gUnknown_8113898;
|
||||
extern const u8 *const gUnknown_81138C0;
|
||||
extern const u8 *const gUnknown_81138D0;
|
||||
extern const u8 *const gUnknown_81138E4;
|
||||
extern const u8 *const gUnknown_8113900;
|
||||
extern const u8 *const gUnknown_8113918;
|
||||
extern const u8 *const gUnknown_8113934;
|
||||
extern const u8 *const gUnknown_8113950;
|
||||
extern const u8 *const gUnknown_8113974;
|
||||
extern const u8 *const gUnknown_8113990;
|
||||
extern const u8 *const gUnknown_81139B4;
|
||||
extern const u8 *const gUnknown_81139B8;
|
||||
extern const u8 *const gUnknown_81139CC;
|
||||
extern const u8 *const gFriendAreaNames[];
|
||||
extern const u8 *const gFriendAreaDescriptions[];
|
||||
extern const u8 *const gUnknown_8115718[];
|
||||
extern const u8 *const gText_PP_Value0;
|
||||
extern const u8 *const gText_TooManyMembersToEnterDungeon;
|
||||
extern const u8 *const gText_OnlyOneMonMayEnterDungeon;
|
||||
extern const u8 *const gText_OnlyXItemsMayBeBroughtIntoDungeon;
|
||||
extern const u8 *const gText_AlsoOnlyXItemsMayBeBroughtIntoDungeon;
|
||||
extern const u8 *const gText_ClientCouldNotJoinTooManyMembers;
|
||||
extern const u8 *const gText_AlsoClientCouldNotJoinTooManyMembers;
|
||||
extern const u8 *const gText_ClientCouldNotJoinNoSpace;
|
||||
extern const u8 *const gText_AlsoClientCouldNotJoinNoSpace;
|
||||
extern const u8 *const gText_MustHaveMonWithMove;
|
||||
extern const u8 *const gText_AlsoMustHaveMonWithMove;
|
||||
extern const u8 *const gText_MustHaveWaterTypeMon;
|
||||
extern const u8 *const gText_AlsoMustHaveWaterTypeMon;
|
||||
extern const u8 *const gText_IsOkToEnterWithFollowingRules;
|
||||
extern const u8 *const gText_GameWilllBeSavedBeforeEntering;
|
||||
extern const u8 *const gText_TeamWillEnterAtLv1;
|
||||
extern const u8 *const gText_AllItemsLostOnEntering;
|
||||
extern const u8 *const gText_AllMoneyLostOnEntering;
|
||||
|
||||
#endif
|
||||
@@ -10,7 +10,7 @@ const char * GetFormattedTypeString(u8 type);
|
||||
u8 IsTypePhysical(u8 index);
|
||||
u8 sub_8092364(u8 index);
|
||||
void CopyAbilityNametoBuffer(char *buffer, u8 index);
|
||||
u8 *GetAbilityDescription(u8 index);
|
||||
const u8 *GetAbilityDescription(u8 index);
|
||||
u32 ReturnIntFromChar2(u8);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -581,8 +581,8 @@ SECTIONS {
|
||||
src/tile_types.o(.rodata);
|
||||
src/exclusive_pokemon.o(.rodata);
|
||||
src/rescue_team_info.o(.rodata);
|
||||
src/strings.o(.rodata);
|
||||
src/text_util.o(.rodata);
|
||||
data/data_810AE24.o(.rodata);
|
||||
data/data_810AE24_2.o(.rodata);
|
||||
src/position_util.o(.rodata);
|
||||
data/data_8115EB8.o(.rodata);
|
||||
|
||||
@@ -8,32 +8,7 @@
|
||||
#include "moves.h"
|
||||
#include "text_util.h"
|
||||
#include "text.h"
|
||||
|
||||
struct unkStruct_8113080
|
||||
{
|
||||
u8 unk0;
|
||||
u8 *text;
|
||||
};
|
||||
|
||||
extern const u8 *gPtrDeathToMoveText[];
|
||||
extern const u8 *gUnknown_8113850[];
|
||||
extern const u8 *gUnknown_8113868[];
|
||||
extern const u8 *gUnknown_8113898[];
|
||||
extern const u8 *gUnknown_81138C0[];
|
||||
extern const u8 *gUnknown_81138D0[];
|
||||
extern const u8 *gUnknown_81138E4[];
|
||||
extern const u8 *gUnknown_8113950[];
|
||||
extern const u8 *gUnknown_8113900[];
|
||||
extern const u8 *gUnknown_8113974[];
|
||||
extern const u8 *gUnknown_8113918[];
|
||||
extern const u8 *gUnknown_8113990[];
|
||||
extern const u8 *gUnknown_8113934[];
|
||||
extern const u8 *gUnknown_81139B4[];
|
||||
extern const u8 *gUnknown_81139B8[];
|
||||
extern const u8 *gUnknown_81139CC[];
|
||||
extern const u8 *gUnknown_8113870[];
|
||||
|
||||
extern struct unkStruct_8113080 gSpecialDeathText[];
|
||||
#include "strings.h"
|
||||
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst)
|
||||
{
|
||||
@@ -58,9 +33,9 @@ static void WriteDeathText(s16 moveID, u8 *buffer)
|
||||
moveID_u16 = moveID_s32;
|
||||
InitPokemonMoveOrNullObject(&move, moveID_u16);
|
||||
BufferMoveName(gFormatBuffer_Items[0], &move, NULL);
|
||||
FormatString(*gPtrDeathToMoveText, buffer, buffer + 200, 0); // $m0's $i0
|
||||
FormatString(gText_DeathToMove, buffer, buffer + 200, 0); // $m0's $i0
|
||||
} else {
|
||||
strncpy(buffer, gSpecialDeathText[moveID - 0x1F4].text, 200);
|
||||
strncpy(buffer, gSpecialDeathTexts[moveID - 0x1F4].text, 200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +47,7 @@ static u8 sub_8094528(s16 moveID)
|
||||
}
|
||||
else
|
||||
{
|
||||
return gSpecialDeathText[moveID - 0x1F4].unk0;
|
||||
return gSpecialDeathTexts[moveID - 0x1F4].unk0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,17 +60,17 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
sub_80073B8(param_1);
|
||||
PrintFormattedStringOnWindow(0x10,0,param_2,param_1,0);
|
||||
PrintYellowDungeonNametoBuffer(gFormatBuffer_Monsters[0], ¶m_3->dungeonLocation);
|
||||
PrintFormattedStringOnWindow(4,0x10,*gUnknown_8113850,param_1,0); // #+Place: $m0
|
||||
PrintFormattedStringOnWindow(4,0x10,gUnknown_8113850,param_1,0); // #+Place: $m0
|
||||
y = 0x1A;
|
||||
sub_80922B4(gFormatBuffer_Monsters[0], param_3->buffer1, POKEMON_NAME_LENGTH);
|
||||
sub_80922B4(gFormatBuffer_Monsters[1], param_3->buffer2, POKEMON_NAME_LENGTH);
|
||||
if (sub_8094528(param_3->moveID) != 0) {
|
||||
// $m1 was defeated by
|
||||
FormatString(*gUnknown_8113868,buffer, buffer + sizeof(buffer),0);
|
||||
FormatString(gText_Pokemon1WasDefeatedBy,buffer, buffer + sizeof(buffer),0);
|
||||
}
|
||||
else {
|
||||
// $m1
|
||||
FormatString(*gUnknown_8113870,buffer, buffer + sizeof(buffer),0);
|
||||
FormatString(gText_Pokemon1,buffer, buffer + sizeof(buffer),0);
|
||||
}
|
||||
|
||||
x = (0xb0 - sub_8008ED0(buffer)) / 2;
|
||||
@@ -111,47 +86,47 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
gFormatArgs[0] = param_3->exp;
|
||||
gFormatArgs[1] = param_3->level;
|
||||
if (gFormatArgs[1] >= 100) {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_81138C0,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138C0,param_1,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113898,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113898,param_1,0);
|
||||
}
|
||||
y += 0xA;
|
||||
gFormatArgs[0] = param_3->maxHPStat;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_81138D0,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138D0,param_1,0);
|
||||
y += 0xA;
|
||||
gFormatArgs[0] = param_3->atk;
|
||||
gFormatArgs[1] = param_3->def;
|
||||
if (param_3->attBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + param_3->attBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113950,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113950,param_1,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_81138E4,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138E4,param_1,0);
|
||||
}
|
||||
if (param_3->defBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + param_3->defBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113974,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113974,param_1,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113900,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113900,param_1,0);
|
||||
}
|
||||
y += 0xA;
|
||||
gFormatArgs[0] = param_3->spAtk;
|
||||
gFormatArgs[1] = param_3->spDef;
|
||||
if (param_3->spAttBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + param_3->spAttBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113990,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113990,param_1,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113918,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113918,param_1,0);
|
||||
}
|
||||
if (param_3->spDefBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + param_3->spDefBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_81139B4,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81139B4,param_1,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_8113934,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113934,param_1,0);
|
||||
}
|
||||
y += 0x10;
|
||||
item = &(param_3->heldItem);
|
||||
@@ -159,8 +134,8 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
sub_8090E14(gFormatBuffer_Items[0],item,0);
|
||||
}
|
||||
else {
|
||||
strcpy(gFormatBuffer_Items[0],*gUnknown_81139B8);
|
||||
strcpy(gFormatBuffer_Items[0],gUnknown_81139B8);
|
||||
}
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_81139CC,param_1,0);
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81139CC,param_1,0);
|
||||
sub_80073E0(param_1);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "structs/str_status_text.h"
|
||||
#include "decompress.h"
|
||||
#include "strings.h"
|
||||
|
||||
static bool8 AreStatusesTheSame(const StatusText *status1, const StatusText *status2)
|
||||
{
|
||||
@@ -12,8 +13,6 @@ static bool8 AreStatusesTheSame(const StatusText *status1, const StatusText *sta
|
||||
}
|
||||
}
|
||||
|
||||
extern const StatusText gStatusDescriptions[];
|
||||
|
||||
s32 PrepareStatusStringArrays(const char *str, STATUSTEXTS(statuses))
|
||||
{
|
||||
s32 i, j;
|
||||
@@ -23,7 +22,7 @@ s32 PrepareStatusStringArrays(const char *str, STATUSTEXTS(statuses))
|
||||
s32 strLen;
|
||||
|
||||
counter = 0;
|
||||
for (i = 0; i < 99; i++) {
|
||||
for (i = 0; i < ARRAY_COUNT_INT(gStatusDescriptions); i++) {
|
||||
if (gStatusDescriptions[i].name == NULL)
|
||||
break;
|
||||
|
||||
@@ -44,7 +43,7 @@ s32 PrepareStatusStringArrays(const char *str, STATUSTEXTS(statuses))
|
||||
|
||||
while (*str != '\0') {
|
||||
if (*str == '#') {
|
||||
for (i = 0; i < 99 && gStatusDescriptions[i].name != NULL; i++) {
|
||||
for (i = 0; i < ARRAY_COUNT_INT(gStatusDescriptions) && gStatusDescriptions[i].name != NULL; i++) {
|
||||
if (StrsDifferent_IgnoreCase(gStatusDescriptions[i].name, str, stringLengths[i]) == 0) {
|
||||
for (j = 0; j < counter; j++) {
|
||||
if (AreStatusesTheSame(&gStatusDescriptions[i], statuses[j]) != 0)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
ALIGNED(4) const char gFormattedSteelText[] = _("{color YELLOW}Steel{reset}");
|
||||
ALIGNED(4) const char gFormattedDarkText[] = _("{color YELLOW}Dark{reset}");
|
||||
ALIGNED(4) const char gFormattedDragonText[] = _("{color YELLOW}Dragon{reset}");
|
||||
ALIGNED(4) const char gFormattedGhostText[] = _("{color YELLOW}Ghost{reset}");
|
||||
ALIGNED(4) const char gFormattedRockText[] = _("{color YELLOW}Rock{reset}");
|
||||
ALIGNED(4) const char gFormattedBugText[] = _("{color YELLOW}Bug{reset}");
|
||||
ALIGNED(4) const char gFormattedPsychicText[] = _("{color YELLOW}Psychic{reset}");
|
||||
ALIGNED(4) const char gFormattedFlyingText[] = _("{color YELLOW}Flying{reset}");
|
||||
ALIGNED(4) const char gFormattedGroundText[] = _("{color YELLOW}Ground{reset}");
|
||||
ALIGNED(4) const char gFormattedPoisonText[] = _("{color YELLOW}Poison{reset}");
|
||||
ALIGNED(4) const char gFormattedFightingText[] = _("{color YELLOW}Fighting{reset}");
|
||||
ALIGNED(4) const char gFormattedIceText[] = _("{color YELLOW}Ice{reset} ");
|
||||
ALIGNED(4) const char gFormattedElectricText[] = _("{color YELLOW}Electric{reset}");
|
||||
ALIGNED(4) const char gFormattedGrassText[] = _("{color YELLOW}Grass{reset}");
|
||||
ALIGNED(4) const char gFormattedWaterText[] = _("{color YELLOW}Water{reset}");
|
||||
ALIGNED(4) const char gFormattedFireText[] = _("{color YELLOW}Fire{reset} ");
|
||||
ALIGNED(4) const char gFormattedNormalText[] = _("{color YELLOW}Normal{reset}");
|
||||
ALIGNED(4) const char gFormattedNoneText[] = _("{color YELLOW}None{reset}");
|
||||
@@ -1,18 +0,0 @@
|
||||
ALIGNED(4) const char gSteelText[] = "Steel";
|
||||
ALIGNED(4) const char gDarkText[] = "Dark";
|
||||
ALIGNED(4) const char gDragonText[] = "Dragon";
|
||||
ALIGNED(4) const char gGhostText[] = "Ghost";
|
||||
ALIGNED(4) const char gRockText[] = "Rock";
|
||||
ALIGNED(4) const char gBugText[] = "Bug";
|
||||
ALIGNED(4) const char gPsychicText[] = "Psychic";
|
||||
ALIGNED(4) const char gFlyingText[] = "Flying";
|
||||
ALIGNED(4) const char gGroundText[] = "Ground";
|
||||
ALIGNED(4) const char gPoisonText[] = "Poison";
|
||||
ALIGNED(4) const char gFightingText[] = "Fighting";
|
||||
ALIGNED(4) const char gIceText[] = "Ice";
|
||||
ALIGNED(4) const char gElectricText[] = "Electric";
|
||||
ALIGNED(4) const char gGrassText[] = "Grass";
|
||||
ALIGNED(4) const char gWaterText[] = "Water";
|
||||
ALIGNED(4) const char gFireText[] = "Fire";
|
||||
ALIGNED(4) const char gNormalText[] = "Normal";
|
||||
ALIGNED(4) const char gNoneText[] = "None";
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "pokemon_mid.h"
|
||||
#include "random.h"
|
||||
#include "string_format.h"
|
||||
#include "strings.h"
|
||||
|
||||
extern const char gUnknown_8108F10[];
|
||||
extern const char gUnknown_8108F18[];
|
||||
@@ -22,25 +23,8 @@ extern DungeonLocation gUnknown_8107828[];
|
||||
extern u8 gDungeonFloorCount[];
|
||||
extern u8 gUnknown_81077E8[];
|
||||
extern u8 gUnknown_8108F40[];
|
||||
extern u8 *gUnknown_8115DD4[];
|
||||
extern u8 *gUnknown_8115E54[];
|
||||
extern u8 *gUnknown_8115A2C[];
|
||||
extern u8 *gUnknown_81159DC[];
|
||||
extern u8 *gUnknown_8115E00[];
|
||||
extern u16 gUnknown_8108F42[];
|
||||
extern u8 gUnknown_8108F4A[4];
|
||||
extern u8 *gUnknown_8115ADC[];
|
||||
extern u8 *gUnknown_8115A80[];
|
||||
extern u8 *gUnknown_8115BA4[];
|
||||
extern u8 *gUnknown_8115B3C[];
|
||||
extern u8 *gUnknown_8115C4C[];
|
||||
extern u8 *gUnknown_8115BF4[];
|
||||
extern u8 *gUnknown_8115D14[];
|
||||
extern u8 *gUnknown_8115CB8[];
|
||||
extern u8 *gUnknown_8115D5C[];
|
||||
extern u8 *gUnknown_8115D94[];
|
||||
extern u8 *gUnknown_8115E28[];
|
||||
extern u8 *gUnknown_8115E80[];
|
||||
extern u8 gUnknown_8108F50[];
|
||||
|
||||
static void sub_8090888(u8 *param_1, u8 *param_2);
|
||||
@@ -241,11 +225,11 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
}
|
||||
if (counter > maxPartyMembers) {
|
||||
if (maxPartyMembers == 1) {
|
||||
AddNewLine(*gUnknown_8115A2C,text,newLine);
|
||||
AddNewLine(gText_OnlyOneMonMayEnterDungeon,text,newLine);
|
||||
}
|
||||
else {
|
||||
gFormatArgs[0] = counter - maxPartyMembers;
|
||||
AddNewLine(*gUnknown_81159DC,text,newLine);
|
||||
AddNewLine(gText_TooManyMembersToEnterDungeon,text,newLine);
|
||||
}
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
@@ -254,7 +238,7 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
if (gDungeons[dungeonIndex].maxItemsAllowed != 0 && gDungeons[dungeonIndex].maxItemsAllowed < numInvSlots) {
|
||||
gFormatArgs[0] = gDungeons[dungeonIndex].maxItemsAllowed;
|
||||
gFormatArgs[1] = numInvSlots - gDungeons[dungeonIndex].maxItemsAllowed;
|
||||
AddNewLine((!r8) ? *gUnknown_8115A80 : *gUnknown_8115ADC, text, newLine);
|
||||
AddNewLine((!r8) ? gText_OnlyXItemsMayBeBroughtIntoDungeon : gText_AlsoOnlyXItemsMayBeBroughtIntoDungeon, text, newLine);
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
}
|
||||
@@ -264,7 +248,7 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
|
||||
CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[0],speciesId);
|
||||
if (counter > 3) {
|
||||
AddNewLine((!r8) ? *gUnknown_8115B3C : *gUnknown_8115BA4, text,newLine);
|
||||
AddNewLine((!r8) ? gText_ClientCouldNotJoinTooManyMembers : gText_AlsoClientCouldNotJoinTooManyMembers, text,newLine);
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
}
|
||||
@@ -277,7 +261,7 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
}
|
||||
}
|
||||
if (bodySize > 6) {
|
||||
AddNewLine((!r8) ? *gUnknown_8115BF4 : *gUnknown_8115C4C, text,newLine);
|
||||
AddNewLine((!r8) ? gText_ClientCouldNotJoinNoSpace : gText_AlsoClientCouldNotJoinNoSpace, text,newLine);
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
}
|
||||
@@ -302,7 +286,7 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
|
||||
InitPokemonMove(&move,local_4c[i]);
|
||||
BufferMoveName(gFormatBuffer_Items[0],&move,0);
|
||||
AddNewLine((!r8) ? *gUnknown_8115CB8 : *gUnknown_8115D14, text,newLine);
|
||||
AddNewLine((!r8) ? gText_MustHaveMonWithMove : gText_AlsoMustHaveMonWithMove, text,newLine);
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
}
|
||||
@@ -326,7 +310,7 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
}
|
||||
}
|
||||
if (otherSpeciesId == NUM_MONSTERS) {
|
||||
AddNewLine((!r8) ? *gUnknown_8115D5C : *gUnknown_8115D94, text,newLine);
|
||||
AddNewLine((!r8) ? gText_MustHaveWaterTypeMon : gText_AlsoMustHaveWaterTypeMon, text,newLine);
|
||||
sub_8090888(buffer,text);
|
||||
r8 = TRUE;
|
||||
}
|
||||
@@ -339,38 +323,38 @@ u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bo
|
||||
|
||||
if ((!gDungeons[dungeonIndex].enterWithoutGameSave) || (param_5)) {
|
||||
if (!sp_0xf4) {
|
||||
strcpy(buffer,*gUnknown_8115DD4);
|
||||
strcpy(buffer,gText_IsOkToEnterWithFollowingRules);
|
||||
strcat(buffer,newLine);
|
||||
sp_0xf4 = TRUE;
|
||||
}
|
||||
strcat(buffer,*gUnknown_8115E00);
|
||||
strcat(buffer,gText_GameWilllBeSavedBeforeEntering);
|
||||
strcat(buffer,newLine);
|
||||
}
|
||||
if (gDungeons[dungeonIndex].levelResetTo1) {
|
||||
if (!sp_0xf4) {
|
||||
strcpy(buffer,*gUnknown_8115DD4);
|
||||
strcpy(buffer,gText_IsOkToEnterWithFollowingRules);
|
||||
strcat(buffer,newLine);
|
||||
sp_0xf4 = TRUE;
|
||||
}
|
||||
strcat(buffer,*gUnknown_8115E28);
|
||||
strcat(buffer,gText_TeamWillEnterAtLv1);
|
||||
strcat(buffer,newLine);
|
||||
}
|
||||
if ((gDungeons[dungeonIndex].maxItemsAllowed == 0) && (numInvSlots + sp_0xf0 != 0)) {
|
||||
if (!sp_0xf4) {
|
||||
strcpy(buffer,*gUnknown_8115DD4);
|
||||
strcpy(buffer,gText_IsOkToEnterWithFollowingRules);
|
||||
strcat(buffer,newLine);
|
||||
sp_0xf4 = TRUE;
|
||||
}
|
||||
strcat(buffer,*gUnknown_8115E54);
|
||||
strcat(buffer,gText_AllItemsLostOnEntering);
|
||||
strcat(buffer,newLine);
|
||||
}
|
||||
if ((!gDungeons[dungeonIndex].keepMoney) && (gTeamInventoryRef->teamMoney != 0)) {
|
||||
if (!sp_0xf4) {
|
||||
strcpy(buffer,*gUnknown_8115DD4);
|
||||
strcpy(buffer,gText_IsOkToEnterWithFollowingRules);
|
||||
strcat(buffer,newLine);
|
||||
sp_0xf4 = TRUE;
|
||||
}
|
||||
strcat(buffer, *gUnknown_8115E80);
|
||||
strcat(buffer, gText_AllMoneyLostOnEntering);
|
||||
strcat(buffer,newLine);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "friend_area.h"
|
||||
#include "items.h"
|
||||
#include "pokemon.h"
|
||||
#include "strings.h"
|
||||
|
||||
EWRAM_DATA static bool8 sBoughtFriendAreas[NUM_FRIEND_AREAS] = {0};
|
||||
|
||||
@@ -15,9 +16,6 @@ EWRAM_INIT bool8 *gFriendAreas = {NULL};
|
||||
extern const u8 sUnknown_81098A4[];
|
||||
extern const u8 sUnknown_81098AC[];
|
||||
#include "data/friend_area_settings.h" // 810AA90
|
||||
// data_810AE24.s
|
||||
extern const u8 *sFriendAreaNames[]; // 81139D0
|
||||
extern const u8 *sFriendAreaDescriptions[]; // 8113E30
|
||||
|
||||
void LoadFriendAreas(void)
|
||||
{
|
||||
@@ -97,7 +95,7 @@ void sub_809249C(u8 friendArea, bool8 clear)
|
||||
|
||||
const u8 *GetFriendAreaName(u8 index)
|
||||
{
|
||||
return sFriendAreaNames[index];
|
||||
return gFriendAreaNames[index];
|
||||
}
|
||||
|
||||
u8 GetFriendAreaUnlockCondition(u8 index)
|
||||
@@ -112,7 +110,7 @@ s32 GetFriendAreaPrice(u8 index)
|
||||
|
||||
void sub_8092558(u8 *buffer, u8 index)
|
||||
{
|
||||
sprintfStatic(buffer, sUnknown_81098A4, sFriendAreaNames[index]);
|
||||
sprintfStatic(buffer, sUnknown_81098A4, gFriendAreaNames[index]);
|
||||
}
|
||||
|
||||
void WriteFriendAreaName(u8 *buffer, u8 index, bool8 printPrice)
|
||||
@@ -122,15 +120,15 @@ void WriteFriendAreaName(u8 *buffer, u8 index, bool8 printPrice)
|
||||
|
||||
if (printPrice) {
|
||||
WriteHighDecimal(sFriendAreaSettings[index].price, priceBuffer, 1);
|
||||
sprintfStatic(buffer, sUnknown_81098AC, sFriendAreaNames[index], 96, priceBuffer);
|
||||
sprintfStatic(buffer, sUnknown_81098AC, gFriendAreaNames[index], 96, priceBuffer);
|
||||
}
|
||||
else
|
||||
strcpy(buffer, sFriendAreaNames[index]);
|
||||
strcpy(buffer, gFriendAreaNames[index]);
|
||||
}
|
||||
|
||||
const u8 *GetFriendAreaDescription(u8 index)
|
||||
{
|
||||
return sFriendAreaDescriptions[index];
|
||||
return gFriendAreaDescriptions[index];
|
||||
}
|
||||
|
||||
void UnlockFriendArea(u8 index)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "text_util.h"
|
||||
#include "text.h"
|
||||
#include "string_format.h"
|
||||
#include "strings.h"
|
||||
|
||||
extern const char gItemParaFileName[];
|
||||
extern const char gUnknown_8109794[];
|
||||
@@ -19,11 +20,8 @@ extern const char gUnknown_81097A4[];
|
||||
extern s32 gPowersOfTen[];
|
||||
extern u8 gHighDigits[];
|
||||
extern u16 gGummiStatBoostLUT[];
|
||||
extern u8* gPtrTypeText; // ptr to "Type\0"
|
||||
extern u8* gPtrPPD0Text; // ptr to "PP {VALUE_0} \0"
|
||||
extern u32 gUnknown_81097E8[4]; // some sort of lookup table (16, 18, 20, 22)
|
||||
extern u32 gUnknown_81097F8[4]; // some sort of lookup table (17, 19, 21, 23)
|
||||
extern const char *gUnknown_810AF50[];
|
||||
extern u8 gUnknown_8108F64[0x3f][32]; // some sort of bit lookup table
|
||||
extern u8 gInvalidItemIDs[0x10];
|
||||
|
||||
@@ -652,13 +650,13 @@ u32 sub_80913E0(Item* slot, u32 a2, STATUSTEXTS(statuses))
|
||||
|
||||
InitPokemonMove(buffer8, move);
|
||||
AddDoubleUnderScoreHighlight(a2, 4, 82, 200, COLOR_WHITE_2);
|
||||
PrintFormattedStringOnWindow(4, 84, gPtrTypeText, a2, 0);
|
||||
PrintFormattedStringOnWindow(4, 84, gTextType, a2, 0);
|
||||
moves_data = GetMoveType(buffer8);
|
||||
typestring = GetUnformattedTypeString(moves_data);
|
||||
PrintFormattedStringOnWindow(64, 84, typestring, a2, 0);
|
||||
result = GetMoveBasePP(buffer8);
|
||||
gFormatArgs[0] = result;
|
||||
PrintFormattedStringOnWindow(128, 84, gPtrPPD0Text, a2, 0);
|
||||
PrintFormattedStringOnWindow(128, 84, gText_PP_Value0, a2, 0);
|
||||
}
|
||||
|
||||
sub_80073E0(a2);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "string_format.h"
|
||||
#include "text_util.h"
|
||||
#include "text.h"
|
||||
#include "strings.h"
|
||||
|
||||
static EWRAM_DATA OpenedFile *sWazaParametersFile = { NULL }; // NDS=213C188
|
||||
static EWRAM_DATA MoveDataEntry *sMovesData = { NULL }; // NDS=213C18C
|
||||
@@ -29,11 +30,6 @@ extern const u8 gUnknown_810992B;
|
||||
extern const u8 gUnknown_810992C[];
|
||||
extern const u8 gUnknown_8109930[];
|
||||
|
||||
// data_810AE24.s
|
||||
extern const u8* gPtrTypeText; // "Type"
|
||||
extern const u8 *gRangeNames[];
|
||||
extern const u8* gUnknown_810CF00;
|
||||
|
||||
static void CopyAndResetMove(Move *, Move *);
|
||||
static bool8 sub_80933D8(s32, Move *);
|
||||
static s32 unk_FindMarkedMoveInLinkedSequences44(Move [MAX_MON_MOVES][MAX_MON_MOVES]);
|
||||
@@ -1406,7 +1402,7 @@ static void unk_MovePrintData(Move *move, s32 y)
|
||||
AddDoubleUnderScoreHighlight(y, 4, 72, 200, COLOR_WHITE_2);
|
||||
sub_8092D54(gFormatBuffer_Monsters[0], move);
|
||||
PrintFormattedStringOnWindow(4, 74, gUnknown_810CF00, y, 0);
|
||||
PrintFormattedStringOnWindow(4, 86, gPtrTypeText, y, 0);
|
||||
PrintFormattedStringOnWindow(4, 86, gTextType, y, 0);
|
||||
type = GetMoveType(move);
|
||||
text = GetUnformattedTypeString(type);
|
||||
PrintFormattedStringOnWindow(64, 86, text, y, 0);
|
||||
|
||||
106
src/pokemon_3.c
106
src/pokemon_3.c
@@ -20,11 +20,8 @@
|
||||
#include "string_format.h"
|
||||
#include "dungeon.h"
|
||||
#include "text.h"
|
||||
#include "strings.h"
|
||||
|
||||
extern u8 *gIQSkillNames[];
|
||||
extern u8 *gIQSkillDescriptions[];
|
||||
extern u8 *gTacticsDescriptions[];
|
||||
extern u8 *gTactics[];
|
||||
extern u32 gIQSkillGroups[];
|
||||
|
||||
extern SpriteOAM gShadowSprites[3]; // Shadow sprites of some kind
|
||||
@@ -33,12 +30,6 @@ extern const s16 gUnknown_810AC62; // 0xC
|
||||
extern const s16 gUnknown_810AC68; // 0x8
|
||||
extern const s16 gUnknown_810AC64; // 0x8
|
||||
extern const s16 gUnknown_810AC66; // 0x8
|
||||
extern u8 *gUnknown_810DD58[];
|
||||
extern u8 *gEvolutionStrings[];
|
||||
extern u8 *gExpPts810DD9C_Ptr[];
|
||||
extern u8 *gIQSkill810DD68_Ptr[];
|
||||
extern u8 *gLevel810DD6C_Ptr[];
|
||||
extern u8 *gStatusNames[];
|
||||
extern u8 gUnknown_8107754[];
|
||||
extern u8 gUnknown_810775C[];
|
||||
extern u8 gUnknown_8107768[];
|
||||
@@ -48,33 +39,6 @@ extern u8 gUnknown_8107788[];
|
||||
extern u8 gUnknown_810778C[];
|
||||
extern u8 gUnknown_8107790[];
|
||||
extern u8 gUnknown_8107798[];
|
||||
extern u8 *gUnknown_810DDB8[];
|
||||
extern u8 *gUnknown_810DDD0[];
|
||||
extern u8 *gUnknown_810DDE4[];
|
||||
extern u8 *gUnknown_810DDFC[];
|
||||
extern u8 *gUnknown_810DE0C[];
|
||||
extern u8 *gUnknown_810DE20[];
|
||||
extern u8 *gUnknown_810DE24[];
|
||||
extern u8 *gUnknown_810DE28[];
|
||||
extern u8 *gUnknown_810DE38[];
|
||||
extern u8 *gUnknown_810DE4C[];
|
||||
extern u8 *gUnknown_810DE50[];
|
||||
extern u8 *gUnknown_810DE54[];
|
||||
extern u8 *gUnknown_810DE58[];
|
||||
extern u8 *gUnknown_810DE6C[];
|
||||
extern u8 *gUnknown_810DE80[];
|
||||
extern u8 *gUnknown_810DE98[];
|
||||
extern u8 *gUnknown_810DEB4[];
|
||||
extern u8 *gUnknown_810DEC8[];
|
||||
extern u8 *gUnknown_810DEDC[];
|
||||
extern u8 *gUnknown_810DEF4[];
|
||||
extern u8 *gUnknown_810DF78[];
|
||||
extern u8 *gUnknown_810DF84[];
|
||||
extern u8 *gUnknown_810DF98[];
|
||||
extern u8 *gUnknown_810DFB4[];
|
||||
extern u8 *gUnknown_810DFC8[];
|
||||
extern u8 *gUnknown_810E02C[];
|
||||
extern u8 *gUnknown_8115718[];
|
||||
|
||||
// 2, 4, 6, 7, 8, 9, 0xA, 0xD, 0xF, 0x11
|
||||
extern s32 gUnknown_810AC90[10];
|
||||
@@ -349,22 +313,22 @@ UNUSED static void GetMonOffenseStats(PokemonStruct1 *mon, struct UnusedOffenseS
|
||||
}
|
||||
}
|
||||
|
||||
u8 *GetIQSkillName(u8 skill)
|
||||
const u8 *GetIQSkillName(u8 skill)
|
||||
{
|
||||
return gIQSkillNames[skill];
|
||||
}
|
||||
|
||||
void CopyTacticsNameToBuffer(char *buffer, u8 tactic)
|
||||
{
|
||||
strncpy(buffer, gTactics[tactic], 0x14);
|
||||
strncpy(buffer, gTacticsNames[tactic], 0x14);
|
||||
}
|
||||
|
||||
u8 *GetIQSkillDescription(u8 skill)
|
||||
const u8 *GetIQSkillDescription(u8 skill)
|
||||
{
|
||||
return gIQSkillDescriptions[skill];
|
||||
}
|
||||
|
||||
u8 *GetTacticsDescription(u8 tactic)
|
||||
const u8 *GetTacticsDescription(u8 tactic)
|
||||
{
|
||||
return gTacticsDescriptions[tactic];
|
||||
}
|
||||
@@ -1066,61 +1030,61 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,gUnknown_8107754,windowId,'\0');
|
||||
gFormatArgs[0] = mon->level;
|
||||
gFormatArgs[1] = mon->exp;
|
||||
PrintFormattedStringOnWindow(4,y,*gLevel810DD6C_Ptr,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gText_LevelUnkMacro,windowId,'\0');
|
||||
y += 0xA;
|
||||
PrintFormattedStringOnWindow(4,y,*gExpPts810DD9C_Ptr,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gText_ExpPtsUnkMacro,windowId,'\0');
|
||||
y += 0xA;
|
||||
if (mon->level < 100) {
|
||||
GetPokemonLevelData(&levelData,mon->species,mon->level + 1);
|
||||
gFormatArgs[0] = levelData.expRequired - mon->exp;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DDB8,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gText_ToNextLevel,windowId,'\0');
|
||||
}
|
||||
y += 0xC;
|
||||
gFormatArgs[0] = mon->HP1;
|
||||
gFormatArgs[1] = mon->HP2;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DDD0,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DDD0,windowId,'\0');
|
||||
y += 0xA;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DDE4,windowId,'\0');
|
||||
str = *gUnknown_810DE0C;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DDE4,windowId,'\0');
|
||||
str = gUnknown_810DE0C;
|
||||
gFormatArgs[0] = mon->offense.att[0];
|
||||
if (mon->atkBoost != 0) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + mon->atkBoost;
|
||||
str = *gUnknown_810DE20;
|
||||
str = gUnknown_810DE20;
|
||||
}
|
||||
PrintFormattedStringOnWindow(4,y,str,windowId,'\0');
|
||||
if (mon->defBoost != 0) {
|
||||
gFormatArgs[0] = mon->offense.def[0] + mon->defBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE4C,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE4C,windowId,'\0');
|
||||
}
|
||||
else {
|
||||
gFormatArgs[0] = mon->offense.def[0];
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE38,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE38,windowId,'\0');
|
||||
}
|
||||
y += 0xA;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DDFC,windowId,'\0');
|
||||
str = *gUnknown_810DE24;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DDFC,windowId,'\0');
|
||||
str = gUnknown_810DE24;
|
||||
gFormatArgs[0] = mon->offense.att[1];
|
||||
if (mon->spAtkBoost != 0) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + mon->spAtkBoost;
|
||||
str = *gUnknown_810DE28;
|
||||
str = gUnknown_810DE28;
|
||||
}
|
||||
PrintFormattedStringOnWindow(4,y,str,windowId,'\0');
|
||||
if (mon->spDefBoost != 0) {
|
||||
gFormatArgs[0] = mon->offense.def[1] + mon->spDefBoost;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE54,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE54,windowId,'\0');
|
||||
}
|
||||
else {
|
||||
gFormatArgs[0] = mon->offense.def[1];
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE50,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE50,windowId,'\0');
|
||||
}
|
||||
y += 0xA;
|
||||
if (ItemExists(&mon->item)) {
|
||||
sub_8090E14(gFormatBuffer_Items[0],&mon->item,0);
|
||||
}
|
||||
else {
|
||||
strcpy(gFormatBuffer_Items[0],*gUnknown_810DE58);
|
||||
strcpy(gFormatBuffer_Items[0],gUnknown_810DE58);
|
||||
}
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE6C,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE6C,windowId,'\0');
|
||||
y += 0xC;
|
||||
gFormatArgs[0] = mon->IQ;
|
||||
iVar8 = mon->IQ / 10;
|
||||
@@ -1132,12 +1096,12 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
}
|
||||
|
||||
InlineStrcpy(gFormatBuffer_Monsters[0],gUnknown_8115718[iVar8]);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE80,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE80,windowId,'\0');
|
||||
y += 0xA;
|
||||
if (!mon->isTeamLeader)
|
||||
{
|
||||
CopyTacticsNameToBuffer(gFormatBuffer_Monsters[0],mon->tactic);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DE98,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DE98,windowId,'\0');
|
||||
}
|
||||
y += 0xA;
|
||||
break;
|
||||
@@ -1163,7 +1127,7 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
s32 iVar11;
|
||||
bool8 bVar10;
|
||||
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,*gUnknown_810DD58,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,gUnknown_810DD58,windowId,'\0');
|
||||
iVar11 = mon->unk56 - 1;
|
||||
y -= 0xC;
|
||||
bVar10 = FALSE;
|
||||
@@ -1188,7 +1152,7 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
}
|
||||
|
||||
if (!bVar10) {
|
||||
PrintFormattedStringOnWindow(0xc,0x20,*gUnknown_810DF78,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(0xc,0x20,gUnknown_810DF78,windowId,'\0');
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1197,7 +1161,7 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
bool8 bVar11;
|
||||
u8 iqSkillBuffer[24];
|
||||
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,*gIQSkill810DD68_Ptr,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,gText_IqSkills,windowId,'\0');
|
||||
GetNumAvailableIQSkills(iqSkillBuffer,mon->IQ);
|
||||
iVar13 = mon->unk40 - 1;
|
||||
|
||||
@@ -1212,7 +1176,7 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
if (0x17 < iVar13)
|
||||
break;
|
||||
if (iqSkillBuffer[iVar13] != 0) {
|
||||
u8 *iqSkillName;
|
||||
const u8 *iqSkillName;
|
||||
|
||||
bVar11 = TRUE;
|
||||
iqSkillName = GetIQSkillName(iqSkillBuffer[iVar13]);
|
||||
@@ -1232,7 +1196,7 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
}
|
||||
|
||||
if (!bVar11) {
|
||||
PrintFormattedStringOnWindow(0xc,0x20,*gUnknown_810DF84,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(0xc,0x20,gUnknown_810DF84,windowId,'\0');
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1240,23 +1204,23 @@ void CreatePokemonInfoTabScreen(s32 param_1, s32 param_2, struct unkStruct_808FF
|
||||
PrintFormattedStringOnWindow(param_2 * 8 + 0x10,0,gUnknown_8107798,windowId,'\0');
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[0],mon->species);
|
||||
gFormatArgs[0] = mon->species;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DEB4,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DEB4,windowId,'\0');
|
||||
y += 0xA;
|
||||
InlineStrncpy(gFormatBuffer_Items[0],GetFriendAreaName(GetFriendArea(mon->species)),0x50);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DEC8,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DEC8,windowId,'\0');
|
||||
y += 0xA;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DEDC,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DEDC,windowId,'\0');
|
||||
y += 0xD;
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DFB4,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DFB4,windowId,'\0');
|
||||
y += 0xA;
|
||||
PrintYellowDungeonNametoBuffer(gFormatBuffer_Items[0],&mon->dungeonLocation);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DFC8,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DFC8,windowId,'\0');
|
||||
y += 0xD;
|
||||
strncpy(gFormatBuffer_Monsters[0],GetCategoryString(mon->species),0x14);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DEF4,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DEF4,windowId,'\0');
|
||||
y += 0xD;
|
||||
strcpy(gFormatBuffer_Monsters[0],gUnknown_810E02C[GetBodySize(mon->species)]);
|
||||
PrintFormattedStringOnWindow(4,y,*gUnknown_810DF98,windowId,'\0');
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_810DF98,windowId,'\0');
|
||||
y += 0xD;
|
||||
PrintFormattedStringOnWindow(4,y,gEvolutionStrings[mon->unk4C],windowId,'\0');
|
||||
break;
|
||||
|
||||
1178
src/strings.c
Normal file
1178
src/strings.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,98 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "text_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
#define NUM_POKEMON_TYPES 18
|
||||
|
||||
extern const char gNoneText[];
|
||||
extern const char gNormalText[];
|
||||
extern const char gFireText[];
|
||||
extern const char gWaterText[];
|
||||
extern const char gGrassText[];
|
||||
extern const char gElectricText[];
|
||||
extern const char gIceText[];
|
||||
extern const char gFightingText[];
|
||||
extern const char gPoisonText[];
|
||||
extern const char gGroundText[];
|
||||
extern const char gFlyingText[];
|
||||
extern const char gPsychicText[];
|
||||
extern const char gBugText[];
|
||||
extern const char gRockText[];
|
||||
extern const char gGhostText[];
|
||||
extern const char gDragonText[];
|
||||
extern const char gDarkText[];
|
||||
extern const char gSteelText[];
|
||||
|
||||
extern const char gFormattedNoneText[];
|
||||
extern const char gFormattedNormalText[];
|
||||
extern const char gFormattedFireText[];
|
||||
extern const char gFormattedWaterText[];
|
||||
extern const char gFormattedGrassText[];
|
||||
extern const char gFormattedElectricText[];
|
||||
extern const char gFormattedIceText[];
|
||||
extern const char gFormattedFightingText[];
|
||||
extern const char gFormattedPoisonText[];
|
||||
extern const char gFormattedGroundText[];
|
||||
extern const char gFormattedFlyingText[];
|
||||
extern const char gFormattedPsychicText[];
|
||||
extern const char gFormattedBugText[];
|
||||
extern const char gFormattedRockText[];
|
||||
extern const char gFormattedGhostText[];
|
||||
extern const char gFormattedDragonText[];
|
||||
extern const char gFormattedDarkText[];
|
||||
extern const char gFormattedSteelText[];
|
||||
|
||||
|
||||
const char * const gUnformattedTypeStrings[NUM_POKEMON_TYPES] =
|
||||
{
|
||||
gNoneText,
|
||||
gNormalText,
|
||||
gFireText,
|
||||
gWaterText,
|
||||
gGrassText,
|
||||
gElectricText,
|
||||
gIceText,
|
||||
gFightingText,
|
||||
gPoisonText,
|
||||
gGroundText,
|
||||
gFlyingText,
|
||||
gPsychicText,
|
||||
gBugText,
|
||||
gRockText,
|
||||
gGhostText,
|
||||
gDragonText,
|
||||
gDarkText,
|
||||
gSteelText,
|
||||
};
|
||||
|
||||
#include "data/unformatted_type_names.h"
|
||||
|
||||
const char * const gFormattedTypeStrings[NUM_POKEMON_TYPES] =
|
||||
{
|
||||
gFormattedNoneText,
|
||||
gFormattedNormalText,
|
||||
gFormattedFireText,
|
||||
gFormattedWaterText,
|
||||
gFormattedGrassText,
|
||||
gFormattedElectricText,
|
||||
gFormattedIceText,
|
||||
gFormattedFightingText,
|
||||
gFormattedPoisonText,
|
||||
gFormattedGroundText,
|
||||
gFormattedFlyingText,
|
||||
gFormattedPsychicText,
|
||||
gFormattedBugText,
|
||||
gFormattedRockText,
|
||||
gFormattedGhostText,
|
||||
gFormattedDragonText,
|
||||
gFormattedDarkText,
|
||||
gFormattedSteelText,
|
||||
};
|
||||
|
||||
#include "data/formatted_type_names.h"
|
||||
|
||||
|
||||
extern u8 *gAbilityNames[];
|
||||
extern u8 *AbilityDescriptions[];
|
||||
extern u8 gIsTypePhysicalTable[];
|
||||
extern u8 gUnknown_810AC6A[];
|
||||
|
||||
@@ -143,7 +52,7 @@ void CopyStringtoBuffer(u8 *buffer, u8 *string)
|
||||
}
|
||||
|
||||
void BoundedCopyStringtoBuffer(u8 *buffer, u8 *string, s32 size)
|
||||
{
|
||||
{
|
||||
while( 1 ) {
|
||||
if (size-- < 1) {
|
||||
break;
|
||||
@@ -184,7 +93,7 @@ void CopyAbilityNametoBuffer(char *buffer, u8 index)
|
||||
strncpy(buffer, gAbilityNames[index], 0x50);
|
||||
}
|
||||
|
||||
u8 *GetAbilityDescription(u8 index)
|
||||
const u8 *GetAbilityDescription(u8 index)
|
||||
{
|
||||
return AbilityDescriptions[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user