2009-12-29 23:18:24 +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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
2010-01-04 08:10:29 +00:00
|
|
|
|
2011-01-23 17:37:17 +00:00
|
|
|
#ifndef VIDEO_CODECS_SMC_H
|
|
|
|
#define VIDEO_CODECS_SMC_H
|
2009-12-29 23:18:24 +00:00
|
|
|
|
2011-01-23 17:37:17 +00:00
|
|
|
#include "video/codecs/codec.h"
|
2010-01-04 08:10:29 +00:00
|
|
|
|
2010-05-23 18:33:55 +00:00
|
|
|
namespace Graphics {
|
2009-12-29 23:18:24 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
CPAIR = 2,
|
|
|
|
CQUAD = 4,
|
|
|
|
COCTET = 8,
|
|
|
|
COLORS_PER_TABLE = 256
|
|
|
|
};
|
2010-01-04 08:10:29 +00:00
|
|
|
|
2010-05-23 18:33:55 +00:00
|
|
|
class SMCDecoder : public Codec {
|
2009-12-29 23:18:24 +00:00
|
|
|
public:
|
|
|
|
SMCDecoder(uint16 width, uint16 height);
|
2011-01-02 14:57:49 +00:00
|
|
|
~SMCDecoder();
|
2009-12-29 23:18:24 +00:00
|
|
|
|
2010-12-16 02:02:53 +00:00
|
|
|
const Surface *decodeImage(Common::SeekableReadStream *stream);
|
2010-05-23 18:33:55 +00:00
|
|
|
PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
|
2009-12-29 23:18:24 +00:00
|
|
|
|
2010-01-25 01:39:44 +00:00
|
|
|
private:
|
2010-05-23 18:33:55 +00:00
|
|
|
Surface *_surface;
|
2009-12-29 23:18:24 +00:00
|
|
|
|
|
|
|
// SMC color tables
|
|
|
|
byte _colorPairs[COLORS_PER_TABLE * CPAIR];
|
|
|
|
byte _colorQuads[COLORS_PER_TABLE * CQUAD];
|
|
|
|
byte _colorOctets[COLORS_PER_TABLE * COCTET];
|
|
|
|
};
|
|
|
|
|
2010-05-23 18:33:55 +00:00
|
|
|
} // End of namespace Graphics
|
2009-12-29 23:18:24 +00:00
|
|
|
|
|
|
|
#endif
|