47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
#ifndef _GIF_GIFDECODER_HPP_
|
|
#define _GIF_GIFDECODER_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _LZWDECOMPRESSION_HPP_
|
|
#include <gif/lzw.hpp>
|
|
#endif
|
|
|
|
#ifdef _EXPAND_GIFDECODER_TEMPLATES_
|
|
#pragma option -Jgd
|
|
#endif
|
|
|
|
class GIFDecoder : public LZWDecompression
|
|
{
|
|
public:
|
|
GIFDecoder(void);
|
|
virtual ~GIFDecoder();
|
|
WORD unpackImage(const char *pathFileName);
|
|
virtual void paletteHandler(const UCHAR FAR *lpPaletteData,USHORT numColors);
|
|
virtual void attributeHandler(USHORT imageWide,USHORT imageDeep,USHORT pixelSize);
|
|
virtual void backgroundHandler(USHORT backgroundColor);
|
|
virtual void imageHandler(void);
|
|
virtual void showHandler(USHORT imageWide,USHORT imageDeep,const UCHAR FAR *lpRowData,USHORT yLocation);
|
|
virtual void errorHandler(const char FAR *message);
|
|
private:
|
|
void showHandler(UCHAR FAR *lpOutRow,USHORT yLocation);
|
|
WORD processImage(void);
|
|
WORD readPaletteData(void);
|
|
|
|
HGLOBAL mhGlobalPalette;
|
|
UCHAR FAR *mlpPaletteData;
|
|
USHORT mScreenWidth;
|
|
USHORT mScreenHeight;
|
|
UCHAR mGlobalFlagByte;
|
|
USHORT mColors;
|
|
USHORT mBackgroundColor;
|
|
USHORT mImageStartLeft;
|
|
USHORT mImageStartTop;
|
|
USHORT mImageWide;
|
|
USHORT mImageDeep;
|
|
USHORT mIsInterlaced;
|
|
USHORT mBufferCount;
|
|
USHORT mPixelSize;
|
|
};
|
|
#endif
|