![]() |
Blamite Game Engine - Sapien (Library)
00432.02.10.25.1019.blamite
The level editor application for the Blamite Game Engine.
|
Namespace containing functions for interacting with a scenario. More...
Functions | |
SAPIEN_LIB_API BlamTag * | GetActiveScenarioTag () |
Retrieves the currently active scenario tag. More... | |
SAPIEN_LIB_API void | PreScenarioLoad () |
Performs tasks that must be run prior to loading a new scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario (std::string tag_path) |
Loads a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage1 (std::string tag_path) |
Performs stage 1 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage2 (std::string tag_path) |
Performs stage 2 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage3 (std::string tag_path) |
Performs stage 3 of loading a scenario tag. More... | |
SAPIEN_LIB_API bool | LoadScenario_Stage4 (std::string tag_path) |
Performs stage 4 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) |
Places a new instance of a tag within the scenario. More... | |
SAPIEN_LIB_API int | ReserveFolderIndex () |
Reserves a new folder index within the current scenario. More... | |
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.
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 | tag_path | ) |
Loads a scenario tag.
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 | tag_path | ) |
Performs stage 1 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.
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 | tag_path | ) |
Performs stage 2 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.
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 | tag_path | ) |
Performs stage 3 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.
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 | tag_path | ) |
Performs stage 4 of loading a scenario tag.
This stage is responsible for building the scenario hierarchy from the scenario tag.
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 | ||
) |
Places a new instance of a tag within the scenario.
position | - The world position to place the object at. |
type | - The palette containing the desired object. |
index | - The index within the palette of the desired object. |
folder_index | - The index of the folder that the new object should belong to. |
true
if the object was placed successfully, otherwise returns false
. void Sapien::Scenario::PreScenarioLoad | ( | ) |
Performs tasks that must be run prior to loading a new scenario tag.
int Sapien::Scenario::ReserveFolderIndex | ( | ) |
Reserves a new folder index within the current scenario.
Folder IDs within a scenario each have an index, starting from 0. Each folder must have a unique index in order for various objects to be able to properly detect what folder they are contained within.
void Sapien::Scenario::SaveScenario | ( | ) |
Attempts to save any changes back to the scenario tag.