![]() |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
#include "engine_resources.h"
#include <Strings/components/utils/io/io.h>
#include "components/settings/config/config.h"
Functions | |
bool | LoadNewResource (std::string file_path, BlamResourceType type, std::string id) |
Loads a new resource into the engine, with an optional ID. More... | |
bool | LoadNewResource (std::string file_path, BlamResourceType type) |
Loads a new resource into the engine. More... | |
void | ReleaseResource (std::string file_path) |
Releases a resource. More... | |
Variables | |
std::vector< BlamResource > | engine_resources |
bool LoadNewResource | ( | std::string | file_path, |
BlamResourceType | type | ||
) |
Loads a new resource into the engine.
If an ID is not supplied as a 3rd argument, the file_path is used as the ID instead.
This should ONLY be called from within the #LoadEngineResources function and nowhere else.
file_path | - The path to the file to load. |
type | - The type of resource to treat the file as. |
true
if the resource was loaded successfully, otherwise returns false
. bool LoadNewResource | ( | std::string | file_path, |
BlamResourceType | type, | ||
std::string | id | ||
) |
Loads a new resource into the engine, with an optional ID.
The ID may be used in place of the filename in the various functions used to retrieve or save an engine resource.
This should ONLY be called from within the #LoadEngineResources function and nowhere else.
file_path | - The path to the file to load. |
type | - The type of resource to treat the file as. |
true
if the resource was loaded successfully, otherwise returns false
. void ReleaseResource | ( | std::string | file_path | ) |
Releases a resource.
Once a resource is released, it will no longer be usable within the engine. Resources should only be released within the Blam::EngineResources::ReleaseEngineResources() function.
file_path | - The file path or ID of the resource to release. |
std::vector<BlamResource> engine_resources |