X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fdevil%2Fdevilloader.cpp;h=423b108a5bf6ad13d960099c03070cfe2e30b96b;hb=2ebdf45974a0a7649b3488f9da4b8cf90a1db584;hp=131b6ba1dcfbcebbf1bda7d4e50589dd42ca6033;hpb=7f7f3c7494fe10a91215eaff208465636e9979ab;p=libs%2Fgui.git diff --git a/source/graphics/devil/devilloader.cpp b/source/graphics/devil/devilloader.cpp index 131b6ba..423b108 100644 --- a/source/graphics/devil/devilloader.cpp +++ b/source/graphics/devil/devilloader.cpp @@ -74,8 +74,6 @@ std::string error_string(ILenum err) namespace Msp { namespace Graphics { -ImageLoader::Register DevilLoader::reg; - DevilLoader::DevilLoader(IO::Seekable &i): io(i) { @@ -103,7 +101,7 @@ bool DevilLoader::detect(const string &sig) return type!=IL_TYPE_UNKNOWN; } -void DevilLoader::load(Image::Data &data) +void DevilLoader::load_(Image::Data &data) { ilSetRead(0, 0, eof, get, read, seek, tell); ilBindImage(id); @@ -128,9 +126,9 @@ void DevilLoader::load(Image::Data &data) data.height = ilGetInteger(IL_IMAGE_HEIGHT); data.stride = data.width*ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL); unsigned data_size = data.stride*data.height; - data.data = new char[data_size]; + data.pixels = new char[data_size]; ILubyte *il_data = ilGetData(); - copy(il_data, il_data+data_size, data.data); + copy(il_data, il_data+data_size, data.pixels); ilBindImage(0); ilResetRead();