diff options
author | aap <aap@papnet.eu> | 2020-03-26 14:16:06 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-03-27 10:04:45 +0100 |
commit | f0dfaac838fdbb90783609bf4e45518ccf853708 (patch) | |
tree | 0091bdfdf4a7149265af7a596906a9cf4f50a55c /src/core/Debug.cpp | |
parent | Merge pull request #353 from Sergeanur/Debug (diff) | |
download | re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar.gz re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar.bz2 re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar.lz re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar.xz re3-f0dfaac838fdbb90783609bf4e45518ccf853708.tar.zst re3-f0dfaac838fdbb90783609bf4e45518ccf853708.zip |
Diffstat (limited to 'src/core/Debug.cpp')
-rw-r--r-- | src/core/Debug.cpp | 46 |
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++; +} |