Blamite Game Engine - Guerilla (Library)
00420.05.12.24.2119.blamite
The tag editor for the Blamite Game Engine.
|
Namespace containing functions relating to tags and plugins. More...
Namespaces | |
Compiler | |
Namespace containing functions for compiling and decompiling tags. | |
Fields | |
Namespace containing functions relating to tag fields. | |
Importers | |
Functions | |
GUERILLA_LIB_API BlamTag * | LoadTag (std::string file_path) |
Attempts to load a tag from disk and link plugin data. More... | |
GUERILLA_LIB_API BlamTag * | LoadTag (std::string file_path, BlamTagTreeNode *tree_node) |
Attempts to load a tag from disk and link plugin data. More... | |
GUERILLA_LIB_API BlamTag * | LoadTag (std::string file_path, BlamTagTreeNode *tree_node, BlamTagUpgradePolicy upgrade_policy) |
Attempts to load a tag from disk and link plugin data. More... | |
GUERILLA_LIB_API bool | SaveTag (BlamTag *tag, bool save_both=true) |
Attempts to save a tag back to disk. More... | |
GUERILLA_LIB_API bool | SaveTag (BlamTag *tag, bool keep_unused, bool keep_invalid, bool save_both=true) |
Attempts to save a tag back to disk. More... | |
GUERILLA_LIB_API bool | SaveTagAs (BlamTag *tag, std::string file_path, bool save_both=true) |
Attempts to save a tag to disk under a new filename. More... | |
GUERILLA_LIB_API bool | LinkPluginData (BlamTag *tag) |
Attempts to link all plugin data for a given tag. More... | |
GUERILLA_LIB_API BlamResult | LoadPlugins () |
Loads all available plugins within the default plugin directory '. More... | |
GUERILLA_LIB_API BlamResult | LoadPlugins (std::vector< std::string > search_folders) |
Loads all available plugins within the application plugin directory. More... | |
GUERILLA_LIB_API void | ReleasePlugins () |
Releases all plugin data. More... | |
GUERILLA_LIB_API std::vector< BlamPlugin * > | GetPluginList () |
Retrieves the list of loaded plugins. More... | |
GUERILLA_LIB_API BlamPlugin * | GetPlugin (std::string class_name) |
Retrieves a plugin based on its name. More... | |
GUERILLA_LIB_API BlamPlugin * | GetPlugin (std::string class_name, int version) |
Retrieves a plugin based on its name and version. More... | |
GUERILLA_LIB_API BlamPlugin * | GetPluginMatchOrNewer (std::string class_name, int min_version) |
Retrieves a plugin based on its name and version. More... | |
GUERILLA_LIB_API bool | PluginExists (std::string class_name) |
Checks whether or not a plugin exists. More... | |
GUERILLA_LIB_API bool | PluginExists (std::string class_name, int version) |
Checks whether or not a plugin exists. More... | |
GUERILLA_LIB_API bool | PluginExistsMatchOrNewer (std::string class_name, int min_version) |
Checks whether or not a plugin exists. More... | |
GUERILLA_LIB_API bool | VerifyPluginCompilationData (BlamPlugin *plugin) |
Performs a series of checks on a plugin to ensure that it is ready to be used for compilation. More... | |
GUERILLA_LIB_API bool | VerifyPluginIDs (std::vector< BlamPluginField * > field_list, std::string scope_name) |
Verifies all field IDs within a list of plugin fields. More... | |
GUERILLA_LIB_API bool | CheckFieldsExist (std::vector< BlamPluginField * > field_list, BlamMap< std::string, BlamTagFieldType > required_fields, std::string scope_name) |
Scans through a list of plugin fields and ensures that all required fields exist, and that they are of a given type. More... | |
Namespace containing functions relating to tags and plugins.
bool Guerilla::Tags::CheckFieldsExist | ( | std::vector< BlamPluginField * > | field_list, |
BlamMap< std::string, BlamTagFieldType > | required_fields, | ||
std::string | scope_name | ||
) |
Scans through a list of plugin fields and ensures that all required fields exist, and that they are of a given type.
This can be used in situations such as asset importing or other manual tag creation, in order to ensure that certain fields exist and are of the expected type.
field_list | - The list of fields to scan through. |
required_fields | - A map of required field IDs and types to check for. |
scope_name | - The name of the scope, such as a plugin name or block field ID. Used for debug messages. |
true
if all required fields exist. If any field is not found, or has a different type within the field list, then this will return false
. BlamPlugin * Guerilla::Tags::GetPlugin | ( | std::string | class_name | ) |
Retrieves a plugin based on its name.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
nullptr
is returned. BlamPlugin * Guerilla::Tags::GetPlugin | ( | std::string | class_name, |
int | version | ||
) |
Retrieves a plugin based on its name and version.
Will only return a match if both the name AND version are identical.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
version | - The version of the plugin. |
nullptr
is returned. std::vector< BlamPlugin * > Guerilla::Tags::GetPluginList | ( | ) |
Retrieves the list of loaded plugins.
BlamPlugin * Guerilla::Tags::GetPluginMatchOrNewer | ( | std::string | class_name, |
int | min_version | ||
) |
Retrieves a plugin based on its name and version.
Will only return a match if the name matches, and the version is at equal or greater than the version
parameter.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
min_version | - The minimum version of the plugin. |
nullptr
is returned. bool Guerilla::Tags::LinkPluginData | ( | BlamTag * | tag | ) |
Attempts to link all plugin data for a given tag.
tag | - Pointer to the tag to link plugin data for. |
true
if a plugin was found and linked, otherwise returns false
. BlamResult Guerilla::Tags::LoadPlugins | ( | ) |
Loads all available plugins within the default plugin directory '.
/plugins/'.
BlamResult::Success_OK
if all plugins loaded successfully, otherwise returns an error code. BlamResult Guerilla::Tags::LoadPlugins | ( | std::vector< std::string > | search_folders | ) |
Loads all available plugins within the application plugin directory.
search_folders | - List of directories to search for plugin files. |
BlamResult::Success_OK
if all plugins loaded successfully, otherwise returns an error code. BlamTag * Guerilla::Tags::LoadTag | ( | std::string | file_path | ) |
Attempts to load a tag from disk and link plugin data.
file_path | - The path to the tag file on disk. |
nullptr
if the tag could not be loaded. BlamTag * Guerilla::Tags::LoadTag | ( | std::string | file_path, |
BlamTagTreeNode * | tree_node | ||
) |
Attempts to load a tag from disk and link plugin data.
file_path | - The path to the tag file on disk. |
tree_node | - The tree node to associate with this tag. |
nullptr
if the tag could not be loaded. BlamTag * Guerilla::Tags::LoadTag | ( | std::string | file_path, |
BlamTagTreeNode * | tree_node, | ||
BlamTagUpgradePolicy | upgrade_policy | ||
) |
Attempts to load a tag from disk and link plugin data.
file_path | - The path to the tag file on disk. |
tree_node | - The tree node to associate with this tag. |
upgrade_policy | - Determines what versioning conditions must be met for the tag to be loaded. See BlamTagUpgradePolicy for details. |
nullptr
if the tag could not be loaded. bool Guerilla::Tags::PluginExists | ( | std::string | class_name | ) |
Checks whether or not a plugin exists.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
true
if a matching plugin was found, otherwise returns false
. bool Guerilla::Tags::PluginExists | ( | std::string | class_name, |
int | version | ||
) |
Checks whether or not a plugin exists.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
version | - The version of the plugin. |
true
if a matching plugin was found, otherwise returns false
. bool Guerilla::Tags::PluginExistsMatchOrNewer | ( | std::string | class_name, |
int | min_version | ||
) |
Checks whether or not a plugin exists.
class_name | - The long or short name of the tag class. Ex: scenario and scnr would both be valid. |
min_version | - The minimum version of the plugin. |
true
if a matching plugin was found, otherwise returns false
. void Guerilla::Tags::ReleasePlugins | ( | ) |
Releases all plugin data.
bool Guerilla::Tags::SaveTag | ( | BlamTag * | tag, |
bool | keep_unused, | ||
bool | keep_invalid, | ||
bool | save_both = true |
||
) |
Attempts to save a tag back to disk.
tag | - The tag to save to disk. |
keep_unused | - Whether or not to preserve unused fields within the tag. |
keep_invalid | - Whether or not to preserve invalid fields within the tag. |
save_both | - Whether or not to save both possible tag formats. When enabled, binary (compiled) tags will have their decompiled version saved as a .decompiled file, and decompiled tags will be compiled. Defaults to true . |
true
if the tag was successfully saved, otherwise returns false
. bool Guerilla::Tags::SaveTag | ( | BlamTag * | tag, |
bool | save_both = true |
||
) |
Attempts to save a tag back to disk.
tag | - The tag to save to disk. |
save_both | - Whether or not to save both possible tag formats. When enabled, binary (compiled) tags will have their decompiled version saved as a .decompiled file, and decompiled tags will be compiled. Defaults to true . |
true
if the tag was successfully saved, otherwise returns false
. bool Guerilla::Tags::SaveTagAs | ( | BlamTag * | tag, |
std::string | file_path, | ||
bool | save_both = true |
||
) |
Attempts to save a tag to disk under a new filename.
tag | - The tag to save to disk. |
file_path | - The file path of the new tag. |
save_both | - Whether or not to save both possible tag formats. When enabled, binary (compiled) tags will have their decompiled version saved as a .decompiled file, and decompiled tags will be compiled. Defaults to true . |
true
if the tag was successfully saved, otherwise returns false
. bool Guerilla::Tags::VerifyPluginCompilationData | ( | BlamPlugin * | plugin | ) |
Performs a series of checks on a plugin to ensure that it is ready to be used for compilation.
plugin | - The plugin to check. |
true
if the plugin passed all checks, otherwise returns false
. bool Guerilla::Tags::VerifyPluginIDs | ( | std::vector< BlamPluginField * > | field_list, |
std::string | scope_name | ||
) |
Verifies all field IDs within a list of plugin fields.
This will also search through any tag blocks and ensure that its children (including other tag blocks) are also valid.
field_list | - The list of fields to verify. |
scope_name | - The name of the "scope", used for debug messages. This will usually be the ID of the parent field when searching through a tag block, or "root" when searching through the root of a plugin. |
true
if all field IDs are valid, otherwise returns false
.