Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
Namespaces | Classes | Enumerations | Functions
Blam::Console Namespace Reference

Namespace for things relating to the debug console. More...

Namespaces

 Handlers
 Functions used to handle multiple commands that have similar behavior.
 

Classes

class  AbortCommand
 Class for the abort command. More...
 
class  ClassifyCommand
 Class for the classify command. More...
 
class  ClearScreenCommand
 Class for the cls command. More...
 
class  ConsoleCommand
 Class used to represent a console command. More...
 
class  CrashCommand
 Class for the crash command. More...
 
class  CreateCommandObjectCommand
 Class for the create_cmd_obj command. More...
 
class  DXRenderTargetClearCommand
 Class for the dx_render_target_clear command. More...
 
class  GeneratePluginsCommand
 Class for the generate_plugins command. More...
 
class  Halo2HelpCommand
 Class for the h2help command. More...
 
class  Halo2PrintCommand
 Class for the h2print command. More...
 
class  HelpCommand
 Class for the help command. More...
 
class  HistoryCommand
 Class for the history command. More...
 
class  ListColorsCommand
 Class for the list_colors command. More...
 
class  ListLevelsCommand
 Class for the list_levels command. More...
 
class  NoUCommand
 Class for the nou command. More...
 
class  PrintCommand
 Class for the print command. More...
 
class  QuitCommand
 Class for the quit command. More...
 
class  RegenDebugMenuCommand
 Class for the regenerate_debug_menu command. More...
 
class  ResolutionCommand
 Class for the screenres command. More...
 
class  ScriptDocCommand
 Class for the script_doc command. More...
 
class  SentryTestCommand
 A command to test Sentry functionality. More...
 
class  ShowStatsCommand
 Class for the show_stats command. More...
 
class  VersionCommand
 Class for the version command. More...
 
class  Win32DialogTestCommand
 Class for the win32_dialog_test command. More...
 

Enumerations

enum  CommandStatus { Ok, InvalidArguments, WrongArgumentCount, Unsupported }
 Indicates the return state of a console command. More...
 
enum  CommandType { Builtin, Script, Global, Other }
 Used to indicate the type of command. More...
 

Functions

BLAM std::string RegisterCommand (Blam::Console::ConsoleCommand *command)
 Register a new command object. More...
 
BLAM void UnregisterCommand (std::string name)
 Unregisters the console command with the specified name. More...
 
BLAM ConsoleCommandGetCommand (std::string name)
 Retrieves a command with the specified name. More...
 
BLAM HRESULT RunCommandLine (std::string command_line)
 Executed the provided string as a console command. More...
 
BLAM std::map< std::string, ConsoleCommand * > GetCommandList ()
 Retrieves the list of all loaded console commands. More...
 
BLAM void RegisterBuiltinCommands ()
 Registers all hard-coded engine commands. More...
 
BLAM void Cleanup ()
 Cleans up all console command data. More...
 

Detailed Description

Namespace for things relating to the debug console.

Enumeration Type Documentation

◆ CommandStatus

Indicates the return state of a console command.

Since we aren't able to properly define HRESULTS that compile with Message Compiler (mc.exe), we are left with this hacky thing. I mean - it works, right?

Enumerator
Ok 

The command was run without error.

InvalidArguments 

Invalid arguments (or argument types) were specified - such as providing a string in place of an int.

WrongArgumentCount 

Too few or too many arguments were provided.

Unsupported 

The command is a legacy command from the original ImGUI-based console that is no longer supported.

◆ CommandType

Used to indicate the type of command.

Enumerator
Builtin 

A command that is hard-coded into the engine.

Script 

A command that originates from a BlamScript.

Global 

A command that is used to modify a global. No longer serves any use as globals can be modified in console without any extra functionality.

Other 

Currently unused.

Function Documentation

◆ Cleanup()

void Blam::Console::Cleanup ( )

Cleans up all console command data.

◆ GetCommand()

Blam::Console::ConsoleCommand * Blam::Console::GetCommand ( std::string  name)

Retrieves a command with the specified name.

Parameters
name- The name of the command to be retrieved.
Returns
A pointer to the console command, or nullptr if the command could not be found.

◆ GetCommandList()

std::map< std::string, Blam::Console::ConsoleCommand * > Blam::Console::GetCommandList ( )

Retrieves 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.

Returns
The map<> of commands.

◆ RegisterBuiltinCommands()

void Blam::Console::RegisterBuiltinCommands ( )

Registers all hard-coded engine commands.

◆ RegisterCommand()

std::string Blam::Console::RegisterCommand ( Blam::Console::ConsoleCommand command)

Register a new command object.

This must be called for the command to be usable in scripts or from console.

Parameters
command- The command to be registered.
Returns
The name property of the provided command.

◆ RunCommandLine()

HRESULT Blam::Console::RunCommandLine ( std::string  command_line)

Executed the provided string as a console command.

Parameters
command_line- The text that was typed into the console.
Returns
Will always return S_OK.

◆ UnregisterCommand()

void Blam::Console::UnregisterCommand ( std::string  name)

Unregisters the console command with the specified name.

After calling this, the specified command will no longer be usable in scripts or from console

Parameters
name- The name of the command to be unregistered.