Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.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 
9 #include "version_data.h"
10 
12 {
19  {
20  public:
22  {
23  name = "version";
24  description = "Show engine version information.";
25  aliases = { "ver" };
26 
28  }
29 
31  {
32 
33  }
34 
35  BlamCommandResult onCommand(std::vector<std::string> arguments)
36  {
38  Blam::Logger::LogEventForce("minor version " + std::to_string(TAG_FIELDSET_VERSION) + " cache file language " + std::to_string(CACHE_FILE_LANGUAGE), WSV_NONE);
39  Blam::Logger::LogEventForce("git commit " + std::string(CURRENT_COMMIT), WSV_NONE);
40  //Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
41 
42  return BlamCommandResult::Ok;
43  }
44  };
45 }
Blam::Resources::Console::VersionCommand
Class for the version command.
Definition: version.hpp:18
Blam::Resources::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:21
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
tags.h
Blam::Resources::Console::VersionCommand::~VersionCommand
~VersionCommand()
Definition: version.hpp:30
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:54
Console
@ Console
Console widget.
Definition: render_stack.h:77
TAG_FIELDSET_VERSION
#define TAG_FIELDSET_VERSION
Macro defining the tag fieldset version.
Definition: tags.h:37
cache_files.h
CACHE_FILE_LANGUAGE
#define CACHE_FILE_LANGUAGE
Macro specifiying cache file language/version.
Definition: cache_files.h:13
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:56
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:35
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.
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:258
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