mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Some cleanup/doc on the item icons (#1263)
* Some cleanup/doc on the item enum and icons * `gItemIconBigBottlePoeTex` -> `gItemIconBottleBigPoeTex` * Biggoron sword / giant knife items (?) * `SPSTONE_` -> `SPIRITUAL_` ? * `gItemIconBrokenBiggoronSwordTex` -> `gItemIconBrokenGoronsSwordTex` * `gQuestIcon...MedallionTex` -> `gQuestIconMedallion...Tex` * `ITEM_MAGIC_` -> `ITEM_MAGIC_JAR_`small/big * `ITEM_BOW_ARROW_` -> `ITEM_BOW_` * `MASK_BUNNY` -> `MASK_BUNNY_HOOD` * Update `GID_` enum from `ITEM_` enum * ITEM/GID`_ARROW_`small/medium/large -> 5/10/30 * Run formatter * . * fix regressions and revert bad ideas * chicken * obey the newline police and also prevent the range police from intervening * fixups * dimensions -> dimension (singular) * Note on inconsequential oddities about the `gItemIcons` mapping
This commit is contained in:
parent
c420885513
commit
880e7c937c
17 changed files with 369 additions and 336 deletions
|
@ -1,6 +1,34 @@
|
|||
#ifndef Z64INTERFACE_H
|
||||
#define Z64INTERFACE_H
|
||||
|
||||
extern u8 _icon_item_staticSegmentRomStart[];
|
||||
extern u8 _icon_item_24_staticSegmentRomStart[];
|
||||
|
||||
// An "item icon" (gItemIcon*Tex) is 32x32 rgba32
|
||||
#define ITEM_ICON_WIDTH 32
|
||||
#define ITEM_ICON_HEIGHT 32
|
||||
#define ITEM_ICON_SIZE (ITEM_ICON_WIDTH * ITEM_ICON_HEIGHT * 4) // The size in bytes of an item icon
|
||||
|
||||
/**
|
||||
* Get the VROM address of the item icon for the specified item.
|
||||
*
|
||||
* @param itemId An ItemId value in the range `ITEM_DEKU_STICK`..`ITEM_FISHING_POLE`
|
||||
*/
|
||||
#define GET_ITEM_ICON_VROM(itemId) ((uintptr_t)_icon_item_staticSegmentRomStart + ((itemId)*ITEM_ICON_SIZE))
|
||||
|
||||
// A "quest icon" (gQuestIcon*Tex) is 24x24 rgba32
|
||||
#define QUEST_ICON_WIDTH 24
|
||||
#define QUEST_ICON_HEIGHT 24
|
||||
#define QUEST_ICON_SIZE (QUEST_ICON_WIDTH * QUEST_ICON_HEIGHT * 4) // The size in bytes of a quest icon
|
||||
|
||||
/**
|
||||
* Get the VROM address of the quest icon for the specified item.
|
||||
*
|
||||
* @param itemId An ItemId value in the range `ITEM_MEDALLION_FOREST`..`ITEM_MAGIC_JAR_BIG`
|
||||
*/
|
||||
#define GET_QUEST_ICON_VROM(itemId) \
|
||||
((uintptr_t)_icon_item_24_staticSegmentRomStart + (((itemId)-ITEM_MEDALLION_FOREST) * QUEST_ICON_SIZE))
|
||||
|
||||
/**
|
||||
* Button HUD Positions (Upper Left)
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue