From cabecb7fa937b5e4efa859ea62722468f91a5089 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 18 Aug 2010 00:06:00 +0200 Subject: added output level for console print function, categorised the debug messages and merged them into the new functionality. Closes #8 --- src/game/editor/ed_editor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/game/editor/ed_editor.cpp') diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index a2ecfb7e..aa6b7829 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -1271,7 +1272,9 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar) if(!UI()->MouseButton(0)) { // grab brush - dbg_msg("editor", "grabbing %f %f %f %f", r.x, r.y, r.w, r.h); + char aBuf[256]; + str_format(aBuf, sizeof(aBuf),"grabbing %f %f %f %f", r.x, r.y, r.w, r.h); + Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "editor", aBuf); // TODO: do all layers int Grabs = 0; @@ -1820,7 +1823,7 @@ static void ExtractName(const char *pFileName, char *pName) int FinalLen = End-Start; mem_copy(pName, &pFileName[Start], FinalLen); pName[FinalLen] = 0; - dbg_msg("", "%s %s %d %d", pFileName, pName, Start, End); + //dbg_msg("", "%s %s %d %d", pFileName, pName, Start, End); } void CEditor::ReplaceImage(const char *pFileName, void *pUser) @@ -3006,6 +3009,7 @@ void CEditor::Init() { m_pInput = Kernel()->RequestInterface(); m_pClient = Kernel()->RequestInterface(); + m_pConsole = Kernel()->RequestInterface(); m_pGraphics = Kernel()->RequestInterface(); m_pTextRender = Kernel()->RequestInterface(); m_RenderTools.m_pGraphics = m_pGraphics; -- cgit 1.4.1