Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LEAK INFORMED] Documented the unk19 item field #1575

Merged
merged 2 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct Item
u8 holdEffectParam;
const u8 *description;
u8 importance;
u8 unk19;
bool8 registrability; // unused
u8 pocket;
u8 type;
ItemUseFunc fieldUseFunc;
Expand Down Expand Up @@ -68,7 +68,7 @@ u8 ItemId_GetHoldEffect(u16 itemId);
u8 ItemId_GetHoldEffectParam(u16 itemId);
const u8 *ItemId_GetDescription(u16 itemId);
u8 ItemId_GetImportance(u16 itemId);
u8 ItemId_GetUnknownValue(u16 itemId);
u8 ItemId_GetRegistrability(u16 itemId);
u8 ItemId_GetPocket(u16 itemId);
u8 ItemId_GetType(u16 itemId);
ItemUseFunc ItemId_GetFieldFunc(u16 itemId);
Expand Down
48 changes: 24 additions & 24 deletions src/data/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -3146,7 +3146,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMachBikeDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
Expand All @@ -3172,7 +3172,7 @@ const struct Item gItems[] =
.price = 0,
.description = sItemfinderDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Itemfinder,
Expand All @@ -3185,7 +3185,7 @@ const struct Item gItems[] =
.price = 0,
.description = sOldRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand All @@ -3199,7 +3199,7 @@ const struct Item gItems[] =
.price = 0,
.description = sGoodRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand All @@ -3213,7 +3213,7 @@ const struct Item gItems[] =
.price = 0,
.description = sSuperRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand Down Expand Up @@ -3310,7 +3310,7 @@ const struct Item gItems[] =
.price = 0,
.description = sAcroBikeDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
Expand All @@ -3324,7 +3324,7 @@ const struct Item gItems[] =
.price = 0,
.description = sPokeblockCaseDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_PBLOCK_CASE,
.fieldUseFunc = ItemUseOutOfBattle_PokeblockCase,
Expand Down Expand Up @@ -4322,7 +4322,7 @@ const struct Item gItems[] =
.price = 0,
.description = sBicycleDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4335,7 +4335,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTownMapDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4348,7 +4348,7 @@ const struct Item gItems[] =
.price = 0,
.description = sVSSeekerDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4361,7 +4361,7 @@ const struct Item gItems[] =
.price = 0,
.description = sFameCheckerDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4374,7 +4374,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTMCaseDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4387,7 +4387,7 @@ const struct Item gItems[] =
.price = 0,
.description = sBerryPouchDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4400,7 +4400,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTeachyTVDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4413,7 +4413,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTriPassDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4426,7 +4426,7 @@ const struct Item gItems[] =
.price = 0,
.description = sRainbowPassDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4439,7 +4439,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTeaDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4452,7 +4452,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMysticTicketDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4465,7 +4465,7 @@ const struct Item gItems[] =
.price = 0,
.description = sAuroraTicketDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4478,7 +4478,7 @@ const struct Item gItems[] =
.price = 0,
.description = sPowderJarDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PowderJar,
Expand All @@ -4491,7 +4491,7 @@ const struct Item gItems[] =
.price = 0,
.description = sRubyDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4504,7 +4504,7 @@ const struct Item gItems[] =
.price = 0,
.description = sSapphireDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4519,7 +4519,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMagmaEmblemDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -4532,7 +4532,7 @@ const struct Item gItems[] =
.price = 0,
.description = sOldSeaMapDesc,
.importance = 1,
.unk19 = 1,
.registrability = TRUE,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand Down
4 changes: 2 additions & 2 deletions src/item.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,9 @@ u8 ItemId_GetImportance(u16 itemId)
}

// unused
u8 ItemId_GetUnknownValue(u16 itemId)
u8 ItemId_GetRegistrability(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].unk19;
return gItems[SanitizeItemId(itemId)].registrability;
}

u8 ItemId_GetPocket(u16 itemId)
Expand Down