Skip to content

Commit

Permalink
manually apply document unk19 -> registrability field
Browse files Browse the repository at this point in the history
  • Loading branch information
redthing1 committed Dec 26, 2021
1 parent 374827e commit 46d35ba
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions include/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct Item
u8 holdEffectParam;
const u8 *description;
u8 importance;
u8 unk19;
u8 registrability;
u8 pocket;
u8 type;
ItemUseFunc fieldUseFunc;
Expand Down Expand Up @@ -69,7 +69,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 @@ -8772,7 +8772,7 @@ const struct Item gItems[] =
.price = 0,
.description = sBicycleDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -8785,7 +8785,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMachBikeDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
Expand All @@ -8799,7 +8799,7 @@ const struct Item gItems[] =
.price = 0,
.description = sAcroBikeDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
Expand All @@ -8813,7 +8813,7 @@ const struct Item gItems[] =
.price = 0,
.description = sOldRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand All @@ -8827,7 +8827,7 @@ const struct Item gItems[] =
.price = 0,
.description = sGoodRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand All @@ -8841,7 +8841,7 @@ const struct Item gItems[] =
.price = 0,
.description = sSuperRodDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
Expand All @@ -8855,7 +8855,7 @@ const struct Item gItems[] =
.price = 0,
.description = sDowsingMachineDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Itemfinder,
Expand All @@ -8868,7 +8868,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTownMapDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -8881,7 +8881,7 @@ const struct Item gItems[] =
.price = 0,
.description = sVsSeekerDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -8894,7 +8894,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTMCaseDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -8907,7 +8907,7 @@ const struct Item gItems[] =
.price = 0,
.description = sBerryPouchDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand Down Expand Up @@ -8943,7 +8943,7 @@ const struct Item gItems[] =
.price = 0,
.description = sPowderJarDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PowderJar,
Expand Down Expand Up @@ -8979,7 +8979,7 @@ const struct Item gItems[] =
.price = 0,
.description = sPokeblockCaseDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_PBLOCK_CASE,
.fieldUseFunc = ItemUseOutOfBattle_PokeblockCase,
Expand Down Expand Up @@ -9016,7 +9016,7 @@ const struct Item gItems[] =
.price = 0,
.description = sFameCheckerDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9029,7 +9029,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTeachyTVDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand Down Expand Up @@ -9069,7 +9069,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMysticTicketDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9082,7 +9082,7 @@ const struct Item gItems[] =
.price = 0,
.description = sAuroraTicketDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9095,7 +9095,7 @@ const struct Item gItems[] =
.price = 0,
.description = sOldSeaMapDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand Down Expand Up @@ -9252,7 +9252,7 @@ const struct Item gItems[] =
.price = 0,
.description = sMagmaEmblemDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand Down Expand Up @@ -9361,7 +9361,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTriPassDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9374,7 +9374,7 @@ const struct Item gItems[] =
.price = 0,
.description = sRainbowPassDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9387,7 +9387,7 @@ const struct Item gItems[] =
.price = 0,
.description = sTeaDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9400,7 +9400,7 @@ const struct Item gItems[] =
.price = 0,
.description = sRubyDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
Expand All @@ -9413,7 +9413,7 @@ const struct Item gItems[] =
.price = 0,
.description = sSapphireDesc,
.importance = 1,
.unk19 = 1,
.registrability = 1,
.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

0 comments on commit 46d35ba

Please sign in to comment.