Blamite Game Engine - blam!  00272.10.26.20.0001.blamite
The core library for the Blamite Game Engine.
h2print.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
4 
5 namespace Blam::Console
6 {
15  {
16  public:
18  {
19  name = "h2print";
20  description = "Prints a message to the screen. Only one word is supported, and no color overrides are present.";
21  aliases = { "cprint" };
22 
24  }
25 
27  {
28  delete this;
29  }
30 
31  CommandStatus onCommand(std::vector<std::string> arguments)
32  {
33  using namespace Blam::Logger;
34 
35  if (arguments.size() != 1)
36  {
38  }
39  else
40  {
41  BlamColor color;
42  color.r = 0;
43  color.g = 255;
44  color.b = 0;
45 
46  LogEventForce(BlamStrings::Utils::String::ToLower(arguments[0]), color);
47 
48  return CMD_OK;
49  }
50  }
51  };
52 }
Blam::Console::ConsoleCommand::aliases
std::vector< std::string > aliases
A list of aliases for the command. Executing any of these instead of the command name will behave the...
Definition: console.h:75
Blam::Console::ConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:73
CMD_ERR_WRONG_ARGS_COUNT
#define CMD_ERR_WRONG_ARGS_COUNT
Macro for Wrong Arg Count command status. See Blam::Console::WrongArgumentCount for more details.
Definition: console.h:11
Blam::Console::Halo2PrintCommand
Class for the h2print command.
Definition: h2print.hpp:14
Blam::Console::ConsoleCommand::type
CommandType type
The type of command this is. See Blam::Console::CommandType for more information.
Definition: console.h:77
Blam::Console::CommandStatus
CommandStatus
Indicates the return state of a console command.
Definition: console.h:28
Blam::Console::Halo2PrintCommand::~Halo2PrintCommand
~Halo2PrintCommand()
Definition: h2print.hpp:26
logger.h
BlamColor::g
short g
The Green value of the color.
Definition: globals.h:24
Blam::Console::Halo2PrintCommand::Halo2PrintCommand
Halo2PrintCommand()
Definition: h2print.hpp:17
Blam::Console::Builtin
@ Builtin
A command that is hard-coded into the engine.
Definition: console.h:41
Blam::Console::ConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:70
BlamColor::r
short r
The Red value of the color.
Definition: globals.h:23
BlamColor::b
short b
The Blue value of the color.
Definition: globals.h:25
Blam::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Blam::Console::Halo2PrintCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: h2print.hpp:31
Blam::Console::ConsoleCommand
Class used to represent a console command.
Definition: console.h:50
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, LogSeverity severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:150
CMD_OK
#define CMD_OK
Macro for OK command status. See Blam::Console::Ok for more details.
Definition: console.h:9
Blam::Logger
Namespace containing things related to the Blamite Logger.
Definition: logger.h:82
BlamColor
Structure representing a color.
Definition: globals.h:20