Embedded nogame screen into binary and exposed version info.

This commit is contained in:
rude
2009-08-15 12:48:32 +02:00
parent 576a5b0903
commit 579f9c75db
18 changed files with 1498 additions and 101 deletions
+13 -7
View File
@@ -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)
{