pokemon data clean-up

This commit is contained in:
DizzyEggg
2025-06-08 00:21:39 +02:00
parent cda8055c92
commit ab2394c4a4
8 changed files with 25 additions and 54 deletions

View File

@@ -2,35 +2,7 @@
.align 2,0
@ pokemon_3 #1
.string "pksdir0\0"
.global gIQSkillGroups
gIQSkillGroups: @ 81076E4
.4byte 9999
.4byte 4
.4byte 1
.4byte 2
.4byte 4
.4byte 4
.4byte 6
.4byte 7
.4byte 8
.4byte 9
.4byte 9
.4byte 9
.4byte 10
.4byte 10
.4byte 11
.4byte 11
.4byte 14
.4byte 14
.4byte 14
.4byte 16
.4byte 16
.4byte 9
.4byte 17
.4byte 6
@ pokemon_3 #2
.string "pksdir0\0"
@ pokemon_3 #3

View File

@@ -2,7 +2,6 @@
#define GUARD_CODE_803D110_H
void nullsub_56(void);
void ShowDungeonNameBanner_Async(void);
void sub_803DF60(void);
void sub_803E02C(void);
void sub_803E13C(void);

View File

@@ -0,0 +1,6 @@
#ifndef GUARD_DUNGEON_NAME_BANNER_H
#define GUARD_DUNGEON_NAME_BANNER_H
void ShowDungeonNameBanner_Async(void);
#endif

View File

@@ -671,6 +671,7 @@ SECTIONS {
src/dungeon_cutscene_no_one_here.o(.rodata);
src/dungeon_portrait_placement.o(.rodata);
src/pokemon.o(.rodata);
src/pokemon_3.o(.rodata);
data/data_81076E4.o(.rodata);
src/game_options.o(.rodata);
src/random_mersenne_twister.o(.rodata);

View File

@@ -1,5 +1,6 @@
#include "global.h"
#include "globaldata.h"
#include "dungeon_name_banner.h"
#include "constants/dungeon.h"
#include "structs/str_202ED28.h"
#include "structs/str_202EDE8.h"

View File

@@ -33,15 +33,6 @@ struct unkStruct_8107654
s32 unk4;
};
ALIGNED(4) static const char sMonsterParameterFileName[] = "monspara";
ALIGNED(4) static const char gUnknown_8107600[] = _("{color YELLOW_RAW}%s{reset}");
ALIGNED(4) static const char gUnknown_8107608[] = _("{color CYAN_RAW}%s{reset}");
ALIGNED(4) static const char gUnownLetters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?";
ALIGNED(4) static const char gUnknown_8107630[] = "%s%c";
ALIGNED(4) static const char gUnknown_8107638[] = "%s";
ALIGNED(4) static const char gUnknown_810763C[] = _("{color}%c%s{reset}");
static const u8 gUnknown_8107645[12] = {0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
extern s16 gFrenzyPlantIQReq; // 0x14d
extern s16 gHydroCannonIQReq; // 0x14d
extern s16 gBlastBurnIQReq; // 0x14d
@@ -55,7 +46,7 @@ extern void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1*, PokemonStruct
void LoadMonsterParameters(void)
{
gRecruitedPokemonRef = &gRecruitedPokemon;
gMonsterParametersFile = OpenFileAndGetFileDataPtr(sMonsterParameterFileName, &gSystemFileArchive);
gMonsterParametersFile = OpenFileAndGetFileDataPtr("monspara", &gSystemFileArchive);
gMonsterParameters = (MonsterDataEntry *)gMonsterParametersFile->data;
gLevelCurrentPokeId = 0;
// More in blue
@@ -653,30 +644,25 @@ void CopyMonsterNameToBuffer(u8 * buffer, s32 index)
void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index)
{
s32 new_index = index;
sprintfStatic(buffer, gUnknown_8107600, gMonsterParameters[new_index].species); // {color YELLOW}%s{reset}
sprintfStatic(buffer, _("{color YELLOW_RAW}%s{reset}"), gMonsterParameters[new_index].species);
}
void CopyCyanMonsterNametoBuffer(u8 *buffer, s32 index_)
{
s32 index = (s16) index_;
sprintfStatic(buffer, gUnknown_8107608, gMonsterParameters[index].species); // {color CYAN}%s{reset}
sprintfStatic(buffer, _("{color CYAN_RAW}%s{reset}"), gMonsterParameters[index].species);
}
void sub_808D930(u8 *buffer, s32 index)
{
char *unownString;
s32 unownIndex;
const char *preload;
s16 index_s16 = index;
if (GetBaseSpecies(index_s16) == MONSTER_UNOWN) {
preload = gUnknown_8107630; // %s%c
unownString = GetMonSpecies(MONSTER_UNOWN);
unownIndex = GetUnownIndex(index_s16);
sprintfStatic(buffer,preload,unownString,gUnownLetters[unownIndex]); // ABCDEFGHIJKLMNOPQRSTUVWXYZ!?
char *const unownLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?";
sprintfStatic(buffer,"%s%c",GetMonSpecies(MONSTER_UNOWN),unownLetters[GetUnownIndex(index_s16)]);
}
else {
sprintfStatic(buffer,gUnknown_8107638, gMonsterParameters[index_s16].species); // %s
sprintfStatic(buffer,"%s", gMonsterParameters[index_s16].species);
}
}
@@ -693,7 +679,7 @@ void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 color
if (colorNum == COLOR_WHITE) {
colorNum = COLOR_CYAN;
}
sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset}
sprintfStatic(buffer,_("{color}%c%s{reset}"),colorNum,nameBuffer);
}
void sub_808D9DC(u8 *buffer, PokemonStruct2 *param_2, s32 colorNum)
@@ -704,7 +690,7 @@ void sub_808D9DC(u8 *buffer, PokemonStruct2 *param_2, s32 colorNum)
if (colorNum == COLOR_WHITE) {
colorNum = COLOR_YELLOW;
}
sprintfStatic(buffer,gUnknown_810763C,colorNum,nameBuffer); // {color}%c%s{reset}
sprintfStatic(buffer,_("{color}%c%s{reset}"),colorNum,nameBuffer);
}
void sub_808DA0C(u8 *buffer, PokemonStruct2 *param_2)
@@ -712,7 +698,7 @@ void sub_808DA0C(u8 *buffer, PokemonStruct2 *param_2)
u8 nameBuffer [20];
sub_80922B4(nameBuffer, param_2->name, POKEMON_NAME_LENGTH);
sprintfStatic(buffer,gUnknown_8107638,nameBuffer); // %s
sprintfStatic(buffer,"%s",nameBuffer);
}
void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon)
@@ -720,6 +706,8 @@ void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon)
sub_80922B4(buffer, pokemon->name, POKEMON_NAME_LENGTH);
}
static const u8 gUnknown_8107645[12] = {0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
bool8 sub_808DA44(s32 _species, u32 a2_)
{
// this is the dumbest thing ever, but just making a1 a s16 and

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "constants/ability.h"
#include "constants/colors.h"
#include "constants/dungeon.h"
@@ -33,8 +34,6 @@ struct UnusedOffenseStruct
u8 spDefBoost;
};
extern u32 gIQSkillGroups[];
extern SpriteOAM gShadowSprites[3]; // Shadow sprites of some kind
extern const s16 gUnknown_810AC60; // 0xC
extern const s16 gUnknown_810AC62; // 0xC
@@ -444,6 +443,10 @@ void ToggleIQSkill(IqSkillFlags *iq, u32 skillIndex)
}
}
static const s32 gIQSkillGroups[] = {
9999, 4, 1, 2, 4, 4, 6, 7, 8, 9, 9, 9, 10, 10, 11, 11, 14, 14, 14, 16, 16, 9, 17, 6
};
void SetIQSkill(IqSkillFlags *iq, u32 skillIndex)
{
s32 iqSkill;

View File

@@ -35,6 +35,7 @@
#include "dungeon_message_log.h"
#include "dungeon_misc.h"
#include "dungeon_music.h"
#include "dungeon_name_banner.h"
#include "dungeon_random.h"
#include "dungeon_strings.h"
#include "dungeon_serializer.h"