about summary refs log tree commit diff
path: root/src/engine/client/graphics.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-08-18 00:06:00 +0200
committeroy <Tom_Adams@web.de>2010-08-18 00:06:00 +0200
commitcabecb7fa937b5e4efa859ea62722468f91a5089 (patch)
treed9da92814dd049dfef7bdcfa9069955504341b8c /src/engine/client/graphics.cpp
parent16f201794de61e237b4a7644d28f043dc1b987bb (diff)
downloadzcatch-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/engine/client/graphics.cpp')
-rw-r--r--src/engine/client/graphics.cpp6
1 files changed, 5 insertions, 1 deletions
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 <engine/graphics.h>
 #include <engine/storage.h>
 #include <engine/keys.h>
+#include <engine/console.h>
 
 #include <math.h>
 #include <time.h>
@@ -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<IStorage>();
+	m_pConsole = Kernel()->RequestInterface<IConsole>();
 	
 	// Set all z to -5.0f
 	for(int i = 0; i < MAX_VERTICES; i++)