[Scummvm-cvs-logs] CVS: scummvm/sound/softsynth mt32.cpp,1.3,1.4

Max Horn fingolfin at users.sourceforge.net
Thu Jan 6 13:17:42 CET 2005


Update of /cvsroot/scummvm/scummvm/sound/softsynth
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14934/sound/softsynth

Modified Files:
	mt32.cpp 
Log Message:
Added a font manager (work in progress)

Index: mt32.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/softsynth/mt32.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mt32.cpp	1 Jan 2005 16:09:23 -0000	1.3
+++ mt32.cpp	6 Jan 2005 21:15:52 -0000	1.4
@@ -32,7 +32,7 @@
 #include "common/file.h"
 #include "common/config-manager.h"
 
-#include "graphics/font.h"
+#include "graphics/fontman.h"
 #include "graphics/surface.h"
 
 class MidiChannel_MT32 : public MidiChannel_MPU401 {
@@ -124,11 +124,12 @@
 }
 
 static void drawProgress(float progress) {
+	const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kOSDFont));
 	Graphics::Surface surf;
 	uint32 borderColor = 0x2;
 	uint32 fillColor = 0x4;
 	surf.w = g_system->getWidth() / 7 * 5;
-	surf.h = Graphics::g_scummfont.getFontHeight();
+	surf.h = font.getFontHeight();
 	int x = g_system->getWidth() / 7;
 	int y = g_system->getHeight() / 2 - surf.h / 2;
 	surf.pitch = surf.w;
@@ -145,7 +146,7 @@
 }
 
 static void drawMessage(int offset, const Common::String &text) {
-	const Graphics::Font &font(Graphics::g_scummfont);
+	const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kOSDFont));
 	Graphics::Surface surf;
 	uint32 color = 0x2;
 	surf.w = g_system->getWidth();





More information about the Scummvm-git-logs mailing list