Fixing compile time enabler guards for the image loaders. Bug, i.e. missing parts, found by hendu.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4304 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2012-08-24 20:17:27 +00:00
parent 4e1426e465
commit 3bd9de3070
7 changed files with 20 additions and 16 deletions

View File

@ -709,3 +709,4 @@ IImageLoader* createImageLoaderDDS()
} // end namespace irr
#endif

View File

@ -7,6 +7,8 @@
#include "IrrCompileConfig.h"
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_)
#include "IImageLoader.h"
namespace irr
@ -14,8 +16,6 @@ namespace irr
namespace video
{
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_)
/* dependencies */
/* dds definition */
enum eDDSPixelFormat
@ -269,10 +269,6 @@ floatSwapUnion;
#endif /*__BIG_ENDIAN__*/
#endif // compiled with loader or reader
#ifdef _IRR_COMPILE_WITH_DDS_LOADER_
/*!
Surface Loader for DDS images
*/
@ -289,15 +285,12 @@ public:
//! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const;
private:
};
#endif // compiled with DDS loader
} // end namespace video
} // end namespace irr
#endif // compiled with DDS loader
#endif

View File

@ -277,7 +277,6 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
}
IImageLoader* createImageLoaderPNG()
{
return new CImageLoaderPng();

View File

@ -651,3 +651,4 @@ IImageLoader* createImageLoaderRGB()
} // end namespace irr
#endif

View File

@ -162,3 +162,4 @@ private:
#endif // _IRR_COMPILE_WITH_RGB_LOADER_
#endif // __C_IMAGE_LOADER_RGB_H_INCLUDED__

View File

@ -4,6 +4,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CImageLoaderWAL.h"
#ifdef _IRR_COMPILE_WITH_WAL_LOADER_
#include "CColorConverter.h"
#include "CImage.h"
#include "os.h"
@ -425,7 +428,6 @@ IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const
}
IImageLoader* createImageLoaderHalfLife()
{
return new irr::video::CImageLoaderWAL2();
@ -441,7 +443,8 @@ IImageLoader* createImageLoaderLMP()
return new irr::video::CImageLoaderLMP();
}
}
}
} // end namespace video
} // end namespace irr
#endif

View File

@ -11,6 +11,10 @@
#ifndef __C_IMAGE_LOADER_WAL_H_INCLUDED__
#define __C_IMAGE_LOADER_WAL_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_WAL_LOADER_
#include "IImageLoader.h"
namespace irr
@ -36,7 +40,7 @@ public:
virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const;
};
//! An Irrlicht image loader for Halife 1 engine textures
//! An Irrlicht image loader for Halflife 1 engine textures
class CImageLoaderWAL2 : public irr::video::IImageLoader
{
public:
@ -73,7 +77,7 @@ public:
s32 flags;
s32 contents;
s32 value;
};
} PACK_STRUCT;
// Default alignment
#include "irrunpack.h"
@ -82,3 +86,5 @@ public:
}
#endif
#endif