Automatically calculate REMATCH_TABLE_ENTRIES

Uses the standard C way of calculating the length of an enum.
This commit is contained in:
Phlosioneer 2019-04-02 03:27:05 -04:00 committed by huderlem
parent 6916f09cd5
commit 9f44ebc5cd
2 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,6 @@
#include "gym_leader_rematch.h" #include "gym_leader_rematch.h"
#define REMATCHES_COUNT 5 #define REMATCHES_COUNT 5
#define REMATCH_TABLE_ENTRIES 78
#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY #define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
struct RematchTrainer struct RematchTrainer

View File

@ -81,7 +81,11 @@ enum {
REMATCH_PHOEBE, REMATCH_PHOEBE,
REMATCH_GLACIA, REMATCH_GLACIA,
REMATCH_DRAKE, REMATCH_DRAKE,
REMATCH_WALLACE REMATCH_WALLACE,
// The total number of rematch entries. This must be the last element
// in the enum.
REMATCH_TABLE_ENTRIES
}; };
void UpdateGymLeaderRematch(void); void UpdateGymLeaderRematch(void);