summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/buddylist.h5
-rw-r--r--src/resources/image.cpp8
-rw-r--r--src/resources/image.h3
-rw-r--r--src/resources/itemmanager.cpp12
-rw-r--r--src/resources/itemmanager.h3
-rw-r--r--src/resources/mapreader.cpp13
-rw-r--r--src/resources/mapreader.h9
-rw-r--r--src/resources/music.h4
-rw-r--r--src/resources/resource.cpp4
-rw-r--r--src/resources/resourcemanager.cpp18
-rw-r--r--src/resources/resourcemanager.h11
-rw-r--r--src/resources/soundeffect.h4
12 files changed, 53 insertions, 41 deletions
diff --git a/src/resources/buddylist.h b/src/resources/buddylist.h
index 5f082ba7..33c85723 100644
--- a/src/resources/buddylist.h
+++ b/src/resources/buddylist.h
@@ -24,9 +24,10 @@
#ifndef _TMW_BUDDYLIST_H
#define _TMW_BUDDYLIST_H
-#include <guichan.hpp>
+#include <iosfwd>
#include <list>
-#include <string>
+
+#include <guichan/listmodel.hpp>
class BuddyList : public gcn::ListModel {
public:
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 38ed994b..9dafc64c 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -21,12 +21,14 @@
* $Id$
*/
-#include "../main.h"
-#include "../log.h"
#include "image.h"
-#include <iostream>
+
#include <SDL_image.h>
+#include "../log.h"
+#include "../main.h"
+
+
Image::Image(SDL_Surface *image):
image(image)
{
diff --git a/src/resources/image.h b/src/resources/image.h
index a12572bb..7d1fe3c4 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -24,12 +24,13 @@
#ifndef _TMW_IMAGE_H
#define _TMW_IMAGE_H
-#include "resource.h"
#include <SDL.h>
#ifdef USE_OPENGL
#include <SDL_opengl.h>
#endif
+#include "resource.h"
+
/**
* Defines a class for loading and storing images.
*/
diff --git a/src/resources/itemmanager.cpp b/src/resources/itemmanager.cpp
index f5abb5cb..ef2d573b 100644
--- a/src/resources/itemmanager.cpp
+++ b/src/resources/itemmanager.cpp
@@ -20,16 +20,17 @@
*
* $Id$
*/
-
-#include <guichan.hpp>
-
-#include <libxml/tree.h>
-#include <iostream>
#include "itemmanager.h"
+
+#include <libxml/tree.h>
+
#include "resourcemanager.h"
+
#include "../log.h"
+#include "resources/iteminfo.h"
+
// MSVC libxml2 at the moment doesn't work right when using MinGW, missing this
// function at link time.
#ifdef WIN32
@@ -37,6 +38,7 @@
#define xmlFree(x) ;
#endif
+
ItemManager::ItemManager()
{
ResourceManager *resman = ResourceManager::getInstance();
diff --git a/src/resources/itemmanager.h b/src/resources/itemmanager.h
index 7cc26a25..ed4889a6 100644
--- a/src/resources/itemmanager.h
+++ b/src/resources/itemmanager.h
@@ -24,10 +24,9 @@
#ifndef _TMW_ITEM_MANAGER_H
#define _TMW_ITEM_MANAGER_H
-#include <string>
#include <map>
-#include "iteminfo.h"
+class ItemInfo;
/**
* Defines a class to load items database.
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 5d15fd08..2b8c7ab6 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -21,16 +21,19 @@
* $Id$
*/
-#include "../log.h"
#include "mapreader.h"
+
+#include <cassert>
+#include <zlib.h>
+
#include "resourcemanager.h"
-#include "../graphic/spriteset.h"
+
#include "../base64.h"
+#include "../log.h"
+#include "../map.h"
-#include <cassert>
+#include "../graphic/spriteset.h"
-#include <zlib.h>
-#include <iostream>
const unsigned int DEFAULT_TILE_WIDTH = 32;
const unsigned int DEFAULT_TILE_HEIGHT = 32;
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h
index be38afeb..f37a67c3 100644
--- a/src/resources/mapreader.h
+++ b/src/resources/mapreader.h
@@ -24,11 +24,14 @@
#ifndef _INCLUDED_MAPREADER_H
#define _INCLUDED_MAPREADER_H
-#include "../map.h"
-#include "../graphic/spriteset.h"
-#include <libxml/tree.h>
#include <vector>
+#include <libxml/tree.h>
+
+#include "../graphic/spriteset.h"
+
+class Map;
+
/**
* A tileset, which is basically just a spriteset but it stores a firstgid.
*/
diff --git a/src/resources/music.h b/src/resources/music.h
index 68f285e4..b8d493e2 100644
--- a/src/resources/music.h
+++ b/src/resources/music.h
@@ -24,10 +24,10 @@
#ifndef _TMW_MUSIC_H
#define _TMW_MUSIC_H
-#include "resource.h"
-#include <SDL.h>
#include <SDL_mixer.h>
+#include "resource.h"
+
/**
* Defines a class for loading and storing music.
*/
diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp
index 30e93f76..e13ec359 100644
--- a/src/resources/resource.cpp
+++ b/src/resources/resource.cpp
@@ -22,10 +22,12 @@
*/
#include "resource.h"
-#include "resourcemanager.h"
#include <cassert>
+#include "resourcemanager.h"
+
+
Resource::Resource():
mRefCount(0)
{
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index d185b99a..8f26cf5c 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -21,25 +21,23 @@
* $Id$
*/
-#include <guichan.hpp>
-#include "../main.h"
#include "resourcemanager.h"
-#include "../log.h"
-#include "../configuration.h"
-#include <iostream>
-#include <sstream>
-#include <physfs.h>
#include <cassert>
+#include <physfs.h>
#ifdef WIN32
#include <io.h>
#include <direct.h>
-#else
-#include <unistd.h>
-#include <dirent.h>
#endif
+#include "image.h"
+#include "music.h"
+#include "soundeffect.h"
+
+#include "../log.h"
+
+
ResourceManager *ResourceManager::instance = NULL;
ResourceManager::ResourceManager()
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index fa7d9610..a5a01987 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -24,13 +24,14 @@
#ifndef _TMW_RESOURCE_MANAGER_H
#define _TMW_RESOURCE_MANAGER_H
+#include <iosfwd>
#include <map>
-#include <string>
#include <vector>
-#include "resource.h"
-#include "image.h"
-#include "music.h"
-#include "soundeffect.h"
+
+class Resource;
+class Image;
+class Music;
+class SoundEffect;
/**
* A class for loading and managing resources.
diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h
index 2e56df9b..69d9823d 100644
--- a/src/resources/soundeffect.h
+++ b/src/resources/soundeffect.h
@@ -24,10 +24,10 @@
#ifndef _TMW_SOUND_EFFECT_H
#define _TMW_SOUND_EFFECT_H
-#include "resource.h"
-#include <SDL.h>
#include <SDL_mixer.h>
+#include "resource.h"
+
/**
* Defines a class for loading and storing sound effects.
*/