Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
version.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../console.h"
4 
7 #include "version_data.h"
8 
10 {
20  {
21  public:
23  {
24  name = "version";
25  description = "Show engine version information.";
26  aliases = { "ver" };
27 
29  }
30 
32  {
33  delete this;
34  }
35 
36  BlamCommandResult onCommand(std::vector<std::string> arguments)
37  {
39  Blam::Logger::LogEventForce("minor version 0 cache file language e", WSV_NONE);
40  Blam::Logger::LogEventForce("git commit " + std::string(CURRENT_COMMIT), WSV_NONE);
41  Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
42 
43  return BlamCommandResult::Ok;
44  }
45  };
46 }
Blam::Resources::Console::VersionCommand
Class for the version command.
Definition: version.hpp:19
Blam::Resources::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:22
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:57
logger.h
BlamCommandResult::Ok
@ Ok
The command was run without error.
version_data.h
Blam::Resources::Console::VersionCommand::~VersionCommand
~VersionCommand()
Definition: version.hpp:31
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:54
Console
@ Console
Console widget.
Definition: render_stack.h:77
WSV_ERROR
#define WSV_ERROR
Macro for 'Error' log seveirty. Original pre-enum value was 2.
Definition: logger.h:17
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, BlamLogLevel severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:218
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:56
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:16
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition: version_data.h:14
Blam::EngineDefs::GetVersionBuildString
BLAM std::string GetVersionBuildString(VersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:11
engine_definitions.h
Blam::Resources::Console::VersionCommand::onCommand
BlamCommandResult onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:36
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:61
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
BlamCommandResult
BlamCommandResult
Indicates the return state of a console command.
Definition: console.h:22
BlamConsoleCommand::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:59
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5