mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-09 00:24:15 +00:00
Always show version overlay, add more info
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
#include "ClientConstants.h"
|
||||
|
||||
const wstring ClientConstants::VERSION_STRING = wstring(L"Minecraft LCE ") + VER_FILEVERSION_STR_W;//+ SharedConstants::VERSION_STRING;
|
||||
const wstring ClientConstants::BRANCH_STRING = VER_BRANCHVERSION_STR_W;
|
||||
|
||||
@@ -13,6 +13,7 @@ class ClientConstants
|
||||
// INTERNAL DEVELOPMENT SETTINGS
|
||||
public:
|
||||
static const wstring VERSION_STRING;
|
||||
static const wstring BRANCH_STRING;
|
||||
|
||||
static const bool DEADMAU5_CAMERA_CHEATS = false;
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#define VER_PRODUCTBUILD 560
|
||||
#define VER_PRODUCTVERSION_STR_W L"DEV (unknown)"
|
||||
#define VER_PRODUCTVERSION_STR_W L"DEV (unknown version)"
|
||||
#define VER_FILEVERSION_STR_W VER_PRODUCTVERSION_STR_W
|
||||
#define VER_BRANCHVERSION_STR_W L"UNKNOWN BRANCH"
|
||||
#define VER_NETWORK VER_PRODUCTBUILD
|
||||
|
||||
@@ -851,7 +851,10 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
||||
|
||||
#ifndef _FINAL_BUILD
|
||||
MemSect(31);
|
||||
if (minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr)
|
||||
|
||||
// temporarily render overlay at all times so version is more obvious in bug reports
|
||||
// we can turn this off once things stabilize
|
||||
if (true)// minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr)
|
||||
{
|
||||
const int debugLeft = 1;
|
||||
const int debugTop = 1;
|
||||
@@ -870,6 +873,9 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
||||
vector<wstring> lines;
|
||||
|
||||
lines.push_back(ClientConstants::VERSION_STRING);
|
||||
lines.push_back(ClientConstants::BRANCH_STRING);
|
||||
if (minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr)
|
||||
{
|
||||
lines.push_back(minecraft->fpsString);
|
||||
lines.push_back(L"E: " + std::to_wstring(minecraft->level->getAllEntities().size())); // Could maybe use entity::shouldRender to work out how many are rendered but thats like expensive
|
||||
// TODO Add server information with packet counts - once multiplayer is more stable
|
||||
@@ -974,13 +980,13 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This is all LCE only stuff, it was never on java
|
||||
lines.push_back(L""); // Spacer
|
||||
lines.push_back(L"Seed: " + std::to_wstring(minecraft->level->getLevelData()->getSeed()));
|
||||
lines.push_back(minecraft->gatherStats1()); // Time to autosave
|
||||
lines.push_back(minecraft->gatherStats2()); // Empty currently - CPlatformNetworkManagerStub::GatherStats()
|
||||
lines.push_back(minecraft->gatherStats3()); // RTT
|
||||
}
|
||||
|
||||
#ifdef _DEBUG // Only show terrain features in debug builds not release
|
||||
// TERRAIN FEATURES
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
$sha = (git rev-parse --short=7 HEAD)
|
||||
$ref = (git symbolic-ref --short HEAD)
|
||||
|
||||
if ($env:GITHUB_REPOSITORY) {
|
||||
$ref = "$env:GITHUB_REPOSITORY/$(git symbolic-ref --short HEAD)"
|
||||
} else {
|
||||
$remoteUrl = (git remote get-url origin)
|
||||
# handle github urls only, can't predict other origins behavior
|
||||
if ($remoteUrl -match '(?:github\.com[:/])([^/:]+/[^/]+?)(?:\.git)?$') {
|
||||
$ref = "$($matches[1])/$(git symbolic-ref --short HEAD)"
|
||||
}else{
|
||||
# fallback to just symbolic ref in case remote isnt what we expect
|
||||
$ref = "UNKNOWN/$(git symbolic-ref --short HEAD)"
|
||||
}
|
||||
}
|
||||
|
||||
$build = 560 # Note: Build/network has to stay static for now, as without it builds wont be able to play together. We can change it later when we have a better versioning scheme in place.
|
||||
$suffix = ""
|
||||
|
||||
@@ -18,7 +31,8 @@ if (git status --porcelain) {
|
||||
#pragma once
|
||||
|
||||
#define VER_PRODUCTBUILD $build
|
||||
#define VER_PRODUCTVERSION_STR_W L"$sha$suffix ($ref)"
|
||||
#define VER_PRODUCTVERSION_STR_W L"$sha$suffix"
|
||||
#define VER_FILEVERSION_STR_W VER_PRODUCTVERSION_STR_W
|
||||
#define VER_BRANCHVERSION_STR_W L"$ref"
|
||||
#define VER_NETWORK VER_PRODUCTBUILD
|
||||
"@ | Set-Content "Common/BuildVer.h"
|
||||
|
||||
Reference in New Issue
Block a user