mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 17:34:20 +01:00
Simplify some max value macros
This commit is contained in:
parent
f40fad528d
commit
10230799d3
@ -4254,7 +4254,7 @@ static u8 Task_GetInfoCardInput(u8 taskId)
|
||||
#undef tUsingAlternateSlot
|
||||
|
||||
// allocatedArray below needs to be large enough to hold stat totals for each mon, or totals of each type of move points
|
||||
#define ALLOC_ARRAY_SIZE (NUM_STATS * FRONTIER_PARTY_SIZE >= NUM_MOVE_POINT_TYPES ? (NUM_STATS * FRONTIER_PARTY_SIZE) : NUM_MOVE_POINT_TYPES)
|
||||
#define ALLOC_ARRAY_SIZE max(NUM_STATS * FRONTIER_PARTY_SIZE, NUM_MOVE_POINT_TYPES)
|
||||
|
||||
static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
{
|
||||
|
@ -150,7 +150,7 @@
|
||||
#define JAM_HEART_EMPTY 2
|
||||
#define JAM_HEART_FULL 3
|
||||
|
||||
#define MAX_RELEARNER_MOVES (MAX_LEVEL_UP_MOVES > 25 ? MAX_LEVEL_UP_MOVES : 25)
|
||||
#define MAX_RELEARNER_MOVES max(MAX_LEVEL_UP_MOVES, 25)
|
||||
|
||||
static EWRAM_DATA struct
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ enum {
|
||||
|
||||
// The maximum number of Pokémon icons that can appear on-screen.
|
||||
// By default the limit is 40 (though in practice only 37 can be).
|
||||
#define MAX_MON_ICONS (IN_BOX_COUNT + PARTY_SIZE + 1 >= 40 ? IN_BOX_COUNT + PARTY_SIZE + 1 : 40)
|
||||
#define MAX_MON_ICONS max(IN_BOX_COUNT + PARTY_SIZE + 1, 40)
|
||||
|
||||
// The maximum number of item icons that can appear on-screen while
|
||||
// moving held items. 1 in the cursor, and 2 more while switching
|
||||
|
Loading…
x
Reference in New Issue
Block a user