diff options
| author | oy <Tom_Adams@web.de> | 2010-08-18 00:06:00 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-18 00:06:00 +0200 |
| commit | cabecb7fa937b5e4efa859ea62722468f91a5089 (patch) | |
| tree | d9da92814dd049dfef7bdcfa9069955504341b8c /src/game/editor/ed_editor.cpp | |
| parent | 16f201794de61e237b4a7644d28f043dc1b987bb (diff) | |
| download | zcatch-cabecb7fa937b5e4efa859ea62722468f91a5089.tar.gz zcatch-cabecb7fa937b5e4efa859ea62722468f91a5089.zip | |
added output level for console print function, categorised the debug messages and merged them into the new functionality. Closes #8
Diffstat (limited to 'src/game/editor/ed_editor.cpp')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 <engine/shared/config.h> #include <engine/shared/engine.h> #include <engine/client.h> +#include <engine/console.h> #include <engine/graphics.h> #include <engine/textrender.h> #include <engine/input.h> @@ -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<IInput>(); m_pClient = Kernel()->RequestInterface<IClient>(); + m_pConsole = Kernel()->RequestInterface<IConsole>(); m_pGraphics = Kernel()->RequestInterface<IGraphics>(); m_pTextRender = Kernel()->RequestInterface<ITextRender>(); m_RenderTools.m_pGraphics = m_pGraphics; |