Add FIRST_BALL, some FIRST_BERRY_INDEX usage

This commit is contained in:
GriffinR
2021-01-19 13:39:18 -05:00
parent 305ebdbc4a
commit 752982552e
5 changed files with 39 additions and 34 deletions

View File

@@ -17,7 +17,11 @@
#define ITEM_LUXURY_BALL 11
#define ITEM_PREMIER_BALL 12
#define LAST_BALL ITEM_PREMIER_BALL
// Note: If moving ball IDs around, updating FIRST_BALL/LAST_BALL is not sufficient
// Several places expect the ball IDs to be first and contiguous (e.g. gBattlescriptsForBallThrow and MON_DATA_POKEBALL)
// If adding new balls, it's easiest to insert them after the last ball and increment the below IDs (and removing ITEM_034 for example)
#define FIRST_BALL ITEM_MASTER_BALL
#define LAST_BALL ITEM_PREMIER_BALL
// Pokemon Items
#define ITEM_POTION 13
@@ -145,6 +149,8 @@
#define ITEM_FAB_MAIL 131
#define ITEM_RETRO_MAIL 132
#define FIRST_MAIL_INDEX ITEM_ORANGE_MAIL
// Berries
#define ITEM_CHERI_BERRY 133
#define ITEM_CHESTO_BERRY 134
@@ -189,6 +195,10 @@
#define ITEM_LANSAT_BERRY 173
#define ITEM_STARF_BERRY 174
#define ITEM_ENIGMA_BERRY 175
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
#define ITEM_0B0 176
#define ITEM_0B1 177
#define ITEM_0B2 178
@@ -467,9 +477,6 @@
#define ITEMS_COUNT 377
#define ITEM_FIELD_ARROW ITEMS_COUNT
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
// Range of berries given out by various NPCS
#define FIRST_BERRY_MASTER_BERRY ITEM_POMEG_BERRY
#define LAST_BERRY_MASTER_BERRY ITEM_NOMEL_BERRY
@@ -490,8 +497,6 @@
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))
#define FIRST_MAIL_INDEX ITEM_ORANGE_MAIL
#define NUM_TECHNICAL_MACHINES 50
#define NUM_HIDDEN_MACHINES 8