summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-12 22:15:35 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-12 22:15:35 +0000
commit8a598e713f504c88402ff204907044c0d62c5f29 (patch)
tree073bce873520aa438a4cb1dd1e63e206b30200dd /src/gui
parentd174cc5811eb6450617ca500f9e5cd13f334374a (diff)
downloadmana-8a598e713f504c88402ff204907044c0d62c5f29.tar.gz
mana-8a598e713f504c88402ff204907044c0d62c5f29.tar.bz2
mana-8a598e713f504c88402ff204907044c0d62c5f29.tar.xz
mana-8a598e713f504c88402ff204907044c0d62c5f29.zip
Added SDLImageLoader class to make guichan support physfs.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/browserbox.cpp3
-rw-r--r--src/gui/gui.cpp23
2 files changed, 9 insertions, 17 deletions
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index 5a87fa5b..3c389881 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -54,8 +54,7 @@ BrowserBox::BrowserBox(unsigned int mode):
#ifdef USE_OPENGL
if (config.getValue("opengl", 0)) {
browserFont = new gcn::ImageFont(
- ResourceManager::getInstance()->getRealPath(
- "graphics/gui/browserfont.png"),
+ "graphics/gui/browserfont.png",
" abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
"89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`");
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 1c2b2063..3642b004 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -31,7 +31,6 @@
#include <guichan/opengl/openglimageloader.hpp>
#endif
-#include <guichan/sdl/sdlimageloader.hpp>
#include <guichan/sdl/sdlinput.hpp>
#include "focushandler.h"
@@ -52,6 +51,7 @@
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
+#include "../resources/sdlimageloader.h"
extern Being* autoTarget;
@@ -92,13 +92,13 @@ Gui::Gui(Graphics *graphics):
if (config.getValue("opengl", 0)) {
// Set image loader
- mHostImageLoader = new gcn::SDLImageLoader();
+ mHostImageLoader = new SDLImageLoader();
mImageLoader = new gcn::OpenGLImageLoader(mHostImageLoader);
} else
#endif
{
// Set image loader
- mImageLoader = new gcn::SDLImageLoader();
+ mImageLoader = new SDLImageLoader();
}
// Set input
@@ -120,12 +120,9 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
- ResourceManager *resman = ResourceManager::getInstance();
-
// Set global font
try {
- mGuiFont = new gcn::ImageFont(
- resman->getRealPath("graphics/gui/sansserif8.png"),
+ mGuiFont = new gcn::ImageFont("graphics/gui/sansserif8.png",
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ["
"\\]^_`abcdefghijklmnopqrstuvwxyz{|}~|"
);
@@ -137,8 +134,7 @@ Gui::Gui(Graphics *graphics):
// Set speech font
try {
- speechFont = new gcn::ImageFont(
- resman->getRealPath("graphics/gui/rpgfont_wider.png"),
+ speechFont = new gcn::ImageFont("graphics/gui/rpgfont_wider.png",
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@&\\"
);
@@ -152,14 +148,11 @@ Gui::Gui(Graphics *graphics):
// Load hits' colourful fonts
try {
- hitRedFont = new gcn::ImageFont(
- resman->getRealPath("graphics/gui/hits_red.png"),
+ hitRedFont = new gcn::ImageFont("graphics/gui/hits_red.png",
"0123456789");
- hitBlueFont = new gcn::ImageFont(
- resman->getRealPath("graphics/gui/hits_blue.png"),
+ hitBlueFont = new gcn::ImageFont("graphics/gui/hits_blue.png",
"0123456789");
- hitYellowFont = new gcn::ImageFont(
- resman->getRealPath("graphics/gui/hits_yellow.png"),
+ hitYellowFont = new gcn::ImageFont("graphics/gui/hits_yellow.png",
"mis");
}
catch (gcn::Exception e)