1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef GLK_FROTZ_PICS_DECODER_H
24 #define GLK_FROTZ_PICS_DECODER_H
25 
26 #include "common/stream.h"
27 #include "common/array.h"
28 
29 namespace Glk {
30 namespace Frotz {
31 
32 /**
33  * Decodes an Infocom encoded picture into a raw pixel stream that the outer
34  * Glk engine is capable of then loading into a picture object
35  */
36 class PictureDecoder {
37 private:
38 	byte *_tableVal;
39 	uint16 *_tableRef;
40 public:
41 	/**
42 	 * Constructor
43 	 */
44 	PictureDecoder();
45 
46 	/**
47 	 * Destructor
48 	 */
49 	~PictureDecoder();
50 
51 	/**
52 	 * Decode method
53 	 */
54 	Common::SeekableReadStream *decode(Common::ReadStream &src, uint flags,
55 		const Common::Array<byte> &palette, uint display, size_t width, size_t height);
56 };
57 
58 } // End of namespace Frotz
59 } // End of namespace Glk
60 
61 #endif
62