← API Reference Namespace

asge::game::asset

Namespaces

Classes & Structs

Enumerations

#enum class AssetKind

Which AssetManager pool a virtual path referenced by AssetRefs<T> would resolve through.

Texture
AnimationClip
AudioClip
Font
#enum class AssetType

Runtime tag identifying which concrete type an Asset<T> wraps.

Lets code holding only an AssetType value (not the template parameter itself) branch on what kind of asset it's looking at — e.g. a future heterogeneous asset registry/cache keyed by this tag.

Unknown
Image
Font
FrameTable
#enum class GridOrder

Direction in which frame indices walk a spritesheet grid.

RowMajor
ColumnMajor

Functions

#std::vector< AssetRef > CollectAssetRefs(ecs::Registry const &inRegistry)

Every asset reference held by any component in inRegistry.

Folds over components::SerializableComponents the same way ResolveAssets does, dispatching each entity's each component through AssetRefs<T> instead of Resolver<T> — read-only, so nothing is loaded or created.

#DEFINE_ASSET_TYPE(media::Image, Image)
#DEFINE_ASSET_TYPE(media::Font, Font)
#DEFINE_ASSET_TYPE(FrameTable, FrameTable)
#std::vector< math::Rect > MakeGridFrames(GridSpec const &inSpec) noexcept

Builds inSpec.m_Count sub-rects (in texture pixels) across a regular grid spritesheet, for use as FrameTable::m_Frames.

Cell indices run from m_First to m_First + m_Count - 1. In RowMajor order index i sits at column (i % m_Columns), row (i / m_Columns); in ColumnMajor order at column (i / m_Rows), row (i % m_Rows). Adjacent cells are m_Spacing pixels apart. Returns an empty vector if m_Count is 0 or the wrap length for the order (m_Columns / m_Rows) is 0.