Elaztek Developer Hub
Switch Project...
blam!
Editing Kit
Guerilla
Sapien
Tool
Foundry
Libraries
Keystone
Strings
Forums
Discord
Doxygen
Jenkins
Guides
Gitlab
Blamite Game Engine - blam!
00423.10.27.24.0533.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
5
#include "
components/content/cache_files/cache_files.h
"
6
#include "
components/content/tags/tags.h
"
7
#include "
components/diagnostics/logger/logger.h
"
8
#include "
components/resources/engine_definitions/engine_definitions.h
"
9
#include "
version_data.h
"
10
11
namespace
Blam::Resources::Console
12
{
18
class
VersionCommand
:
public
BlamConsoleCommand
19
{
20
public
:
21
VersionCommand
()
22
{
23
name
=
"version"
;
24
description
=
"Show engine version information."
;
25
aliases
= {
"ver"
};
26
27
type
=
BlamCommandType::Builtin
;
28
}
29
30
BlamResult
Execute
(std::vector<std::string> arguments)
31
{
32
std::string minor_version = std::to_string(TAG_FIELDSET_VERSION);
33
std::string cache_file_language =
Blam::Content::CacheFiles::GetCacheFileLanguageString
(
CACHE_FILE_LANGUAGE
);
34
std::string git_commit = std::string(
CURRENT_COMMIT
);
35
36
cache_file_language = BlamStrings::Utils::String::ToLower(cache_file_language);
37
38
Blam::Logger::LogEventForce
(
Blam::BuildInfo::GetVersionBuildString
(
BlamVersionStringDisplayMode::Console
), WSV_NONE);
39
Blam::Logger::LogEventForce
(
"minor version "
+ minor_version +
" cache file language "
+ cache_file_language, WSV_NONE);
40
Blam::Logger::LogEventForce
(
"git commit "
+ git_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
BlamResult::Success_OK;
44
}
45
};
46
}
Blam::Content::CacheFiles::GetCacheFileLanguageString
BLAM std::string GetCacheFileLanguageString(BlamCacheFileLanguage language)
Retrieves the current cache file language as a string.
Definition:
cache_files.cpp:10
Blam::Resources::Console::VersionCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition:
version.hpp:30
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:36
logger.h
version_data.h
BlamConsoleCommand
Class used to represent a console command.
Definition:
console.h:33
BlamVersionStringDisplayMode::Console
@ Console
Indicates the build string should be formatted for the in-game console.
cache_files.h
CACHE_FILE_LANGUAGE
#define CACHE_FILE_LANGUAGE
Macro specifiying cache file language.
Definition:
cache_files.h:18
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition:
console.h:35
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition:
version_data.h:14
engine_definitions.h
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition:
console.h:40
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition:
aliases.cpp:262
tags.h
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:38
Blam::BuildInfo::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition:
engine_definitions.cpp:76
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition:
abort.hpp:5
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
blam
components
resources
console
commands
version.hpp
Generated on Sun Oct 27 2024 06:11:32 for Blamite Game Engine - blam! by
1.8.17