#include <SDL_image.h>
#include "gameconfig.h"
+#include "physfs/physfs_sdl.h"
#include "video/surface.h"
#include "video/screen.h"
SDL_Surface * temp;
SDL_Surface * conv;
- temp = IMG_Load(file.c_str());
+ temp = IMG_Load_RW(get_physfs_SDLRWops(file), true);
if (temp == 0) {
std::stringstream msg;
msg << "Couldn't load '" << file << "': " << SDL_GetError();
SDL_Surface* sdl_surface;
SDL_Surface* temp;
- temp = IMG_Load(file.c_str());
+ temp = IMG_Load_RW(get_physfs_SDLRWops(file), true);
if (temp == 0) {
std::stringstream msg;
msg << "Couldn't load file '" << file << "': " << SDL_GetError();
// is present store in RGB instead of RGBA, this saves a few bytes
// of memory, but much more importantly it makes the game look
// *much* better in 16bit color mode
- int internal_format = GL_RGB10_A2;
+ int internal_format = GL_RGBA;
bool has_alpha = false;
unsigned char* buf = static_cast<unsigned char*>(conv->pixels);