mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Embedded nogame screen into binary and exposed version info.
This commit is contained in:
@@ -29,11 +29,8 @@ namespace image
|
||||
{
|
||||
namespace devil
|
||||
{
|
||||
ImageData::ImageData(filesystem::File * file)
|
||||
void ImageData::load(Data * data)
|
||||
{
|
||||
// Read the data.
|
||||
Data * data = file->read();
|
||||
|
||||
// Generate DevIL image.
|
||||
ilGenImages(1, &image);
|
||||
|
||||
@@ -43,9 +40,6 @@ namespace devil
|
||||
// Try to load the image.
|
||||
ILboolean success = ilLoadL(IL_TYPE_UNKNOWN, (void*)data->getData(), data->getSize());
|
||||
|
||||
// Free local image data.
|
||||
data->release();
|
||||
|
||||
// Check for errors
|
||||
if(!success)
|
||||
{
|
||||
@@ -70,6 +64,18 @@ namespace devil
|
||||
}
|
||||
}
|
||||
|
||||
ImageData::ImageData(Data * data)
|
||||
{
|
||||
load(data);
|
||||
}
|
||||
|
||||
ImageData::ImageData(filesystem::File * file)
|
||||
{
|
||||
Data * data = file->read();
|
||||
load(data);
|
||||
data->release();
|
||||
}
|
||||
|
||||
ImageData::ImageData(int width, int height)
|
||||
: width(width), height(height), origin(IL_ORIGIN_UPPER_LEFT), bpp(4)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user