summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-13 11:37:47 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-13 11:37:47 +0000
commitcd2c4f5861c89f0925a1a706e38535d6c11cc3a0 (patch)
tree232273a1d853305deea6e3101dd7ceef9fb76930 /src/resources
parenta03175439e5abaae8603a85be0db173daa543f6b (diff)
downloadmana-client-cd2c4f5861c89f0925a1a706e38535d6c11cc3a0.tar.gz
mana-client-cd2c4f5861c89f0925a1a706e38535d6c11cc3a0.tar.bz2
mana-client-cd2c4f5861c89f0925a1a706e38535d6c11cc3a0.tar.xz
mana-client-cd2c4f5861c89f0925a1a706e38535d6c11cc3a0.zip
Converted ChatBox into a proper ChatWindow in response to changes by Chetic.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp7
-rw-r--r--src/resources/image.h7
-rw-r--r--src/resources/resourcemanager.cpp2
-rw-r--r--src/resources/resourcemanager.h3
4 files changed, 7 insertions, 12 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index f985b759..f976466e 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -201,11 +201,8 @@ Image* Image::load(const std::string &filePath, int flags)
Image* Image::load(void* buffer, unsigned int bufferSize)
{
- // Define our RWops structure
- SDL_RWops* rw = NULL;
-
- // Load the raw file data from the buffer
- rw = SDL_RWFromMem(buffer, bufferSize);
+ // Load the raw file data from the buffer in an RWops structure
+ SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize);
// Use SDL_Image to load the raw image data
SDL_Surface* texture = IMG_Load_RW(rw, 1);
diff --git a/src/resources/image.h b/src/resources/image.h
index ebee50d3..a257678b 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -26,10 +26,8 @@
#include "resource.h"
#include <SDL.h>
-
-#ifdef USE_OPENGL
#include <SDL_opengl.h>
-#endif
+#include <string>
// This flag causes image alpha channel to be preserved, otherwise masking is
// used.
@@ -97,8 +95,9 @@ class Image : public Resource
/**
* Creates a new image with the desired clipping rectangle.
+ *
* @return <code>NULL</code> if creation failed and a valid
- * object otherwise.
+ * object otherwise.
*/
virtual Image* getSubImage(int x, int y, int width, int height);
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 12123c0a..eab6845e 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -119,7 +119,7 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
fileSize));
// Cleanup
- if(buffer != NULL) {
+ if (buffer != NULL) {
delete[] buffer;
}
}
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index ce28bc78..5c80b1a8 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -103,8 +103,7 @@ class ResourceManager
private:
/**
- * Searches for zip files and adds them to the PhsysicsFS search
- * path.
+ * Searches for zip files and adds them to the PhysicsFS search path.
*/
void searchAndAddZipFiles();