DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches

Finds which pack file holds an asset and loads pack files into memory. More...

#include <deki/assets/AssetPackReader.h>

Public Member Functions

const LoadedPack::AssetInfo * GetAsset (const std::string &guid) const
 The asset guid in a loaded pack, or nullptr when not found or its pack is not loaded.
std::string GetPackPath (const std::string &guid) const
 The pack file holding guid, or "" when it is in no pack.
bool HasPackIndex () const
bool IsInPack (const std::string &guid) const
bool LoadPack (const char *packPath)
 Loads a pack file into memory and registers its assets.
bool LoadPackIndex (const char *path)
 Reads pack_index.bin from path.
void UnloadAll ()
 Frees every loaded pack.

Static Public Member Functions

static AssetPackReader & Instance ()

Detailed Description

Finds which pack file holds an asset and loads pack files into memory.

Member Function Documentation

◆ GetAsset()

const LoadedPack::AssetInfo * Deki::AssetPackReader::GetAsset ( const std::string & guid) const

The asset guid in a loaded pack, or nullptr when not found or its pack is not loaded.

◆ GetPackPath()

std::string Deki::AssetPackReader::GetPackPath ( const std::string & guid) const

The pack file holding guid, or "" when it is in no pack.

◆ HasPackIndex()

bool Deki::AssetPackReader::HasPackIndex ( ) const
inline

◆ Instance()

AssetPackReader & Deki::AssetPackReader::Instance ( )
static

◆ IsInPack()

bool Deki::AssetPackReader::IsInPack ( const std::string & guid) const

◆ LoadPack()

bool Deki::AssetPackReader::LoadPack ( const char * packPath)

Loads a pack file into memory and registers its assets.

True when the pack is loaded, including when it already was.

◆ LoadPackIndex()

bool Deki::AssetPackReader::LoadPackIndex ( const char * path)

Reads pack_index.bin from path.

◆ UnloadAll()

void Deki::AssetPackReader::UnloadAll ( )

Frees every loaded pack.


The documentation for this class was generated from the following file: