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/engine/client/graphics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/engine/client/graphics.cpp') diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp index 09ee4784..1e9a79cf 100644 --- a/src/engine/client/graphics.cpp +++ b/src/engine/client/graphics.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -446,7 +447,9 @@ void CGraphics_OpenGL::ScreenshotDirect(const char *pFilename) io_close(File); // save png - dbg_msg("client", "saved screenshot to '%s'", aWholePath); + char aBuf[256]; + str_format(aBuf, sizeof(aBuf), "saved screenshot to '%s'", aWholePath); + m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aBuf); png_open_file_write(&Png, aWholePath); // ignore_convention png_set_data(&Png, w, h, 8, PNG_TRUECOLOR, (unsigned char *)pPixelData); // ignore_convention png_close_file(&Png); // ignore_convention @@ -663,6 +666,7 @@ void CGraphics_OpenGL::QuadsText(float x, float y, float Size, float r, float g, bool CGraphics_OpenGL::Init() { m_pStorage = Kernel()->RequestInterface(); + m_pConsole = Kernel()->RequestInterface(); // Set all z to -5.0f for(int i = 0; i < MAX_VERTICES; i++) -- cgit 1.4.1