diff options
-rw-r--r-- | The Mana World.dev | 4 | ||||
-rw-r--r-- | src/resources/image.cpp | 4 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 19 |
3 files changed, 5 insertions, 22 deletions
diff --git a/The Mana World.dev b/The Mana World.dev index 2c93e5e6..9c7bb352 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -11,7 +11,7 @@ PrivateResource=The_Mana_World_private.rc ResourceIncludes= MakeIncludes= Compiler= -CppCompiler=-funroll-loops_@@_-ffast-math_@@_-fomit-frame-pointer_@@_-pipe_@@_ +CppCompiler=-funroll-loops_@@_-ffast-math_@@_-fomit-frame-pointer_@@_-pipe_@@_-D__DEBUG_@@_ Linker=-lguichan_@@_-lguichan_allegro_@@_-lalleg_@@_-lwsock32_@@_-lSDL_mixer_@@_-lSDL_@@_ IsCpp=1 Icon=The Mana World.ico @@ -33,7 +33,7 @@ CompilerSettings=0010001001001000001101 Major=0 Minor=0 Release=8 -Build=818 +Build=833 LanguageID=1033 CharsetID=1252 CompanyName=The Mana World Development Team diff --git a/src/resources/image.cpp b/src/resources/image.cpp index b7739351..c786c784 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -37,9 +37,11 @@ Image::~Image() Image* Image::load(const std::string &filePath) { +#ifdef __DEBUG + std::cout << "Image::load(" << filePath << ")\n"; +#endif // Attempt to use SDL_Image to load the file. //image = IMG_Load(filePath.c_str()); - std::cout << "Attempting to load image from " << filePath << std::endl; BITMAP *image = load_bitmap(filePath.c_str(), NULL); // Check if the file was opened and return the appropriate value. diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 838dcd6b..94dc3e9d 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -93,26 +93,7 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type, // Set the filePath variable to the appropriate value // this is only if we're not using a packed file. -#ifdef WIN32 - // Flip all of the idPath '/' to '\' - unsigned int begPos = 0; - unsigned int endPos = idPath.find("/"); - std::stringstream result; - - // Loop through and replace all the characters. - while (endPos != std::string::npos) { - result << idPath.substr(begPos, endPos - begPos); - result << "\\"; - - begPos = endPos + 1; - endPos = (unsigned int)idPath.find("/"); - } - - filePath = std::string(programPath) + std::string("\\data\\") + - std::string(result.str()); -#else filePath = std::string(programPath) + std::string("/data/") + idPath; -#endif Resource *resource = NULL; |