item data

This commit is contained in:
camthesaxman 2017-07-07 19:02:30 -05:00
parent cd37b81fee
commit 6c7d05587a
13 changed files with 14013 additions and 13282 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
@ 83C2028
.include "data/text/item_descriptions.inc"
@ 83C5564
.include "data/items.inc"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ struct Item
u16 price;
u8 holdEffect;
u8 holdEffectParam;
u8 *description;
const u8 *description;
u8 importance;
u8 unk19;
u8 pocket;
@ -35,12 +35,12 @@ bool8 CheckPCHasItem(u16 itemId, u16 count);
bool8 AddPCItem(u16 itemId, u16 count);
void RemovePCItem(u8 index, u16 count);
void SwapRegisteredBike(void);
struct Item *ItemId_GetItem(u16 itemId);
const struct Item *ItemId_GetItem(u16 itemId);
u16 ItemId_GetId(u16 itemId);
u16 ItemId_GetPrice(u16 itemId);
u8 ItemId_GetHoldEffect(u16 itemId);
u8 ItemId_GetHoldEffectParam(u16 itemId);
u8 *ItemId_GetDescription(u16 itemId);
const u8 *ItemId_GetDescription(u16 itemId);
bool8 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c);
u8 ItemId_GetImportance(u16 itemId);
u8 ItemId_GetUnknownValue(u16 itemId);

View File

@ -3,28 +3,51 @@
extern u16 gScriptItemId;
void ItemUseOutOfBattle_Mail(u8);
void ItemUseOutOfBattle_Bike(u8);
void ItemUseOnFieldCB_Bike(u8);
void ItemUseOutOfBattle_Rod(u8);
void ItemUseOnFieldCB_Rod(u8);
void ItemUseOutOfBattle_Itemfinder(u8);
void ItemUseOnFieldCB_Itemfinder(u8);
void RunItemfinderResults(u8);
void ExitItemfinder(u8);
bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId);
bool8 ItemfinderCheckForHiddenItems(struct MapEvents *, u8);
void sub_80C9720(u8);
void sub_80C9838(u8, s16, s16);
u8 GetPlayerDirectionTowardsHiddenItem(s16, s16);
void SetPlayerDirectionTowardsItem(u8);
void DisplayItemRespondingMessageAndExitItemfinder(u8);
void RotatePlayerAndExitItemfinder(u8);
void ItemUseOutOfBattle_PokeblockCase(u8);
void ItemUseOutOfBattle_CoinCase(u8);
void ItemUseOutOfBattle_SSTicket(u8);
void sub_80C9D00(u8);
void ItemUseOutOfBattle_WailmerPail(u8);
void sub_80C9D74(u8);
void ItemUseOutOfBattle_Medicine(u8);
void ItemUseOutOfBattle_SacredAsh(u8);
void ItemUseOutOfBattle_PPRecovery(u8);
void ItemUseOutOfBattle_PPUp(u8);
void ItemUseOutOfBattle_RareCandy(u8);
void ItemUseOutOfBattle_TMHM(u8);
void sub_80C9EE4(u8);
void sub_80C9F10(u8);
void sub_80C9F80(u8);
void sub_80C9FC0(u8);
void ItemUseOutOfBattle_Repel(u8);
void ItemUseOutOfBattle_BlackWhiteFlute(u8);
void task08_080A1C44(u8);
u8 sub_80CA1C8(void);
void ItemUseOutOfBattle_EscapeRope(u8);
void ItemUseOutOfBattle_EvolutionStone(u8);
void ItemUseInBattle_PokeBall(u8);
void ItemUseInBattle_StatIncrease(u8);
void ItemUseInBattle_Medicine(u8);
void ItemUseInBattle_PPRecovery(u8);
void ItemUseInBattle_Escape(u8);
void ItemUseOutOfBattle_EnigmaBerry(u8);
void ItemUseInBattle_EnigmaBerry(u8);
void ItemUseOutOfBattle_CannotUse(u8);
#endif // GUARD_ITEM_USE_H

View File

@ -398,7 +398,7 @@ SECTIONS {
data/fldeff_cut.o(.rodata);
data/item_menu.o(.rodata);
data/battle_anim_80A7E7C.o(.rodata);
data/item.o(.rodata);
src/item.o(.rodata);
data/matsuda_debug_menu.o(.rodata);
data/contest.o(.rodata);
data/shop.o(.rodata);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5587
src/data/items_de.h Normal file

File diff suppressed because it is too large Load Diff

5587
src/data/items_en.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,23 @@
#include "global.h"
#include "hold_effects.h"
#include "item.h"
#include "items.h"
#include "item_use.h"
#include "berry.h"
#include "string_util.h"
#include "strings.h"
extern u8 gUnknown_02038560;
extern struct Item gItems[];
struct BagPocket
enum
{
struct ItemSlot *itemSlots;
u8 capacity;
POCKET_ITEMS = 1,
POCKET_POKE_BALLS,
POCKET_TM_HM,
POCKET_BERRIES,
POCKET_KEY_ITEMS,
};
extern struct BagPocket gBagPockets[5];
enum
{
ITEMS_POCKET,
@ -25,6 +27,22 @@ enum
KEYITEMS_POCKET
};
#if ENGLISH
#include "data/item_descriptions_en.h"
#include "data/items_en.h"
#elif GERMAN
#include "data/item_descriptions_de.h"
#include "data/items_de.h"
#endif
struct BagPocket
{
struct ItemSlot *itemSlots;
u8 capacity;
};
extern struct BagPocket gBagPockets[5];
static void CompactPCItems(void);
void CopyItemName(u16 itemId, u8 *string)
@ -410,7 +428,7 @@ static u16 SanitizeItemId(u16 itemId)
return itemId;
}
struct Item *ItemId_GetItem(u16 itemId)
const struct Item *ItemId_GetItem(u16 itemId)
{
return &gItems[SanitizeItemId(itemId)];
}
@ -435,7 +453,7 @@ u8 ItemId_GetHoldEffectParam(u16 itemId)
return gItems[SanitizeItemId(itemId)].holdEffectParam;
}
u8 *ItemId_GetDescription(u16 itemId)
const u8 *ItemId_GetDescription(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].description;
}
@ -443,7 +461,7 @@ u8 *ItemId_GetDescription(u16 itemId)
bool8 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c)
{
u32 r5 = c + 1;
u8 *description = gItems[SanitizeItemId(itemId)].description;
const u8 *description = gItems[SanitizeItemId(itemId)].description;
u8 *str = a;
for (;;)