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_io.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_io.cpp')
| -rw-r--r-- | src/game/editor/ed_io.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp index 4d514051..6eae9fb5 100644 --- a/src/game/editor/ed_io.cpp +++ b/src/game/editor/ed_io.cpp @@ -1,3 +1,4 @@ +#include <engine/console.h> #include <engine/graphics.h> #include <engine/storage.h> #include <game/gamecore.h> @@ -197,11 +198,14 @@ int CEditor::Save(const char *pFilename) int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { - dbg_msg("editor", "saving to '%s'...", pFileName); + char aBuf[256]; + str_format(aBuf, sizeof(aBuf), "saving to '%s'...", pFileName); + m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "editor", aBuf); CDataFileWriter df; if(!df.Open(pStorage, pFileName)) { - dbg_msg("editor", "failed to open file '%s'...", pFileName); + str_format(aBuf, sizeof(aBuf), "failed to open file '%s'...", pFileName); + m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "editor", aBuf); return 0; } @@ -259,7 +263,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { if(pGroup->m_lLayers[l]->m_Type == LAYERTYPE_TILES) { - dbg_msg("editor", "saving tiles layer"); + m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "editor", "saving tiles layer"); CLayerTiles *pLayer = (CLayerTiles *)pGroup->m_lLayers[l]; pLayer->PrepareForSave(); @@ -288,7 +292,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) } else if(pGroup->m_lLayers[l]->m_Type == LAYERTYPE_QUADS) { - dbg_msg("editor", "saving quads layer"); + m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "editor", "saving quads layer"); CLayerQuads *pLayer = (CLayerQuads *)pGroup->m_lLayers[l]; if(pLayer->m_lQuads.size()) { @@ -346,7 +350,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) // finish the data file df.Finish(); - dbg_msg("editor", "done"); + m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "editor", "saving done"); // send rcon.. if we can /* |