2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2006-01-27 15:43:23 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2014-02-18 01:34:20 +00:00
|
|
|
*
|
2006-01-27 15:43:23 +00:00
|
|
|
*/
|
|
|
|
|
2012-04-08 12:58:42 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Image decoder used in engines:
|
|
|
|
* - hugo
|
|
|
|
* - mohawk
|
2012-10-23 19:48:27 +00:00
|
|
|
* - wintermute
|
2012-04-08 12:58:42 +00:00
|
|
|
*/
|
|
|
|
|
2014-02-28 02:27:23 +00:00
|
|
|
#ifndef IMAGE_BMP_H
|
|
|
|
#define IMAGE_BMP_H
|
2006-01-27 15:43:23 +00:00
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
#include "common/str.h"
|
2014-02-28 02:27:23 +00:00
|
|
|
#include "image/image_decoder.h"
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2014-02-28 02:27:23 +00:00
|
|
|
namespace Common {
|
2010-11-19 01:37:04 +00:00
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
|
|
|
|
2006-01-27 15:43:23 +00:00
|
|
|
namespace Graphics {
|
2010-11-19 01:37:04 +00:00
|
|
|
struct Surface;
|
2014-02-28 02:27:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Image {
|
2010-11-19 01:37:04 +00:00
|
|
|
|
2014-02-28 02:27:24 +00:00
|
|
|
class Codec;
|
|
|
|
|
2011-06-30 12:16:19 +00:00
|
|
|
class BitmapDecoder : public ImageDecoder {
|
2006-01-27 15:43:23 +00:00
|
|
|
public:
|
2011-06-30 12:16:19 +00:00
|
|
|
BitmapDecoder();
|
|
|
|
virtual ~BitmapDecoder();
|
|
|
|
|
|
|
|
// ImageDecoder API
|
|
|
|
void destroy();
|
|
|
|
virtual bool loadStream(Common::SeekableReadStream &stream);
|
2014-02-28 02:27:23 +00:00
|
|
|
virtual const Graphics::Surface *getSurface() const { return _surface; }
|
2012-04-22 15:41:30 +00:00
|
|
|
const byte *getPalette() const { return _palette; }
|
2012-05-14 04:49:10 +00:00
|
|
|
uint16 getPaletteColorCount() const { return _paletteColorCount; }
|
2011-06-30 12:16:19 +00:00
|
|
|
|
|
|
|
private:
|
2014-02-28 02:27:24 +00:00
|
|
|
Codec *_codec;
|
|
|
|
const Graphics::Surface *_surface;
|
2011-06-30 12:16:19 +00:00
|
|
|
byte *_palette;
|
2012-05-14 04:49:10 +00:00
|
|
|
uint16 _paletteColorCount;
|
2006-01-27 15:43:23 +00:00
|
|
|
};
|
2011-06-30 12:16:19 +00:00
|
|
|
|
2014-02-28 02:27:23 +00:00
|
|
|
} // End of namespace Image
|
2006-01-27 15:43:23 +00:00
|
|
|
|
|
|
|
#endif
|