ActorInfoData

From ZeldaMods (Breath of the Wild)
Revision as of 18:43, 27 September 2018 by imported>Leoetlino
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
ActorInfoData
Subsystem
Official name Yes
Description Utilities for querying actor info using ActorInfo.product.sbyml, without having to load actors
Init function Switch 1.5.0: 0000007100D2E16C
Wii U 1.5.0: ???
Debug only No

ActorInfoData is a subsystem that is responsible for loading and reading ActorInfo.product.sbyml. It provides many functions which are used by all other components to query information from ActorInfo.

Init

The actor information file is loaded very early during initialization in ksys::InitializeApp.

If debugging is enabled, actor info is loaded synchronously from Local/Actor/ActorInfo.product.byml. Otherwise, ActorInfoData loads it from Actor/ActorInfo.product.byml.

Queries

ActorInfoData functions almost always take an input string, which is the name of the actor about which information is being queried.

Internally, ActorInfoData calculates the CRC32 hash of the name and performs a binary search on the Hashes array to quickly identify the index of the actor information dict in the Actors array.