summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-11 23:49:09 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-12 03:28:08 +0100
commit9e1c048e206d4e91d03ef8978bf61a6af654fc3b (patch)
tree1dac0da5ad8bddee9197139937b8f284c8cfac05 /src/core/main.cpp
parentbetter controller menu txds (diff)
downloadre3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.gz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.bz2
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.lz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.xz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.zst
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.zip
Diffstat (limited to '')
-rw-r--r--src/core/main.cpp56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index af0d556a..363087c0 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -70,6 +70,9 @@
#include "custompipes.h"
#include "screendroplets.h"
#include "MemoryHeap.h"
+#ifdef USE_OUR_VERSIONING
+#include "GitSHA1.h"
+#endif
GlobalScene Scene;
@@ -86,6 +89,9 @@ bool gbModelViewer;
#ifdef TIMEBARS
bool gbShowTimebars;
#endif
+#ifdef TOGGLEABLE_VERSION_TEXT
+bool gDrawVersionText;
+#endif
volatile int32 frameCount;
@@ -1089,13 +1095,58 @@ DisplayGameDebugText()
#ifdef DRAW_GAME_VERSION_TEXT
wchar ver[200];
-
+
+#ifdef TOGGLEABLE_VERSION_TEXT
+ if(gDrawVersionText)
+#endif
+ {
+
+#ifdef USE_OUR_VERSIONING
+ char verA[200];
+ sprintf(verA,
+#if defined _WIN32
+ "Win "
+#elif defined __linux__
+ "Linux "
+#elif defined __APPLE__
+ "Mac OS X "
+#elif defined __FreeBSD__
+ "FreeBSD "
+#else
+ "Posix-compliant "
+#endif
+#if defined __LP64__ || defined _WIN64
+ "64-bit "
+#else
+ "32-bit "
+#endif
+#if defined RW_D3D9
+ "D3D9 "
+#elif defined RWLIBS
+ "D3D8 "
+#elif defined RW_GL3
+ "OpenGL "
+#endif
+#if defined AUDIO_OAL
+ "OAL "
+#elif defined AUDIO_MSS
+ "MSS "
+#endif
+#if defined _DEBUG || defined DEBUG
+ "DEBUG "
+#endif
+ "%.8s",
+ g_GIT_SHA1);
+ AsciiToUnicode(verA, ver);
+ CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f));
+#else
AsciiToUnicode(version_name, ver);
+ CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
+#endif
CFont::SetPropOn();
CFont::SetBackgroundOff();
CFont::SetFontStyle(FONT_BANK);
- CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
CFont::SetCentreOff();
CFont::SetRightJustifyOff();
CFont::SetWrapx(SCREEN_WIDTH);
@@ -1107,6 +1158,7 @@ DisplayGameDebugText()
#else
CFont::PrintString(10.0f, 10.0f, ver);
#endif
+ }
#endif // #ifdef DRAW_GAME_VERSION_TEXT
FrameSamples++;