summaryrefslogtreecommitdiffstats
path: root/src/core/Debug.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-28 13:24:55 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-28 13:24:55 +0100
commit9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18 (patch)
tree6e220fddfcabc63c477335fb1ddccefe7b6d5e0d /src/core/Debug.cpp
parentgarages part 1 (diff)
parentremove include <new> from common.h (diff)
downloadre3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.gz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.bz2
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.lz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.xz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.zst
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.zip
Diffstat (limited to '')
-rw-r--r--src/core/Debug.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/Debug.cpp b/src/core/Debug.cpp
index bdcbaf04..2b713198 100644
--- a/src/core/Debug.cpp
+++ b/src/core/Debug.cpp
@@ -89,3 +89,49 @@ CDebug::DebugDisplayTextBuffer()
}
#endif
}
+
+
+// custom
+
+CDebug::ScreenStr CDebug::ms_aScreenStrs[MAX_SCREEN_STRS];
+int CDebug::ms_nScreenStrs;
+
+void
+CDebug::DisplayScreenStrings()
+{
+ int i;
+
+
+ CFont::SetPropOn();
+ CFont::SetBackgroundOff();
+ CFont::SetScale(1.0f, 1.0f);
+ CFont::SetCentreOff();
+ CFont::SetRightJustifyOff();
+ CFont::SetJustifyOff();
+ CFont::SetRightJustifyWrap(0.0f);
+ CFont::SetWrapx(9999.0f);
+ CFont::SetBackGroundOnlyTextOff();
+ CFont::SetFontStyle(FONT_BANK);
+
+ for(i = 0; i < ms_nScreenStrs; i++){
+ AsciiToUnicode(ms_aScreenStrs[i].str, gUString);
+ CFont::SetColor(CRGBA(0, 0, 0, 255));
+ CFont::PrintString(ms_aScreenStrs[i].x, ms_aScreenStrs[i].y, gUString);
+ CFont::SetColor(CRGBA(255, 255, 255, 255));
+ CFont::PrintString(ms_aScreenStrs[i].x+1, ms_aScreenStrs[i].y+1, gUString);
+ }
+ CFont::DrawFonts();
+
+ ms_nScreenStrs = 0;
+}
+
+void
+CDebug::PrintAt(const char *str, int x, int y)
+{
+ if(ms_nScreenStrs >= MAX_SCREEN_STRS)
+ return;
+ strncpy(ms_aScreenStrs[ms_nScreenStrs].str, str, 256);
+ ms_aScreenStrs[ms_nScreenStrs].x = x*12;
+ ms_aScreenStrs[ms_nScreenStrs].y = y*22;
+ ms_nScreenStrs++;
+}