mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
Fix address of berry struct in item.c
This commit is contained in:
parent
4c6511c8f9
commit
c74334c26a
@ -303,11 +303,7 @@ gUnknown_08587FA4:: @ 8587FA4
|
|||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gUnknown_085880A4:: @ 85880A4
|
gUnknown_085880A4:: @ 85880A4
|
||||||
.incbin "baserom.gba", 0x5880a4, 0x1740
|
.incbin "baserom.gba", 0x5880a4, 0x1800
|
||||||
|
|
||||||
.align 2
|
|
||||||
gUnknown_085897E4:: @ 85897E4
|
|
||||||
.incbin "baserom.gba", 0x5897e4, 0xc0
|
|
||||||
|
|
||||||
gUnknown_085898A4:: @ 85898A4
|
gUnknown_085898A4:: @ 85898A4
|
||||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
#include "berry.h"
|
||||||
#include "constants/items.h"
|
#include "constants/items.h"
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
@ -11,7 +12,6 @@ extern bool8 InBattlePyramid(void);
|
|||||||
extern const u8 gText_PokeBalls[];
|
extern const u8 gText_PokeBalls[];
|
||||||
extern const u8 gText_Berries[];
|
extern const u8 gText_Berries[];
|
||||||
extern const u8 gText_Berry[];
|
extern const u8 gText_Berry[];
|
||||||
extern const u8 gUnknown_085897E4[][28]; // not sure what this one is
|
|
||||||
|
|
||||||
bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
||||||
bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
|
bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
|
||||||
@ -96,8 +96,8 @@ void CopyItemNameHandlePlural(u16 itemId, u8 *string, u32 quantity)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (itemId >= 0x85 && itemId <= 0xAF)
|
if (itemId >= ITEM_CHERI_BERRY && itemId <= ITEM_ENIGMA_BERRY)
|
||||||
GetBerryCountString(string, gUnknown_085897E4[itemId], quantity);
|
GetBerryCountString(string, gBerries[itemId - ITEM_CHERI_BERRY].name, quantity);
|
||||||
else
|
else
|
||||||
StringCopy(string, ItemId_GetItem(itemId)->name);
|
StringCopy(string, ItemId_GetItem(itemId)->name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user