summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-13 10:26:11 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-13 10:26:11 +0000
commitacf69fd277e17c6bdf001551697d7321f84909df (patch)
tree6f0468ec702d573fecabca0184d2cc2eec4d52f5
parent39d944df9a84882925e587e2d0c39759ea129c8b (diff)
downloadmana-acf69fd277e17c6bdf001551697d7321f84909df.tar.gz
mana-acf69fd277e17c6bdf001551697d7321f84909df.tar.bz2
mana-acf69fd277e17c6bdf001551697d7321f84909df.tar.xz
mana-acf69fd277e17c6bdf001551697d7321f84909df.zip
Use gcn::Font instead of gcn::ImageFont as pointer type.
-rw-r--r--ChangeLog6
-rw-r--r--src/engine.cpp10
-rw-r--r--src/gui/browserbox.cpp2
-rw-r--r--src/gui/gui.cpp8
-rw-r--r--src/gui/gui.h12
5 files changed, 25 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ef046dfc..979977a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp, src/gui/browserbox.cpp, src/gui/gui.cpp,
+ src/gui/gui.h: Use gcn::Font instead of gcn::ImageFont where the
+ former is sufficient.
+
2005-10-10 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/being.cpp, src/being.h, src/game.cpp: Always compile with debug
diff --git a/src/engine.cpp b/src/engine.cpp
index ef5d8a7a..9b26f08d 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -26,9 +26,9 @@
#include <list>
#include <sstream>
-#include <guichan/imagefont.hpp>
-
+#ifdef DEBUG
#include <guichan/widgets/label.hpp>
+#endif
#include "being.h"
#include "floor_item.h"
@@ -60,7 +60,9 @@ extern int frame;
char itemCurrenyQ[10] = "0";
int camera_x, camera_y;
+#ifdef DEBUG
gcn::Label *debugInfo;
+#endif
std::map<int, Spriteset*> monsterset;
@@ -76,10 +78,12 @@ Engine::Engine():
mCurrentMap(NULL)
{
// Initializes GUI
+#ifdef DEBUG
debugInfo = new gcn::Label();
// Oh, come on guichan folks, how useful is it to have a single widget gui?
// (Well, the BasicContainer interface isn't that much more useful... ;)
dynamic_cast<WindowContainer*>(gui->getTop())->add(debugInfo);
+#endif
// Load the sprite sets
ResourceManager *resman = ResourceManager::getInstance();
@@ -128,7 +132,9 @@ Engine::~Engine()
attackTarget->decRef();
delete itemDb;
+#ifdef DEBUG
delete debugInfo;
+#endif
}
Map *Engine::getCurrentMap()
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index a4d418e0..d89c3d86 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -62,7 +62,7 @@ BrowserBox::BrowserBox(unsigned int mode):
} else
#endif
{
- browserFont = gui->getFont();
+ browserFont = (gcn::ImageFont*)gui->getFont();
}
}
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 60a1e0da..bf35e3ec 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -60,11 +60,11 @@ Gui *gui;
gcn::SDLInput *guiInput; // GUI input
// Fonts used in showing hits
-gcn::ImageFont *hitRedFont;
-gcn::ImageFont *hitBlueFont;
-gcn::ImageFont *hitYellowFont;
+gcn::Font *hitRedFont;
+gcn::Font *hitBlueFont;
+gcn::Font *hitYellowFont;
// Font used to display speech and player names
-gcn::ImageFont *speechFont;
+gcn::Font *speechFont;
class GuiConfigListener : public ConfigListener
{
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 1c1d5f8c..238ee38e 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -82,7 +82,7 @@ class Gui : public gcn::Gui, public gcn::MouseListener
/**
* Return game font
*/
- gcn::ImageFont*
+ gcn::Font*
getFont() { return mGuiFont; }
/**
@@ -101,7 +101,7 @@ class Gui : public gcn::Gui, public gcn::MouseListener
GuiConfigListener *mConfigListener;
gcn::ImageLoader *mHostImageLoader; /**< For loading images in GL */
gcn::ImageLoader *mImageLoader; /**< For loading images */
- gcn::ImageFont *mGuiFont; /**< The global GUI font */
+ gcn::Font *mGuiFont; /**< The global GUI font */
Image *mMouseCursor; /**< Mouse cursor image */
bool mCustomCursor; /**< Show custom cursor */
};
@@ -112,12 +112,12 @@ extern gcn::SDLInput *guiInput; /**< GUI input */
/**
* Fonts used in showing hits
*/
-extern gcn::ImageFont *hitRedFont;
-extern gcn::ImageFont *hitBlueFont;
-extern gcn::ImageFont *hitYellowFont;
+extern gcn::Font *hitRedFont;
+extern gcn::Font *hitBlueFont;
+extern gcn::Font *hitYellowFont;
/**
* Font used to display speech and player names
*/
-extern gcn::ImageFont *speechFont;
+extern gcn::Font *speechFont;
#endif