Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
engine_text.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <map>
5 #include <Strings/components/resources/strings/strings.h>
6 
7 #define ENGINE_TEXT(string_id) Blam::EngineText::LookupString(string_id)
8 
9 #define GAME_ENGINE_TEXT_FILE "game_engine_text.xml"
10 
11 #ifndef BLAM
12 #define BLAM
13 #endif
14 
26 {
33 
41  BLAM std::string LookupString(std::string id);
42 
51  BLAM std::string LookupErrorString(int error_code);
52 
58  BLAM std::map<std::string, BlamEngineString>* GetEngineStrings();
59 
65  BLAM std::map<int, BlamEngineString*>* GetErrorStrings();
66 
74  BLAM bool StringExists(std::string id);
75 }
BLAM
#define BLAM
Definition: engine_text.h:12
Blam::EngineText::LookupString
BLAM std::string LookupString(std::string id)
Finds a string with a given ID.
Definition: engine_text.cpp:35
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
logger.h
Blam::EngineText::GetErrorStrings
BLAM std::map< int, BlamEngineString * > * GetErrorStrings()
Retrieves the list of all loaded error code strings.
Definition: engine_text.cpp:64
engine_text.h
Blam::EngineText::StringExists
BLAM bool StringExists(std::string id)
Looks through the list of loaded engine strings to see if a given string has been loaded.
Definition: engine_text.cpp:69
ENGINE_DATA_PATH
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:34
resource.h
BlamEngineDataFolder::Resources
@ Resources
Directory containing other resources and data, usually string tables and globals. Defaults to ....
Blam::EngineText::GetEngineStrings
BLAM std::map< std::string, BlamEngineString > * GetEngineStrings()
Retrieves the list of all loaded engine strings.
Definition: engine_text.cpp:59
GAME_ENGINE_TEXT_FILE
#define GAME_ENGINE_TEXT_FILE
The file used to read game engine strings from.
Definition: engine_text.h:9
Blam::EngineText
Namespace for things related to game engine strings.
Definition: engine_text.h:25
Blam::EngineText::LoadGameEngineStrings
BLAM bool LoadGameEngineStrings()
Loads all strings from the default game engine text file.
Definition: engine_text.cpp:12
config.h
placeholders.h
Blam::EngineText::LookupErrorString
BLAM std::string LookupErrorString(int error_code)
Finds a string message associated with a given error code.
Definition: engine_text.cpp:47