Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
Blam::EngineText Namespace Reference

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...
 

Detailed Description

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.

Function Documentation

◆ GetEngineStrings()

std::map< std::string, BlamEngineString > * Blam::EngineText::GetEngineStrings ( )

Retrieves the list of all loaded engine strings.

Returns
Pointer to the list of all loaded strings.

◆ GetErrorStrings()

std::map< int, BlamEngineString * > * Blam::EngineText::GetErrorStrings ( )

Retrieves the list of all loaded error code strings.

Returns
Pointer to the list of all loaded error strings.

◆ LoadGameEngineStrings()

bool Blam::EngineText::LoadGameEngineStrings ( )

Loads all strings from the default game engine text file.

Returns
true if all strings were loaded successfully, otherwise returns false.

◆ LookupErrorString()

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.

Parameters
error_code- The error code to look up.
Returns
A string associated with this error code.

◆ LookupString()

std::string Blam::EngineText::LookupString ( std::string  id)

Finds a string with a given ID.

Parameters
id- The ID of the desired string.
Returns
A string that has a given ID. If no matching string is found, a fallback string is used instead.

◆ StringExists()

bool Blam::EngineText::StringExists ( std::string  id)

Looks through the list of loaded engine strings to see if a given string has been loaded.

Parameters
id- The string ID to look for.
Returns
true if the string exists, otherwise returns false.