Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.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 
15 namespace Blam
16 {
27  namespace EngineText
28  {
35 
43  BLAM std::string LookupString(std::string id);
44 
53  BLAM std::string LookupErrorString(int error_code);
54 
60  BLAM std::map<std::string, BlamEngineString>* GetEngineStrings();
61 
67  BLAM std::map<int, BlamEngineString*>* GetErrorStrings();
68 
76  BLAM bool StringExists(std::string id);
77  }
78 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:28
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:36
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
logger.h
Blam::EngineText::GetErrorStrings
BLAM std::map< int, BlamEngineString * > * GetErrorStrings()
Retrieves the list of all loaded error code strings.
Definition: engine_text.cpp:65
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:70
ENGINE_DATA_PATH
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:36
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:60
GAME_ENGINE_TEXT_FILE
#define GAME_ENGINE_TEXT_FILE
The file used to read game engine strings from.
Definition: engine_text.h:9
core.h
Blam::EngineText::LoadGameEngineStrings
BLAM bool LoadGameEngineStrings()
Loads all strings from the default game engine text file.
Definition: engine_text.cpp:13
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:48