ActorInfoData

Revision as of 13:34, 22 September 2018 by imported>Leoetlino (Created page with "'''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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.