![]() |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
Namespace for things related to game engine strings. More...
Functions | |
BLAM bool | LoadGameEngineStrings () |
Loads all strings from the default game engine text file. More... | |
BLAM std::string | LookupString (std::string id) |
Finds a string with a given ID. More... | |
BLAM std::string | LookupErrorString (int error_code) |
Finds a string message associated with a given error code. More... | |
BLAM std::map< std::string, BlamEngineString > * | GetEngineStrings () |
Retrieves the list of all loaded engine strings. More... | |
BLAM std::map< int, BlamEngineString * > * | GetErrorStrings () |
Retrieves the list of all loaded error code strings. More... | |
BLAM bool | StringExists (std::string id) |
Looks through the list of loaded engine strings to see if a given string has been loaded. More... | |
Namespace for things related to game engine strings.
This is the Blamite equivalent to the globals/game_engine_text
string table found within Halo's engines. In order to maintain separation between the "game" and the "game engine", any and all strings that relate to the engine itself and aren't dependent on any specific game content should be handled through this system.
Even so, those strings are still content in some sense, in that strings are stored as a file within the game directory. The name of that file is controlled by the GAME_ENGINE_TEXT_FILE macro.
std::map< std::string, BlamEngineString > * Blam::EngineText::GetEngineStrings | ( | ) |
Retrieves the list of all loaded engine strings.
std::map< int, BlamEngineString * > * Blam::EngineText::GetErrorStrings | ( | ) |
Retrieves the list of all loaded error code strings.
bool Blam::EngineText::LoadGameEngineStrings | ( | ) |
Loads all strings from the default game engine text file.
true
if all strings were loaded successfully, otherwise returns false
. std::string Blam::EngineText::LookupErrorString | ( | int | error_code | ) |
Finds a string message associated with a given error code.
If no matching string is found, then a fallback string is used instead.
error_code | - The error code to look up. |
std::string Blam::EngineText::LookupString | ( | std::string | id | ) |
Finds a string with a given ID.
id | - The ID of the desired string. |
bool Blam::EngineText::StringExists | ( | std::string | id | ) |
Looks through the list of loaded engine strings to see if a given string has been loaded.
id | - The string ID to look for. |
true
if the string exists, otherwise returns false
.