 |
Blamite Game Engine - blam!
00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
7 #include <Strings/components/resources/color/BlamColor.h>
8 #include <Strings/components/utils/string/string.h>
10 #define GLOBALS_FILE "globals.xml"
BlamGlobalType
Enumerator for the type of global variable.
Definition: globals.h:32
@ Short
!< Represents a float.
Definition: globals.h:36
@ OutOfBounds
The provided value was too small or too large for the globals' data type.
BLAM bool GlobalExists(std::string id)
Determines whether or not a global exists.
Definition: globals.cpp:27
BLAM BlamGlobalUpdateResult UpdateGlobal(std::string name, std::string new_value)
Updates the value of a String global.
Definition: globals.cpp:574
@ Real
Definition: globals.h:35
std::string name
The name of the global.
Definition: globals.h:57
Namespace containing functions relating to game engine globals.
Definition: globals.h:77
@ UnknownGlobal
The specified global does not exist.
BLAM bool LoadGlobalsFromFile()
Loads any globals from #GVARS_FILE.
Definition: globals.cpp:202
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:403
@ Ok
The global was updated successfully.
bool boolean_value
The boolean value of the global.
Definition: globals.h:66
@ Int
Represents an int.
Definition: globals.h:40
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:415
std::string info
An optional description of the global.
Definition: globals.h:58
@ InvalidArgs
The provided arguments were invalid.
BlamGlobalType type
The type of the global.
Definition: globals.h:56
@ String
Represents a std::string.
Definition: globals.h:39
Structure containing data for a game engine global.
Definition: globals.h:54
BLAM void RegisterGlobal(BlamEngineGlobal var)
Registers a new engine global.
Definition: globals.cpp:61
BLAM short * GetGlobalAsShort(std::string name)
Retrieves a global's value as a short.
Definition: globals.cpp:367
BlamGlobalUpdateResult
Enumerator for the result of a global update attempt.
Definition: globals.h:19
short short_value
The short value of the global.
Definition: globals.h:67
bool read_only
Whether or not the global is protected from modification.
Definition: globals.h:60
@ InvalidType
The provided value was of an invalid type.
BLAM std::string GetGlobalTypeLabel(BlamGlobalType type)
Retrieves a string representation of a global's type, for use in UI.
Definition: globals.cpp:40
BLAM BlamEngineGlobal * GetGlobal(std::string name)
Retrieves a global with the specified ID.
Definition: globals.cpp:189
BlamColor color_value
The color value of the global.
Definition: globals.h:71
@ Long
Represents a long.
Definition: globals.h:37
@ Color
Represents a BlamColor. See #BlamColor for details.
Definition: globals.h:41
@ Boolean
Represents a boolean. Can be true or false.
Definition: globals.h:34
BLAM long * GetGlobalAsLong(std::string name)
Retrieves a global's value as a long.
Definition: globals.cpp:379
#define BLAM
Definition: globals.h:13
int int_value
The int value of the global.
Definition: globals.h:69
BLAM std::string * GetGlobalAsString(std::string name)
Retrieves a global's value as a string.
Definition: globals.cpp:355
@ GlobalIsProtected
The specified global is protected and cannot be modified during runtime.
BLAM BlamGlobalUpdateResult UpdateGlobalWrap(std::string name, std::string new_value)
Updates a global's raw value.
Definition: globals.cpp:431
float float_value
The float value of the global.
Definition: globals.h:70
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:59
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:343
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font name
Definition: ARPHICPL.TXT:16
BLAM std::map< std::string, BlamEngineGlobal > * GetGlobalsList()
Retrieves the list of loaded globals.
Definition: globals.cpp:22
long long_value
The long value of the global.
Definition: globals.h:68
BLAM int * GetGlobalAsInteger(std::string name)
Retrieves a global's value as an int.
Definition: globals.cpp:391