Reference TMs and HMs by move instead of number (#1732)

This commit is contained in:
Martin Griffin
2023-08-09 15:51:01 +01:00
committed by GitHub
parent da238562f0
commit 912a80e27a
74 changed files with 10759 additions and 9937 deletions
+23
View File
@@ -2,6 +2,8 @@
#define GUARD_ITEM_H
#include "constants/item.h"
#include "constants/items.h"
#include "constants/tms_hms.h"
typedef void (*ItemUseFunc)(u8);
@@ -74,4 +76,25 @@ u8 ItemId_GetBattleUsage(u16 itemId);
ItemUseFunc ItemId_GetBattleFunc(u16 itemId);
u8 ItemId_GetSecondaryId(u16 itemId);
/* Expands to:
* enum
* {
* ITEM_TM_FOCUS_PUNCH,
* ...
* ITEM_HM_CUT,
* ...
* }; */
#define ENUM_TM(id) CAT(ITEM_TM_, id),
#define ENUM_HM(id) CAT(ITEM_HM_, id),
enum
{
ENUM_TM_START_ = ITEM_TM01 - 1,
FOREACH_TM(ENUM_TM)
ENUM_HM_START_ = ITEM_HM01 - 1,
FOREACH_HM(ENUM_HM)
};
#undef ENUM_TM
#undef ENUM_HM
#endif // GUARD_ITEM_H