/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2008.04.29 * ³» ¿ë : * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include #include class cEngineFile; #define BMP_HEADER_XOR_KEY 0x1318 #define BMP_FILE_HEADER_SIZE 14 /// BMP FILE Çì´õ»çÀÌÁî #define BMP_INFO_HEADER_SIZE 40 /// BMP INFO Çì´õ»çÀÌÁî #define BMP_HEADER_TOTAL_SIZE 54 /// ÃÑ Çì´õ»çÀÌÁî( BMP FILE Çì´õ»çÀÌÁî + BMP INFO Çì´õ»çÀÌÁî ) /// TGA ÆÄÀÏ ¸®´õ class cTGAReader : public NiTGAReader { public: NiPixelData* ReadFile( cEngineFile& file, NiPixelData* optDest ); protected: void LoadRLERow( cEngineFile& file, unsigned char *dest, unsigned int destSize ); void GetColormap( cEngineFile& file ); bool ReadHeader( cEngineFile& file, unsigned int& width, unsigned int& height, NiPixelFormat& pixelFormat, bool& mipmap, unsigned int& faces ); }; /// DDS ÆÄÀÏ ¸®´õ class cDDSReader : public NiDDSReader { public: cDDSReader(); ~cDDSReader(); NiPixelData* ReadFile( cEngineFile& file, NiPixelData* optDest ); protected: bool ReadHeader( cEngineFile& file, unsigned int& uiWidth, unsigned int& uiHeight, NiPixelFormat& kFormat, bool& bMipmap, unsigned int& uiFaces ); static void Read24Bit( cEngineFile& file, NiPixelData* pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx ); static void Read32Bit( cEngineFile& file, NiPixelData* pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx ); static void Read16Bit( cEngineFile& file, NiPixelData* pkDest, NiPixelFormat kSrcFmt, NiPixelFormat kDestFmt, unsigned int uiMipMapIdx, unsigned int uiFaceIdx ); }; /// BMP ÆÄÀÏ ¸®´õ [4/16/2009 Jo] class cBMPReader : public NiBMPReader { public: NiPixelData* ReadFile( cEngineFile& file, NiPixelData* optDest, bool IsXorHeader = false ); protected: bool ReadHeader(cEngineFile& file, unsigned int& uiWidth, unsigned int& uiHeight, NiPixelFormat& kFormat, bool& bMipmap, unsigned int& uiFaces, bool IsXorHeader = false ); };