Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
console.cpp File Reference
+ Include dependency graph for console.cpp:

Functions

void DisplayCommandError (BlamResult error_code, BlamConsoleCommand *command)
 Displays an error message to inform the user why a command failed to run. More...
 
void display_global_update_message (BlamGlobalUpdateResult error_code, BlamEngineGlobal *global)
 Displays an error message to inform the user why a global variable failed to update. More...
 
void console_update_global (std::string global_name, std::vector< std::string > arguments)
 Function to handle updating an engine global from the console. More...
 

Variables

std::map< std::string, BlamConsoleCommand * > command_list = std::map<std::string, BlamConsoleCommand*>()
 The list of all loaded console commands. More...
 

Function Documentation

◆ console_update_global()

void console_update_global ( std::string  global_name,
std::vector< std::string arguments 
)

Function to handle updating an engine global from the console.

Parameters
global_name- The name of the global being updated.
arguments- The arguments provided to the command.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ display_global_update_message()

void display_global_update_message ( BlamGlobalUpdateResult  error_code,
BlamEngineGlobal global 
)

Displays an error message to inform the user why a global variable failed to update.

Note
The message shown for #Blam::Globals::InvalidType will differ based on the useEnhancedGvarMessages configuration setting. When disabled, the user will see the classic message, which resembles the following:
</blockquote>
When the setting is enabled, the output changes to the following to keep it easy to
understand:
<blockquote>
```invalid argument type provided for gvar ui_scale_factor, expected int

The option is enabled by default for added user-friendliness.
Parameters
error_code- The status of the global update result. See #Blam::Globals::GvarUpdateResult for details.
global- A pointer to the global that was attempted to be modified.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DisplayCommandError()

void DisplayCommandError ( BlamResult  error_code,
BlamConsoleCommand command 
)

Displays an error message to inform the user why a command failed to run.

Parameters
error_code- The command status returned by the Execute() call.
command- The console command that was executed.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ command_list

std::map<std::string, BlamConsoleCommand*> command_list = std::map<std::string, BlamConsoleCommand*>()

The list of all loaded console commands.

The key is the name of the command. The value is a pointer to the console command object.