Commit 3bd9de30 authored by hybrid's avatar hybrid

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
parent 4e1426e4
...@@ -709,3 +709,4 @@ IImageLoader* createImageLoaderDDS() ...@@ -709,3 +709,4 @@ IImageLoader* createImageLoaderDDS()
} // end namespace irr } // end namespace irr
#endif #endif
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_)
#include "IImageLoader.h" #include "IImageLoader.h"
namespace irr namespace irr
...@@ -14,8 +16,6 @@ namespace irr ...@@ -14,8 +16,6 @@ namespace irr
namespace video namespace video
{ {
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_)
/* dependencies */ /* dependencies */
/* dds definition */ /* dds definition */
enum eDDSPixelFormat enum eDDSPixelFormat
...@@ -269,10 +269,6 @@ floatSwapUnion; ...@@ -269,10 +269,6 @@ floatSwapUnion;
#endif /*__BIG_ENDIAN__*/ #endif /*__BIG_ENDIAN__*/
#endif // compiled with loader or reader
#ifdef _IRR_COMPILE_WITH_DDS_LOADER_
/*! /*!
Surface Loader for DDS images Surface Loader for DDS images
*/ */
...@@ -289,15 +285,12 @@ public: ...@@ -289,15 +285,12 @@ public:
//! creates a surface from the file //! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const; virtual IImage* loadImage(io::IReadFile* file) const;
private:
}; };
#endif // compiled with DDS loader
} // end namespace video } // end namespace video
} // end namespace irr } // end namespace irr
#endif // compiled with DDS loader
#endif #endif
...@@ -277,7 +277,6 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const ...@@ -277,7 +277,6 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
} }
IImageLoader* createImageLoaderPNG() IImageLoader* createImageLoaderPNG()
{ {
return new CImageLoaderPng(); return new CImageLoaderPng();
......
...@@ -651,3 +651,4 @@ IImageLoader* createImageLoaderRGB() ...@@ -651,3 +651,4 @@ IImageLoader* createImageLoaderRGB()
} // end namespace irr } // end namespace irr
#endif #endif
...@@ -162,3 +162,4 @@ private: ...@@ -162,3 +162,4 @@ private:
#endif // _IRR_COMPILE_WITH_RGB_LOADER_ #endif // _IRR_COMPILE_WITH_RGB_LOADER_
#endif // __C_IMAGE_LOADER_RGB_H_INCLUDED__ #endif // __C_IMAGE_LOADER_RGB_H_INCLUDED__
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CImageLoaderWAL.h" #include "CImageLoaderWAL.h"
#ifdef _IRR_COMPILE_WITH_WAL_LOADER_
#include "CColorConverter.h" #include "CColorConverter.h"
#include "CImage.h" #include "CImage.h"
#include "os.h" #include "os.h"
...@@ -425,7 +428,6 @@ IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const ...@@ -425,7 +428,6 @@ IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const
} }
IImageLoader* createImageLoaderHalfLife() IImageLoader* createImageLoaderHalfLife()
{ {
return new irr::video::CImageLoaderWAL2(); return new irr::video::CImageLoaderWAL2();
...@@ -441,7 +443,8 @@ IImageLoader* createImageLoaderLMP() ...@@ -441,7 +443,8 @@ IImageLoader* createImageLoaderLMP()
return new irr::video::CImageLoaderLMP(); return new irr::video::CImageLoaderLMP();
} }
} } // end namespace video
} } // end namespace irr
#endif
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
#ifndef __C_IMAGE_LOADER_WAL_H_INCLUDED__ #ifndef __C_IMAGE_LOADER_WAL_H_INCLUDED__
#define __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" #include "IImageLoader.h"
namespace irr namespace irr
...@@ -36,7 +40,7 @@ public: ...@@ -36,7 +40,7 @@ public:
virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; 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 class CImageLoaderWAL2 : public irr::video::IImageLoader
{ {
public: public:
...@@ -73,7 +77,7 @@ public: ...@@ -73,7 +77,7 @@ public:
s32 flags; s32 flags;
s32 contents; s32 contents;
s32 value; s32 value;
}; } PACK_STRUCT;
// Default alignment // Default alignment
#include "irrunpack.h" #include "irrunpack.h"
...@@ -82,3 +86,5 @@ public: ...@@ -82,3 +86,5 @@ public:
} }
#endif #endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment