Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
engine_definitions.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifdef _NDEBUG
6 #define REL_TYPE "release"
7 #else
8 #define REL_TYPE "debug"
9 #endif
10 // The Halo 2 Alpha revealed that REL_TYPE can also be alpha, beta, or other such things.
11 
12 #define DEV_MODE true
13 
15 // BLAMITE VERSIONING GUIDELINES //
17 // XXXXX.MM.DD.YY.ZZZZ.NNNNNNNNNNN //
19 
20 /*
21 ╔═════════════════════════════════╗
22 ║ BLAMITE VERSIONING GUIDELINES ║
23 ╠═════════════════════════════════╣
24 ║ XXXXX ║
25 ╟─────────────────────────────────╢
26 ║ This should be replaced with ║
27 ║ the build major version. ║
28 ╠═════════════════════════════════╣
29 ║ MM.DD.YY ║
30 ╟─────────────────────────────────╢
31 ║ This refers to the date that ║
32 ║ the build was created: ║
33 ║ Month.Day.Year format. ║
34 ╠═════════════════════════════════╣
35 ║ ZZZZ ║
36 ╟─────────────────────────────────╢
37 ║ This should be replaced with ║
38 ║ the build minor number. ║
39 ╠═════════════════════════════════╣
40 ║ NNNNNNNNNNN ║
41 ╟─────────────────────────────────╢
42 ║ This should be replaced with ║
43 ║ the build's actual name. ║
44 ╚═════════════════════════════════╝
45 */
46 
47 /* box drawing characters
48 
49 ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
50 ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
51 ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
52 ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
53 ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
54 ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟
55 ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯
56 ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿
57 
58 */
59 
60 
61 
62 #ifndef BLAM
63 #define BLAM
64 #endif
65 
66 #ifndef UI_API
67 #define UI_API
68 #endif
69 
76 {
84 
91  CacheDebug,
92 
99  TagDebug,
100 
107  CacheTest,
108 
116  TagTest,
117 
124 };
125 
130 {
131  Tags,
132  Cache
133 };
134 
138 enum class BlamBuildType
139 {
145  Debug,
146 
152  Test,
153 
160  Release
161 };
162 
173 {
174  Default,
175  Console,
176  TextLog,
177  CrashScreen
178 };
179 
184 {
194 
205 
215 
229  BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode);
230 
236  BLAM std::string GetBuildDateTime();
237 
243  BLAM std::string GetReleaseType();
244 }
BlamVersionStringDisplayMode::Default
@ Default
Indicates the build string should use the default format.
BlamDebugMenuItem_Global::inc
double inc
The amount to increase or decrease the global value by when incrementing or decrementing.
Definition: debug_menu.h:127
Blam::BuildInfo::GetContentSource
BLAM BlamContentSource GetContentSource()
Retrieves the current content source.
Definition: engine_definitions.cpp:33
BlamContentSource::Cache
@ Cache
The engine will load all content from cache files.
BlamDebugMenuItem_Global::use_bounds
bool use_bounds
Whether or not the min/max bounds should be used.
Definition: debug_menu.h:126
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
BlamDebugMenuItem_Global::BlamDebugMenuItem_Global
BlamDebugMenuItem_Global()
Definition: BlamDebugMenuItem_Global.cpp:6
Real
@ Real
Definition: globals.h:25
BlamDebugMenuItem_Global::global_id
std::string global_id
The ID of the engine global to update.
Definition: debug_menu.h:125
BlamDebugMenuItemType::Submenu
@ Submenu
Enters into a submenu/subscreen upon activation.
Long
@ Long
Represents a long.
Definition: globals.h:27
logger.h
BlamVersionStringDisplayMode::TextLog
@ TextLog
Indicates the build string should be formatted for plain text log files.
BlamDebugMenuItem_Command::BlamDebugMenuItem_Command
BlamDebugMenuItem_Command()
Definition: BlamDebugMenuItem_Command.cpp:6
version
date New version
Definition: chiropteraDM.txt:50
BlamRuntimeConfiguration::Unspecified
@ Unspecified
A fallback configuration that is returned in the event that no configuration is properly set.
version_data.h
BlamDebugMenuItem_Global::min
double min
The minimum value of the global.
Definition: debug_menu.h:128
REL_TYPE
#define REL_TYPE
Definition: engine_definitions.h:8
BlamRuntimeConfiguration::CacheTest
@ CacheTest
Indicates the engine was built with the 'Cache Test' configuration.
BlamContentSource
BlamContentSource
Enumerator listing possible content sources.
Definition: engine_definitions.h:129
Boolean
@ Boolean
Represents a boolean. Can be true or false.
Definition: globals.h:24
BlamVersionStringDisplayMode::Console
@ Console
Indicates the build string should be formatted for the in-game console.
BlamDebugMenuItem_Submenu::~BlamDebugMenuItem_Submenu
~BlamDebugMenuItem_Submenu()
Definition: BlamDebugMenuItem_Submenu.cpp:8
BlamTagFieldType::Unspecified
@ Unspecified
Indicates that the field's type is not specified. Fields with this type should be considered invalid.
BlamDebugMenuItem_CommandSequence::BlamDebugMenuItem_CommandSequence
BlamDebugMenuItem_CommandSequence()
Definition: BlamDebugMenuItem_CommandSequence.cpp:6
project.h
console.h
BlamEngineGlobal::boolean_value
bool boolean_value
The boolean value of the global.
Definition: globals.h:56
Int
@ Int
Represents an int.
Definition: globals.h:30
BlamDebugMenuItem_Global::max
double max
The maximum value of the global.
Definition: debug_menu.h:129
config
ImFontConfig config
Definition: README.txt:49
BlamDebugMenuItem_Global::Decrement
void Decrement() override
Called when the menu item is active and the left arrow key is pressed.
Definition: BlamDebugMenuItem_Global.cpp:16
BLAM_VS_PLATFORM
#define BLAM_VS_PLATFORM
Definition: version_data.h:29
Blam::BuildInfo
Namespace containing functions which provide engine build information.
Definition: engine_definitions.h:183
Blam::BuildInfo::GetCurrentRuntimeConfig
BLAM BlamRuntimeConfiguration GetCurrentRuntimeConfig()
Retrieves the current runtime configuration.
Definition: engine_definitions.cpp:12
BlamDebugMenuItem_Global::Activate
void Activate() override
Called when the menu item is active and the enter key is pressed.
Definition: BlamDebugMenuItem_Global.cpp:11
BlamRuntimeConfiguration::TagTest
@ TagTest
Indicates the engine was built with the 'Tag Test' configuration.
Blam::BuildInfo::GetReleaseType
BLAM std::string GetReleaseType()
Retrieves the release type of the engine.
Definition: engine_definitions.cpp:179
BlamEngineGlobal::type
BlamGlobalType type
The type of the global.
Definition: globals.h:46
Blam::Content::Project::GetCurrentProjectInfo
BLAM BlamProjectInfo GetCurrentProjectInfo()
Definition: project.cpp:5
BlamContentSource::Tags
@ Tags
The engine will load all content from tags.
ENGINE_VERSION
#define ENGINE_VERSION
Definition: version_data.h:32
BlamDebugMenuItem_CommandSequence::current_exec_index
int current_exec_index
The index of the next item to run within the command sequence.
Definition: debug_menu.h:104
BLAM
#define BLAM
Definition: engine_definitions.h:63
BlamBuildType::Debug
@ Debug
The engine is built as a debug build.
BlamRuntimeConfiguration::TagDebug
@ TagDebug
Indicates the engine was built with the 'Tag Debug' configuration.
BlamDebugMenuItem_CommandSequence::Activate
void Activate() override
Called when the menu item is active and the enter key is pressed.
Definition: BlamDebugMenuItem_CommandSequence.cpp:12
BlamDebugMenuItemType::CommandSequence
@ CommandSequence
Runs a sequence of console commands upon activation.
BlamEngineGlobal
Structure containing data for a game engine global.
Definition: globals.h:44
globals.h
BlamVersionStringDisplayMode::CrashScreen
@ CrashScreen
Indicates the build string should be formatted for the crash screen.
BlamBuildType::Test
@ Test
The engine is built as a test build.
BlamDebugMenuItem_Global::Increment
void Increment() override
Called when the menu item is active and the right arrow key is pressed.
Definition: BlamDebugMenuItem_Global.cpp:138
BlamEngineGlobal::short_value
short short_value
The short value of the global.
Definition: globals.h:57
BlamDebugMenuItem
Class representing a debug menu item.
Definition: debug_menu.h:35
BlamEngineGlobal::read_only
bool read_only
Whether or not the global is protected from modification.
Definition: globals.h:50
BlamBuildType::Release
@ Release
The engine is built as a release build.
utilities.h
BlamRuntimeConfiguration::CacheRelease
@ CacheRelease
Indicates the engine was built with the 'Cache Release' configuration.
Blam::Globals::GetGlobalTypeLabel
BLAM std::string GetGlobalTypeLabel(BlamGlobalType type)
Retrieves a string representation of a global's type, for use in UI.
Definition: globals.cpp:40
Blam::Globals::GetGlobal
BLAM BlamEngineGlobal * GetGlobal(std::string name)
Retrieves a global with the specified ID.
Definition: globals.cpp:189
engine_definitions.h
BlamDebugMenuItemType::Command
@ Command
Runs a console command upon activation.
BlamRuntimeConfiguration::CacheDebug
@ CacheDebug
Indicates the engine was built with the 'Cache Debug' configuration.
Blam::Resources::Console::RunCommandLine
BLAM BlamResult RunCommandLine(std::string command_line)
Executed the provided string as a console command.
Definition: console.cpp:264
Short
@ Short
!< Represents a float.
Definition: globals.h:26
BlamDebugMenuItem_CommandSequence::commands
std::vector< std::string > commands
The command sequence to run upon activation.
Definition: debug_menu.h:103
Blam::BuildInfo::GetBuildType
BLAM BlamBuildType GetBuildType()
Retrieves the current build type.
Definition: engine_definitions.cpp:53
Blam::BuildInfo::GetBuildDateTime
BLAM std::string GetBuildDateTime()
Retrieves the build date and time of the engine, pulled directly from the __DATE__ and __TIME__ macro...
Definition: engine_definitions.cpp:169
BlamEngineGlobal::int_value
int int_value
The int value of the global.
Definition: globals.h:59
BlamDebugMenuItem_Submenu::BlamDebugMenuItem_Submenu
BlamDebugMenuItem_Submenu()
Definition: BlamDebugMenuItem_Submenu.cpp:3
BlamDebugMenuItem_Command::command
std::string command
The command to run upon activation.
Definition: debug_menu.h:81
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:262
BlamDebugMenuItemType
BlamDebugMenuItemType
Menu item type enumerator.
Definition: debug_menu.h:15
BlamBuildType
BlamBuildType
Enumerator listing possible build types.
Definition: engine_definitions.h:138
BlamEngineGlobal::float_value
float float_value
The float value of the global.
Definition: globals.h:60
Blam::BuildInfo::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:76
BlamRuntimeConfiguration
BlamRuntimeConfiguration
Enumerator listing possible engine runtime configurations.
Definition: engine_definitions.h:75
BlamDebugMenuItem_Submenu::items
std::vector< BlamDebugMenuItem * > items
The contents of the submenu to show upon activation.
Definition: debug_menu.h:164
BlamEngineGlobal::value_raw
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:49
BlamVersionStringDisplayMode
BlamVersionStringDisplayMode
Enumerator listing possible display modes for the Blamite build string.
Definition: engine_definitions.h:172
BlamDebugMenuItem_Command::Activate
void Activate() override
Called when the menu item is active and the enter key is pressed.
Definition: BlamDebugMenuItem_Command.cpp:11
BlamEngineGlobal::long_value
long long_value
The long value of the global.
Definition: globals.h:58