Merge pull request #1575 from LOuroboros/benriBotan

[LEAK INFORMED] Documented the unk19 item field
This commit is contained in:
GriffinR 2021-12-17 22:27:45 -05:00 committed by GitHub
commit 32a9ac6eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 28 deletions

View File

@ -14,7 +14,7 @@ struct Item
u8 holdEffectParam; u8 holdEffectParam;
const u8 *description; const u8 *description;
u8 importance; u8 importance;
u8 unk19; bool8 registrability; // unused
u8 pocket; u8 pocket;
u8 type; u8 type;
ItemUseFunc fieldUseFunc; ItemUseFunc fieldUseFunc;
@ -68,7 +68,7 @@ u8 ItemId_GetHoldEffect(u16 itemId);
u8 ItemId_GetHoldEffectParam(u16 itemId); u8 ItemId_GetHoldEffectParam(u16 itemId);
const u8 *ItemId_GetDescription(u16 itemId); const u8 *ItemId_GetDescription(u16 itemId);
u8 ItemId_GetImportance(u16 itemId); u8 ItemId_GetImportance(u16 itemId);
u8 ItemId_GetUnknownValue(u16 itemId); u8 ItemId_GetRegistrability(u16 itemId);
u8 ItemId_GetPocket(u16 itemId); u8 ItemId_GetPocket(u16 itemId);
u8 ItemId_GetType(u16 itemId); u8 ItemId_GetType(u16 itemId);
ItemUseFunc ItemId_GetFieldFunc(u16 itemId); ItemUseFunc ItemId_GetFieldFunc(u16 itemId);

View File

@ -3146,7 +3146,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sMachBikeDesc, .description = sMachBikeDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike, .fieldUseFunc = ItemUseOutOfBattle_Bike,
@ -3172,7 +3172,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sItemfinderDesc, .description = sItemfinderDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Itemfinder, .fieldUseFunc = ItemUseOutOfBattle_Itemfinder,
@ -3185,7 +3185,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sOldRodDesc, .description = sOldRodDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod, .fieldUseFunc = ItemUseOutOfBattle_Rod,
@ -3199,7 +3199,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sGoodRodDesc, .description = sGoodRodDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod, .fieldUseFunc = ItemUseOutOfBattle_Rod,
@ -3213,7 +3213,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sSuperRodDesc, .description = sSuperRodDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod, .fieldUseFunc = ItemUseOutOfBattle_Rod,
@ -3310,7 +3310,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sAcroBikeDesc, .description = sAcroBikeDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike, .fieldUseFunc = ItemUseOutOfBattle_Bike,
@ -3324,7 +3324,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sPokeblockCaseDesc, .description = sPokeblockCaseDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_PBLOCK_CASE, .type = ITEM_USE_PBLOCK_CASE,
.fieldUseFunc = ItemUseOutOfBattle_PokeblockCase, .fieldUseFunc = ItemUseOutOfBattle_PokeblockCase,
@ -4322,7 +4322,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sBicycleDesc, .description = sBicycleDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4335,7 +4335,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sTownMapDesc, .description = sTownMapDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4348,7 +4348,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sVSSeekerDesc, .description = sVSSeekerDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4361,7 +4361,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sFameCheckerDesc, .description = sFameCheckerDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4374,7 +4374,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sTMCaseDesc, .description = sTMCaseDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4387,7 +4387,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sBerryPouchDesc, .description = sBerryPouchDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4400,7 +4400,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sTeachyTVDesc, .description = sTeachyTVDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_FIELD, .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4413,7 +4413,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sTriPassDesc, .description = sTriPassDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4426,7 +4426,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sRainbowPassDesc, .description = sRainbowPassDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4439,7 +4439,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sTeaDesc, .description = sTeaDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4452,7 +4452,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sMysticTicketDesc, .description = sMysticTicketDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4465,7 +4465,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sAuroraTicketDesc, .description = sAuroraTicketDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4478,7 +4478,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sPowderJarDesc, .description = sPowderJarDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PowderJar, .fieldUseFunc = ItemUseOutOfBattle_PowderJar,
@ -4491,7 +4491,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sRubyDesc, .description = sRubyDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4504,7 +4504,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sSapphireDesc, .description = sSapphireDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4519,7 +4519,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sMagmaEmblemDesc, .description = sMagmaEmblemDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
@ -4532,7 +4532,7 @@ const struct Item gItems[] =
.price = 0, .price = 0,
.description = sOldSeaMapDesc, .description = sOldSeaMapDesc,
.importance = 1, .importance = 1,
.unk19 = 1, .registrability = TRUE,
.pocket = POCKET_KEY_ITEMS, .pocket = POCKET_KEY_ITEMS,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse, .fieldUseFunc = ItemUseOutOfBattle_CannotUse,

View File

@ -913,9 +913,9 @@ u8 ItemId_GetImportance(u16 itemId)
} }
// unused // 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) u8 ItemId_GetPocket(u16 itemId)