diff options
author | Nipun Garg | 2019-07-15 12:11:02 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:20 +0200 |
commit | 26210cfce662880ca5daeeab1f203e86cbbbae63 (patch) | |
tree | 23cf83a128f44b57c69f7b8f828b27787aa408cf /engines/hdb/gfx.cpp | |
parent | fa7593d7d56af3ccf8a21656684e98f82ce5f4cb (diff) | |
download | scummvm-rg350-26210cfce662880ca5daeeab1f203e86cbbbae63.tar.gz scummvm-rg350-26210cfce662880ca5daeeab1f203e86cbbbae63.tar.bz2 scummvm-rg350-26210cfce662880ca5daeeab1f203e86cbbbae63.zip |
HDB: Add drawDebugInfo()
Diffstat (limited to 'engines/hdb/gfx.cpp')
-rw-r--r-- | engines/hdb/gfx.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 4ff2e9d0a4..56dc8fec7e 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -986,6 +986,32 @@ void Gfx::drawBonusStars() { } } +void Gfx::drawDebugInfo(Tile *_debugLogo, int fps) { + int x, y; + AIEntity *p; + char buff[64]; + + _debugLogo->drawMasked(kScreenWidth - 32, 0); + + // Draw FPS + setCursor(0, 0); + sprintf(buff, "FPS: %d", fps); + drawText(buff); + + // Draw Player Info + setCursor(0, 16); + g_hdb->_ai->getPlayerXY(&x, &y); + sprintf(buff, "Player X: %d, Y: %d", x / kTileWidth, y / kTileHeight); + drawText(buff); + + setCursor(0, 32); + p = g_hdb->_ai->getPlayer(); + if (p) { + sprintf(buff, "Player height level: %d", p->level); + drawText(buff); + } +} + Picture::Picture() : _width(0), _height(0), _name("") { _surface.create(_width, _height, g_hdb->_format); } |