Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
2a894a9
Style align 1
AsparagusEduardo Dec 20, 2025
e36830f
BoxPokemon_SetData
AsparagusEduardo Dec 20, 2025
8594a7a
Pokemon_SetData
AsparagusEduardo Dec 20, 2025
884e685
Style align 2
AsparagusEduardo Dec 20, 2025
64a4e93
Style align 3
AsparagusEduardo Dec 20, 2025
947dec6
Pokemon_GetData
AsparagusEduardo Dec 20, 2025
4aeaa49
BoxPokemon_InitWith
AsparagusEduardo Dec 20, 2025
6aaaa8a
BoxPokemon_GetData
AsparagusEduardo Dec 20, 2025
66ee39e
Pokemon_InitWithNature
AsparagusEduardo Dec 20, 2025
755e6f7
Pokemon_InitWithGenderNatureLetter
AsparagusEduardo Dec 20, 2025
92d121c
Pokemon_CalcStats
AsparagusEduardo Dec 20, 2025
ddb94d5
BoxPokemon_CalcLevel
AsparagusEduardo Dec 20, 2025
4d309c9
Pokemon_CalcLevel
AsparagusEduardo Dec 20, 2025
04907a2
SpeciesData_NewFromSpecies
AsparagusEduardo Dec 20, 2025
40d57c0
SpeciesData_NewFromForm
AsparagusEduardo Dec 20, 2025
64a2767
SpeciesData_LoadForm
AsparagusEduardo Dec 20, 2025
6bed139
BoxPokemon_AddDataInternal
AsparagusEduardo Dec 20, 2025
a5ed119
BoxPokemon_SetDataInternal
AsparagusEduardo Dec 20, 2025
a875bc5
Pokemon_GetDataInternal
AsparagusEduardo Dec 20, 2025
d85f94a
Simplify encryption/decryption
AsparagusEduardo Dec 20, 2025
4c2526c
Species_GetValue
AsparagusEduardo Dec 21, 2025
b62d5eb
Pokemon_New
AsparagusEduardo Dec 21, 2025
deca473
Pokemon_CalcLevelAndStats
AsparagusEduardo Dec 21, 2025
e813780
Species_SanitizeFormId
AsparagusEduardo Dec 21, 2025
29f2c06
Species_GetFormValue
AsparagusEduardo Dec 21, 2025
72eac41
Pokemon_GetPercentToNextLevel
AsparagusEduardo Dec 21, 2025
9df8a2b
Cleanup
AsparagusEduardo Dec 21, 2025
3bc351e
Species_GetExpAtLevel
AsparagusEduardo Dec 21, 2025
62e2047
ExpRate
AsparagusEduardo Dec 21, 2025
649d2fa
Pokemon_GetCurrentLevelBaseExp
AsparagusEduardo Dec 21, 2025
2c6e029
SPECIES_DATA
AsparagusEduardo Dec 21, 2025
9e04a0e
Gender
AsparagusEduardo Dec 21, 2025
0d53968
Shiny
AsparagusEduardo Dec 21, 2025
367bf73
Nature
AsparagusEduardo Dec 21, 2025
ac36403
Experience
AsparagusEduardo Dec 21, 2025
53487cc
Cleanup
AsparagusEduardo Dec 21, 2025
a07fee0
Pokemon_GetBoxMon
AsparagusEduardo Dec 21, 2025
aa9528b
Size
AsparagusEduardo Dec 21, 2025
2d56acc
Friendship
AsparagusEduardo Dec 21, 2025
ff382a5
Personality_GenerateShiny
AsparagusEduardo Dec 21, 2025
c0bdbe9
Pokemon_TryLevelUp
AsparagusEduardo Dec 21, 2025
e13f14f
Moves
AsparagusEduardo Dec 21, 2025
4cb5ef6
Copy
AsparagusEduardo Dec 21, 2025
1a26c97
make format
AsparagusEduardo Dec 22, 2025
243cc29
Pokemon_InitWithParams
AsparagusEduardo Dec 22, 2025
76a4af3
TMHM
AsparagusEduardo Dec 22, 2025
144c0ac
SetData
AsparagusEduardo Dec 24, 2025
02a3ab3
Encryption
AsparagusEduardo Dec 24, 2025
4c376de
Pokemon_InitAndCalcStats
AsparagusEduardo Dec 24, 2025
e0dcf4a
Encryption2
AsparagusEduardo Dec 24, 2025
71a1b53
Lots of gfx
AsparagusEduardo Dec 26, 2025
167c0ff
Pokemon_IncreaseData
AsparagusEduardo Dec 26, 2025
c51c427
define name sync
AsparagusEduardo Dec 26, 2025
7c36a09
Merge branch 'main' into pret/pr/sinjoh/pokemon.c
AsparagusEduardo Dec 26, 2025
04d7e2b
Pokérus
AsparagusEduardo Dec 27, 2025
5463ace
Arceus form
AsparagusEduardo Dec 27, 2025
afe50b0
Giratina form
AsparagusEduardo Dec 27, 2025
6002586
Pokemon_UpdateAbility
AsparagusEduardo Dec 27, 2025
c4d52da
Shaymin form
AsparagusEduardo Dec 27, 2025
f2c62bd
MAX_MON_MOVES
AsparagusEduardo Dec 27, 2025
7f8215f
Rotom form
AsparagusEduardo Dec 27, 2025
4c7616a
Battle facility banned
AsparagusEduardo Dec 27, 2025
b17be18
BoxPokemon_BelongsToPlayer
AsparagusEduardo Dec 27, 2025
dea3603
Wild held item
AsparagusEduardo Dec 27, 2025
d2f2e23
Pokemon_SetPersonality
AsparagusEduardo Dec 27, 2025
033772d
Flavor affinity
AsparagusEduardo Dec 27, 2025
d5119ff
Evolution
AsparagusEduardo Dec 27, 2025
b9339c0
BoxPokemon_GetDataBlock
AsparagusEduardo Dec 27, 2025
fb428db
Pokemon_Size
AsparagusEduardo Dec 27, 2025
e44df32
IVs
AsparagusEduardo Dec 28, 2025
df3b5c1
BoxPokemon_RestorePP
AsparagusEduardo Dec 28, 2025
d2c67ca
Species_GetFormNarcIndex
AsparagusEduardo Dec 28, 2025
1f26d4b
(Box)Pokemon_(Unl/L)ockEncryption -> (Box)Pokemon_(De/En)cryptData
AsparagusEduardo Dec 30, 2025
389b89c
BattleFacility -> BattleFrontier
AsparagusEduardo Dec 31, 2025
b2f79be
Base form renames
AsparagusEduardo Jan 2, 2026
0e7c374
Merge branch 'main' into pret/pr/sinjoh/pokemon.c
AsparagusEduardo Jan 2, 2026
091142b
format
AsparagusEduardo Jan 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions asm/macros/scrcmd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4738,9 +4738,9 @@
.short \width
.endm

.macro SetPartyGiratinaForm form
.macro UpdatePartyGiratinaForm forceOrigin
.short 808
.short \form
.short \forceOrigin
.endm

.macro ScrCmd_329 arg0, arg1, arg2, arg3
Expand Down
12 changes: 6 additions & 6 deletions generated/evolution_methods.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
EVO_NONE
EVO_LEVEL_HAPPINESS
EVO_LEVEL_HAPPINESS_DAY
EVO_LEVEL_HAPPINESS_NIGHT
EVO_LEVEL_FRIENDSHIP
EVO_LEVEL_FRIENDSHIP_DAY
EVO_LEVEL_FRIENDSHIP_NIGHT
EVO_LEVEL
EVO_TRADE
EVO_TRADE_WITH_HELD_ITEM
EVO_TRADE_HELD_ITEM
EVO_USE_ITEM
EVO_LEVEL_ATK_GT_DEF
EVO_LEVEL_ATK_EQ_DEF
Expand All @@ -16,8 +16,8 @@ EVO_LEVEL_SHEDINJA
EVO_LEVEL_BEAUTY
EVO_USE_ITEM_MALE
EVO_USE_ITEM_FEMALE
EVO_LEVEL_WITH_HELD_ITEM_DAY
EVO_LEVEL_WITH_HELD_ITEM_NIGHT
EVO_LEVEL_HELD_ITEM_DAY
EVO_LEVEL_HELD_ITEM_NIGHT
EVO_LEVEL_KNOW_MOVE
EVO_LEVEL_SPECIES_IN_PARTY
EVO_LEVEL_MALE
Expand Down
2 changes: 1 addition & 1 deletion generated/gender_ratios.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ GENDER_RATIO_FEMALE_50 = 127
GENDER_RATIO_FEMALE_75 = 191
GENDER_RATIO_FEMALE_87_5 = 223
GENDER_RATIO_FEMALE_ONLY = 254
GENDER_RATIO_NO_GENDER = 255
GENDER_RATIO_UNKNOWN = 255
4 changes: 2 additions & 2 deletions generated/species_data_params.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPECIES_DATA_BASE_SP_DEF
SPECIES_DATA_TYPE_1
SPECIES_DATA_TYPE_2
SPECIES_DATA_CATCH_RATE
SPECIES_DATA_BASE_EXP_REWARD
SPECIES_DATA_EXP_YIELD
SPECIES_DATA_EV_HP_YIELD
SPECIES_DATA_EV_ATK_YIELD
SPECIES_DATA_EV_DEF_YIELD
Expand All @@ -17,7 +17,7 @@ SPECIES_DATA_EV_SP_DEF_YIELD
SPECIES_DATA_HELD_ITEM_COMMON
SPECIES_DATA_HELD_ITEM_RARE
SPECIES_DATA_GENDER_RATIO
SPECIES_DATA_HATCH_CYCLES
SPECIES_DATA_EGG_CYCLES
SPECIES_DATA_BASE_FRIENDSHIP
SPECIES_DATA_EXP_RATE
SPECIES_DATA_EGG_GROUP_1
Expand Down
8 changes: 4 additions & 4 deletions include/applications/poffin_case/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ typedef struct PoffinManagerMessages {
String *discardStr;
String *thrownOutStr;
String *headerStr;
String *flavorStrs[FLAVOR_MAX + 1];
String *flavorDescs[FLAVOR_MAX];
String *flavorStrs[FLAVOR_COUNT + 1];
String *flavorDescs[FLAVOR_COUNT];
u8 textDelay;
u8 unused[3];
} PoffinManagerMessages;
Expand Down Expand Up @@ -74,8 +74,8 @@ typedef struct PoffinManager {
SpriteSystem *spriteSys;
SpriteManager *spriteMan;
Sprite *listSprites[NUM_LIST_SPRITES];
Sprite *flavorSprites[FLAVOR_MAX];
Sprite *buttonSprites[FLAVOR_MAX + 1];
Sprite *flavorSprites[FLAVOR_COUNT];
Sprite *buttonSprites[FLAVOR_COUNT + 1];
PoffinSpriteManager *poffinSpriteMan;
PoffinSprite *poffinSprite;
} PoffinManager;
Expand Down
6 changes: 3 additions & 3 deletions include/applications/pokemon_summary_screen/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ typedef struct PokemonSummaryMonData {
u8 ability;
u8 nature;

u16 moves[LEARNED_MOVES_MAX];
u8 curPP[LEARNED_MOVES_MAX];
u8 maxPP[LEARNED_MOVES_MAX];
u16 moves[MAX_MON_MOVES];
u8 curPP[MAX_MON_MOVES];
u8 maxPP[MAX_MON_MOVES];

u8 OTGender;
u8 cool;
Expand Down
4 changes: 2 additions & 2 deletions include/battle/ai_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ typedef struct AIContext {
u8 padding0013;
int padding0014; // this does not match with a u32, weird

u8 moveDamageRolls[LEARNED_MOVES_MAX];
u8 moveDamageRolls[MAX_MON_MOVES];

u16 battlerMoves[MAX_BATTLERS][LEARNED_MOVES_MAX];
u16 battlerMoves[MAX_BATTLERS][MAX_MON_MOVES];
u8 battlerAbilities[MAX_BATTLERS];
u16 battlerHeldItems[MAX_BATTLERS];

Expand Down
6 changes: 3 additions & 3 deletions include/battle/battle_mon.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef struct BattleMon {
u16 speed;
u16 spAttack;
u16 spDefense;
u16 moves[LEARNED_MOVES_MAX];
u16 moves[MAX_MON_MOVES];

u32 hpIV : 5;
u32 attackIV : 5;
Expand Down Expand Up @@ -96,8 +96,8 @@ typedef struct BattleMon {
u32 pressureAnnounced : 1;
u32 padding0028_0B : 2;

u8 ppCur[LEARNED_MOVES_MAX];
u8 ppUps[LEARNED_MOVES_MAX];
u8 ppCur[MAX_MON_MOVES];
u8 ppUps[MAX_MON_MOVES];

u8 level;
u8 friendship;
Expand Down
6 changes: 3 additions & 3 deletions include/battle/move_display_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include "constants/moves.h"

typedef struct MoveDisplayInfo {
u16 move[LEARNED_MOVES_MAX];
u16 curPP[LEARNED_MOVES_MAX];
u16 maxPP[LEARNED_MOVES_MAX];
u16 move[MAX_MON_MOVES];
u16 curPP[MAX_MON_MOVES];
u16 maxPP[MAX_MON_MOVES];
} MoveDisplayInfo;

#endif // POKEPLATINUM_MOVE_DISPLAY_INFO
2 changes: 1 addition & 1 deletion include/constants/flavor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enum Flavor {
FLAVOR_BITTER,
FLAVOR_SOUR,

FLAVOR_MAX,
FLAVOR_COUNT,
};

#endif // POKEPLATINUM_CONSTANTS_FLAVOR_H
2 changes: 1 addition & 1 deletion include/constants/moves.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "generated/move_classes.h"
#include "generated/moves.h"

#define LEARNED_MOVES_MAX 4
#define MAX_MON_MOVES 4
#define MOVE_NOT_SELECTED 0xFF

#define GBA_NUM_VALID_MOVES MOVE_PSYCHO_BOOST
Expand Down
9 changes: 5 additions & 4 deletions include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@

#define MAX_POKEMON_SHEEN 255
#define MAX_POKEMON_MARKINGS 6
#define MAX_POKEMON_LEVEL 100
#define MAX_MON_LEVEL 100
#define EGG_POKEMON_LEVEL 1

#define EVOLVE_FRIENDSHIP_THRESHOLD 220
#define FRIENDSHIP_EVO_THRESHOLD 220

#define BASE_FRIENDSHIP_VALUE 70
#define MAX_FRIENDSHIP_VALUE 255
#define MAX_FRIENDSHIP 255
#define LOW_FRIENDSHIP_LIMIT 100
#define MED_FRIENDSHIP_LIMIT 200
#define HIGH_FRIENDSHIP_LIMIT MAX_FRIENDSHIP_VALUE
#define FRIENDSHIP_TIER_NUM 3
#define HIGH_FRIENDSHIP_LIMIT MAX_FRIENDSHIP

#define CATCHING_SHOW_MONS 6
#define MAX_GBA_TRANSFER_HISTORY 20
Expand Down
4 changes: 2 additions & 2 deletions include/hall_of_fame_entries.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typedef struct HallOfFamePokemon {
u32 OTID;
u16 nickname[MON_NAME_LEN + 1];
u16 OTName[TRAINER_NAME_LEN + 1];
u16 moves[LEARNED_MOVES_MAX];
u16 moves[MAX_MON_MOVES];
u8 padding_3A[2];
} HallOfFamePokemon;

Expand All @@ -44,7 +44,7 @@ typedef struct PCHallOfFamePokemon {
u16 species;
u8 level;
u8 form;
u16 moves[LEARNED_MOVES_MAX];
u16 moves[MAX_MON_MOVES];
} PCHallOfFamePokemon;

int HallOfFame_SaveSize(void);
Expand Down
6 changes: 3 additions & 3 deletions include/overlay013/battle_party.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ typedef struct BattlePartyPokemon {
u8 tough;
u8 mail;
u8 form;
BattlePartyPokemonMove moves[LEARNED_MOVES_MAX];
BattlePartyPokemonMove moves[MAX_MON_MOVES];
} BattlePartyPokemon;

typedef struct BattlePartyContext {
Expand Down Expand Up @@ -239,7 +239,7 @@ typedef struct BattleParty {
u8 useItemState;
u8 unk_2079;
u16 selectedPokemonCurrentHP;
u16 selectedPokemonCurrentMovePPs[LEARNED_MOVES_MAX];
u16 selectedPokemonCurrentMovePPs[MAX_MON_MOVES];
BattleSubMenuCursor *cursor;
u8 selectPokemonPreviousScreenButton;
u8 learnMovePreviousScreenButton;
Expand All @@ -250,7 +250,7 @@ typedef struct BattleParty {
#define PARTY_SLOT_SELECTABLE_IN_BATTLE 1
#define PARTY_SLOT_SELECTABLE_NOT_IN_BATTLE 2

#define MOVE_TO_LEARN_SLOT LEARNED_MOVES_MAX
#define MOVE_TO_LEARN_SLOT MAX_MON_MOVES

void BattlePartyTask_Start(BattlePartyContext *context);
u8 BattlePartyTask_CheckCanPartySlotBeSelected(BattleParty *battleParty, s32 partySlot);
Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/frontier_data_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef struct FrontierPokemonDataDTO {
u16 form : 5;
};
u16 item;
u16 moves[LEARNED_MOVES_MAX];
u16 moves[MAX_MON_MOVES];
u32 otID;
u32 personality;
union {
Expand Down
Loading