![]() |
Blamite Game Engine - Sapien (Library)
00423.10.27.24.0533.blamite
The level editor application for the Blamite Game Engine.
|
Namespace containing functions for interacting with a scenario. More...
Functions | |
SAPIEN_LIB_API BlamProject * | GetActiveProject () |
Retrieves the currently active project. More... | |
SAPIEN_LIB_API BlamTag * | GetActiveScenarioTag () |
Retrieves the currently active scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario (std::string project_name, std::string tag_path) |
Loads a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage1 (std::string project_name, std::string tag_path) |
Performs stage 1 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage2 (std::string project_name, std::string tag_path) |
Performs stage 2 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage3 (std::string project_name, std::string tag_path) |
Performs stage 3 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage4 (std::string project_name, std::string tag_path) |
Performs stage 4 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage5 (std::string project_name, std::string tag_path) |
Performs stage 5 of loading a scenario tag. More... | |
SAPIEN_LIB_API void | SaveScenario () |
Attempts to save any changes back to the scenario tag. More... | |
SAPIEN_LIB_API std::vector< std::string > | GetPaletteTypes () |
Retrieves a list of available scenario palette types, where each item is a string representing a long tag class name. More... | |
SAPIEN_LIB_API BlamTagField_Block * | GetPalette (BlamTag *scenario, std::string type) |
Retrieves a palette block from a scenario tag. More... | |
SAPIEN_LIB_API BlamTagField_Block * | GetPaletteItems (BlamTag *scenario, std::string type) |
Retrieves a palette items block from a scenario tag. More... | |
SAPIEN_LIB_API bool | PlaceNewInstance (BlamVector3 position, std::string type, int index, int folder_index) |
Namespace containing functions for interacting with a scenario.
A scenario can be thought of as a self-contained "level" (or "scene" if you're familiar with other game engines). It will generally reference all data required for the level to load and operate.
BlamProject * Sapien::Scenario::GetActiveProject | ( | ) |
Retrieves the currently active project.
BlamTag * Sapien::Scenario::GetActiveScenarioTag | ( | ) |
Retrieves the currently active scenario tag.
BlamTagField_Block * Sapien::Scenario::GetPalette | ( | BlamTag * | scenario, |
std::string | type | ||
) |
Retrieves a palette block from a scenario tag.
scenario | - The scenario tag to retrieve a palette from. |
type | - The palette type name. Should match a long tag class name and be present in GetPaletteTypes. |
nullptr
if no matching block was found. BlamTagField_Block * Sapien::Scenario::GetPaletteItems | ( | BlamTag * | scenario, |
std::string | type | ||
) |
Retrieves a palette items block from a scenario tag.
scenario | - The scenario tag to retrieve palette items from. |
type | - The palette type name. Should match a long tag class name and be present in GetPaletteTypes. |
nullptr
if no matching block was found. std::vector< std::string > Sapien::Scenario::GetPaletteTypes | ( | ) |
Retrieves a list of available scenario palette types, where each item is a string representing a long tag class name.
bool Sapien::Scenario::LoadScenario | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Loads a scenario tag.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the scenario was loaded successfuly, otherwise returns false
. bool Sapien::Scenario::LoadScenario_Stage1 | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Performs stage 1 of loading a scenario tag.
This stage is responsible for locating the desired project and loading its data.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the stage completed successfuly, otherwise returns false
. bool Sapien::Scenario::LoadScenario_Stage2 | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Performs stage 2 of loading a scenario tag.
This stage is responsible for loading the desired scenario tag data. It will first try to load a decompiled tag if available, but will fall back to a compiled tag if needed. When loading a compiled tag, its version must exactly match - or else the load will be aborted.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the stage completed successfuly, otherwise returns false
. bool Sapien::Scenario::LoadScenario_Stage3 | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Performs stage 3 of loading a scenario tag.
This stage is responsible for recompiling a decompiled scenario tag. This ensures that there aren't any changes made to the decompiled tag that have not yet been compiled.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the stage completed successfuly, otherwise returns false
. bool Sapien::Scenario::LoadScenario_Stage4 | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Performs stage 4 of loading a scenario tag.
This stage is responsible for reading the loaded scenario tag data into the game engine. This will also load any other tags referenced within the scenario as well.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the stage completed successfuly, otherwise returns false
. bool Sapien::Scenario::LoadScenario_Stage5 | ( | std::string | project_name, |
std::string | tag_path | ||
) |
Performs stage 5 of loading a scenario tag.
This stage is responsible for building the scenario hierarchy from the scenario tag.
project_name | - The name of the project the scenario belongs to. |
tag_path | - The tag path of the desired scenario tag. |
true
if the stage completed successfuly, otherwise returns false
. bool Sapien::Scenario::PlaceNewInstance | ( | BlamVector3 | position, |
std::string | type, | ||
int | index, | ||
int | folder_index | ||
) |
void Sapien::Scenario::SaveScenario | ( | ) |
Attempts to save any changes back to the scenario tag.