mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
QDENGINE: Added debug output for text rendering
This commit is contained in:
parent
c69b520163
commit
b668795f34
@ -45,6 +45,7 @@ static const DebugChannelDef debugFlagList[] = {
|
||||
{ QDEngine::kDebugTemp, "temp", "Enable temporary tracing" },
|
||||
{ QDEngine::kDebugQuant, "quant", "Enable quant tracing"},
|
||||
{ QDEngine::kDebugMinigames, "minigames", "Enable minigames tracing"},
|
||||
{ QDEngine::kDebugText, "text", "Enable text tracing"},
|
||||
DEBUG_CHANNEL_END
|
||||
};
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
#include "qdengine/qd_fwd.h"
|
||||
#include "qdengine/xmath.h"
|
||||
@ -164,6 +165,8 @@ void qdScreenText::redraw(const Vect2i &owner_pos) const {
|
||||
|
||||
const grFont *font = qdGameDispatcher::get_dispatcher()->find_font(_text_format.font_type());
|
||||
|
||||
debugC(1, kDebugText, "qdScreenText::redraw([%d, %d]): '%s'", x, y, transCyrillic(data()));
|
||||
|
||||
grDispatcher::instance()->drawAlignedText(x, y, _size.x, _size.y, col, data(), grTextAlign(_text_format.alignment()), 0, 0, font);
|
||||
if (g_engine->_debugDraw)
|
||||
grDispatcher::instance()->rectangle(x, y, _size.x, _size.y, col, 0, GR_OUTLINED);
|
||||
|
@ -55,7 +55,8 @@ enum QDEngineDebugChannels {
|
||||
kDebugTemp,
|
||||
kDebugQuant,
|
||||
kDebugMinigames,
|
||||
kDebugMovement
|
||||
kDebugMovement,
|
||||
kDebugText,
|
||||
};
|
||||
|
||||
class QDEngineEngine : public Engine {
|
||||
|
@ -901,6 +901,8 @@ bool grDispatcher::drawAlignedText(int x, int y, int sx, int sy, uint32 color, c
|
||||
if (!font || !font->alpha_buffer())
|
||||
return false;
|
||||
|
||||
debugC(4, kDebugText, "grDispatcher::drawAlignedText([%d, %d], [%d, %d], color: %d, '%s', align: %d, ...", x, y, sx, sy, color, transCyrillic(str), align);
|
||||
|
||||
const byte *str_buf = reinterpret_cast<const byte *>(str);
|
||||
|
||||
if (!sx)
|
||||
|
Loading…
Reference in New Issue
Block a user