Alchemy

resource

games/tbs/src/system/resource on GitHub

metadata_get_record.c

games/tbs/src/system/resource/metadata_get_record.c

Functions

Resource_GetMetadataRecord

struct AnimationMetadata *Resource_GetMetadataRecord(u32 descriptorId)

Looks up animation metadata using the descriptor ID in the low twelve bits: that row of gCharacter_DescriptorTable (graphics/sprite/sprites.s), with no bounds check. The bits above are dropped, so the field's animation code can pass a layer's animId as it is, even when it carries a resource slot in bits 12 and up (the slot's tag, slot << 12 | number; Animation_LookupValueByKey, field/field/animation.c). Reached through the resource far-call table by the field's animation, objects and sprite viewer, the Psynergy effects and the battle's objects.

Line 14

Globals, without a comment: gCharacter_DescriptorTable.

On this page