84#define ICON_COUNT_ABOVE_ONE 2
86#define ICON_EQUIPPED 8
88#define ICON_ARTIFACT 32
138 count = (code & 0xf800) >> 11;
144 count = (code & 0xf800) >> 11;
147 if (count != 0 && count <= 30) {
148 s32 ones = count % 10;
154 if (count / 10 != 0) {
194 extern const u8 *PairSource1[] __asm__(
"gRenderResource_PairSourceTable"),
195 *PairSource2[] __asm__(
"gRenderResource_PairSourceTable"),
196 *PairSource3[] __asm__(
"gRenderResource_PairSourceTable");
200 source = PairSource1;
203 source = PairSource2;
206 source = PairSource3;
240#define ROUTINE_BLOCK 49
247 s32 *tileOut,
s32 reuse) {
304 encodedEntry = (
u8 *)offsets + offsets[index];
305 work->
encoded = encodedEntry + 32;
static __inline__ void Dma_Set(const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel)
Starts a DMA transfer: stores the source, destination and control words into channel's registers with...
struct ItemDefinition * Item_GetDirectFar(s32 item)
struct BattleAct * BattleActGet(s32 actionId)
Far call to BattleAction_GetDirect.
u8 * gUiIcon_OverlayPointerTable[]
u8 * gUiIcon_ItemIconPointersEnd[]
u8 * gUiIcon_PsynergyIconPointers[]
u8 * gUiIcon_MiscIconPointers[]
u8 * gUiIcon_MarkPointers[]
const u8 Tile_ExpandOpaque[]
const u8 Tile_Decompress4bpp[]
u8 * gUiIcon_FramePointerTable[]
u8 * gUiIcon_PsynergyIconPointersEnd[]
u8 Tile_Decompress4bppCodeSize[]
u8 * gUiIcon_DigitPointers[]
u8 * gUiIcon_ItemIconPointers[]
const u8 Tile_ExpandMasked[]
u8 Tile_ExpandMaskedCodeSize[]
u8 Tile_ExpandOpaqueCodeSize[]
void * Runtime_AllocateHeapBlock(s32 kind, s32 size)
Returns heap slot kind's block, first allocating size bytes for it (rounded up to words),...
#define OBJ_PLTT_COLOR(palette, color)
void Runtime_ReleaseHeapBlock(s32 slot)
const u8 * gRenderResource_PairSourceTable[]
#define RamCode_LoadSlot(slot, code, bytes)
Allocates a work-slot copy; release it with Runtime_ReleaseHeapBlock.
An item's definition: its price, type, who can equip it, its bonuses and unleash, its effects and the...
u16 icon
indexes gUiIcon_ItemIconPointers
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
#define DMA_COPY16(count)
The DMA control word that copies count halfwords.
s32 Resource_FindFreeEntry(void)
Returns the number of the first free cache entry, or VRAM_CACHE_ENTRY_COUNT when all are taken.
s32 VramCache_Load(u32 no, u32 size, const void *src)
Gives cache entry no size bytes of sprite VRAM and copies src there.
void UiIcon_Decode(GlyphTransfer *glyph, s32 outlined)
Decodes a compressed icon into the glyph buffer and expands it to tiles, opaque for the first layer o...
void UiIcon_BuildAbilityIconTiles(u32 glyph, s32 withBase, s32 *cacheSlot, s32 *tileOut, s32 reuse)
Builds the Psynergy icon glyph, over the icon frame when withBase is set, and loads it into *cacheSlo...
void UiGlyph_ReservedNoOp(void)
s32 Ui_BuildPatternToSlot(s32 icon, s32 unused, s32 cacheSlot)
Builds one of the other icons and loads it into sprite tile slot cacheSlot.
s32 UiIcon_CopyResourceToSlot(s32 inventoryCode, s32 layers, s32 cacheSlot)
Composes an inventory icon with the requested layers and loads it into cacheSlot.
s32 ItemIcon_Compose(u32 code, u32 layers)
Draws an item's icon into the glyph work buffer from its inventory code (item id in the low 9 bits,...
void Ability_RequestGlyph(s32 action, s32 withBase, s32 *slot, s32 *tile, s32 reuse)
Builds the icon of a battle action's item (its first operand) into a slot, as UiIcon_BuildItemIconTil...
s32 RenderResource_LoadTableEntry(u32 value, s32 unused, u32 slot)
Loads one of four small fixed images into the sprite tile slot named by slot.
s32 UiIcon_CountPsynergyIcons(void)
void Ui_PrepareTransferForItem(s32 code)
Draws an item's icon from its inventory code into the glyph work buffer.
void Ui_BuildPairedPatternsToSlot(s32 overlayIcon, s32 frameIcon, s32 *slot, s32 *tileOut, s32 reuse)
Builds a command icon (overlay overlayIcon over frame frameIcon) and loads it into a sprite tile slot...
void Ability_LoadGlyph(s32 action, s32 withBase, s32 *slot, s32 *tile, s32 reuse)
Builds the Psynergy icon of a battle action, as UiIcon_BuildAbilityIconTiles.
void Ui_PrepareTransferFromTableEntry(u32 iconIndex)
Draws one of the other icons into the glyph work buffer.
#define ICON_COUNT_ABOVE_ONE
void UiIcon_BuildItemIconTiles(u32 glyph, s32 withBase, s32 *cacheSlot, s32 *tileOut, s32 reuse)
Builds the item icon glyph, over the icon frame when withBase is set, and loads it into *cacheSlot (a...
void UiGlyph_LoadEntryWithPalette(u32 icon, s32 unused, s32 *slot, s32 *tile, s32 palette, s32 reuse)
Loads a 32x32 icon from the icon resource into sprite tile slot *slot (a free slot unless reuse is se...
s32 UiIcon_CountItemIcons(void)
What every part of the window object shares: its includes, edition values, macros and the codes of de...
GlyphTransfer * gGlyphWork
The glyph transfer work in IWRAM (system/iwram.s), which icons are built in.