summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 14:10:15 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 14:10:15 +0000
commit821732ebbc2760ec98e0097f38a962c67285d421 (patch)
tree2e4fbb5b22108bf6d71011541acb927e9f633a5e /src/resources/resourcemanager.cpp
parent6c5351a2cbe2655a6b255cb882ade9e6f988c0ea (diff)
downloadmana-client-821732ebbc2760ec98e0097f38a962c67285d421.tar.gz
mana-client-821732ebbc2760ec98e0097f38a962c67285d421.tar.bz2
mana-client-821732ebbc2760ec98e0097f38a962c67285d421.tar.xz
mana-client-821732ebbc2760ec98e0097f38a962c67285d421.zip
Allow preservation of alpha channel when loading image resources, which is used
to load alpha blended mouse cursor, which is now drawn instead of using the system cursor.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 0d936836..1a2c7a5f 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -21,9 +21,8 @@
* $Id$
*/
-#include "../log.h"
-#include "image.h"
#include "resourcemanager.h"
+#include "../log.h"
#include <iostream>
#include <sstream>
@@ -71,7 +70,7 @@ ResourceManager::~ResourceManager()
}
Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
- const std::string &idPath)
+ const std::string &idPath, int flags)
{
// Check if the id exists, and return the value if it does.
std::map<std::string, ResourceEntry>::iterator resIter =
@@ -108,7 +107,8 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
break;
case IMAGE:
// Attempt to create and load our image object.
- resource = reinterpret_cast<Resource*>(Image::load(filePath));
+ resource =
+ reinterpret_cast<Resource*>(Image::load(filePath, flags));
break;
case SCRIPT:
warning("Script resource not supported.");
@@ -139,9 +139,9 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type,
return resource;
}
-Image *ResourceManager::getImage(const std::string &idPath)
+Image *ResourceManager::getImage(const std::string &idPath, int flags)
{
- return (Image*)get(IMAGE, idPath);
+ return (Image*)get(IMAGE, idPath, flags);
}
ResourceManager* ResourceManager::getInstance()