diff --git a/include/battle_message.h b/include/battle_message.h index cccbae841..147bfa501 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -248,6 +248,13 @@ extern const u8 gText_BattleSwitchWhich4[]; extern const u8 gText_BattleSwitchWhich5[]; extern const u8 gText_SafariBalls[]; extern const u8 gText_SafariBallLeft[]; +extern const u8 gText_Sleep[]; +extern const u8 gText_Poison[]; +extern const u8 gText_Burn[]; +extern const u8 gText_Paralysis[]; +extern const u8 gText_Ice[]; +extern const u8 gText_Confusion[]; +extern const u8 gText_Love[]; extern const u8 gText_SpaceAndSpace[]; extern const u8 gText_CommaSpace[]; extern const u8 gText_Space2[]; diff --git a/include/constants/items.h b/include/constants/items.h index 4ca5cb7df..294499c8b 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -462,8 +462,8 @@ #define ITEM_MAGMA_EMBLEM 375 #define ITEM_OLD_SEA_MAP 376 -#define ITEM_LAST_ID 376 -#define ITEM_FIELD_ARROW ITEM_LAST_ID + 1 +#define ITEMS_COUNT 377 +#define ITEM_FIELD_ARROW ITEMS_COUNT #define FIRST_BERRY_INDEX ITEM_CHERI_BERRY #define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY diff --git a/include/text.h b/include/text.h index 2566b51b7..07a2017b4 100644 --- a/include/text.h +++ b/include/text.h @@ -2,7 +2,17 @@ #define GUARD_TEXT_H #define CHAR_SPACE 0x00 +#define CHAR_PLUS 0x2E #define CHAR_0 0xA1 +#define CHAR_1 0xA2 +#define CHAR_2 0xA3 +#define CHAR_3 0xA4 +#define CHAR_4 0xA5 +#define CHAR_5 0xA6 +#define CHAR_6 0xA7 +#define CHAR_7 0xA8 +#define CHAR_8 0xA9 +#define CHAR_9 0xAA #define CHAR_QUESTION_MARK 0xAC #define CHAR_PERIOD 0xAD #define CHAR_HYPHEN 0xAE diff --git a/src/battle_message.c b/src/battle_message.c index 7d442ea98..32097fd76 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1197,7 +1197,14 @@ const u8 * const gStatNamesTable2[] = }; const u8 gText_SafariBalls[] = _("{HIGHLIGHT DARK_GREY}SAFARI BALLS"); -const u8 gText_SafariBallLeft[] = _("{HIGHLIGHT DARK_GREY}Left: $" "{HIGHLIGHT DARK_GREY}");const u8 gText_Sleep[] = _( "sleep");const u8 gText_Poison[] = _( "poison");const u8 gText_Burn[] = _( "burn");const u8 gText_Paralysis[] = _( "paralysis");const u8 gText_Ice[] = _( "ice");const u8 gText_Confusion[] = _( "confusion");const u8 gText_Love[] = _( "love"); +const u8 gText_SafariBallLeft[] = _("{HIGHLIGHT DARK_GREY}Left: $" "{HIGHLIGHT DARK_GREY}"); +const u8 gText_Sleep[] = _("sleep"); +const u8 gText_Poison[] = _("poison"); +const u8 gText_Burn[] = _("burn"); +const u8 gText_Paralysis[] = _("paralysis"); +const u8 gText_Ice[] = _("ice"); +const u8 gText_Confusion[] = _("confusion"); +const u8 gText_Love[] = _("love"); const u8 gText_SpaceAndSpace[] = _(" and "); const u8 gText_CommaSpace[] = _(", "); const u8 gText_Space2[] = _(" "); diff --git a/src/fieldmap.c b/src/fieldmap.c index 2561bceb7..f57c4b48f 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -380,7 +380,7 @@ u8 MapGridGetZCoordAt(int x, int y) { return 0; } - + return block >> 12; } @@ -559,7 +559,7 @@ void mapdata_from_sav2(void) a0 = 1; else a0 = -1; - + for (j = x; j < x + 15; j++) { if (!sub_8088BF0(&gUnknown_02032318[j + width * i], width, a0)) @@ -922,7 +922,7 @@ bool8 sub_8088BF0(u16* a0, u16 a1, u8 a2) { if (a2 == 0xFF) return FALSE; - + if (a2 == 0) a0 -= a1; else diff --git a/src/item.c b/src/item.c index 30710d08a..c94f29910 100644 --- a/src/item.c +++ b/src/item.c @@ -1024,7 +1024,7 @@ bool8 RemovePyramidBagItem(u16 itemId, u16 count) static u16 SanitizeItemId(u16 itemId) { - if (itemId >= ITEM_LAST_ID + 1) + if (itemId >= ITEMS_COUNT) return ITEM_NONE; else return itemId; diff --git a/src/item_icon.c b/src/item_icon.c index d6fedf892..68ec1daf0 100644 --- a/src/item_icon.c +++ b/src/item_icon.c @@ -162,7 +162,7 @@ const void *GetItemIconPicOrPalette(u16 itemId, u8 which) { if (itemId == 0xFFFF) itemId = ITEM_FIELD_ARROW; - else if (itemId > ITEM_LAST_ID) + else if (itemId >= ITEMS_COUNT) itemId = 0; return gItemIconTable[itemId][which];