small fixes

This commit is contained in:
DizzyEggg 2018-07-07 14:24:19 +02:00
parent 9892298645
commit 1c48e58574
7 changed files with 32 additions and 8 deletions

View File

@ -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[];

View File

@ -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

View File

@ -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

View File

@ -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[] = _(" ");

View File

@ -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

View File

@ -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;

View File

@ -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];