ScummVM API documentation
te_png.h
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 modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TETRAEDGE_TE_TE_PNG_H
23 #define TETRAEDGE_TE_TE_PNG_H
24 
25 #include "common/str.h"
26 #include "tetraedge/te/te_scummvm_codec.h"
27 
28 namespace Graphics {
29 struct Surface;
30 }
31 
32 namespace Tetraedge {
33 
34 class TePng : public TeScummvmCodec {
35 public:
36  TePng(const Common::String &extn);
37  virtual ~TePng();
38 
39  virtual bool load(const Common::Path &path) override;
40  virtual bool load(Common::SeekableReadStream &stream) override;
41 
42  TeImage::Format imageFormat() override;
43 
44  // We support "animated" PNGs which contain 8
45  // frames stacked vertically.
46  virtual int nbFrames() override { return _nbFrames; }
47  virtual uint height() override { return _height; }
48  virtual bool isAtEnd() override;
49  virtual bool update(uint i, TeImage &imgout) override;
50 
51  static bool matchExtension(const Common::String &extn);
52 
53 private:
54  int _nbFrames;
55  int16 _height;
56 };
57 
58 } // end namespace Tetraedge
59 
60 #endif // TETRAEDGE_TE_TE_PNG_H
Definition: te_png.h:34
Definition: te_image.h:40
Definition: te_scummvm_codec.h:30
Definition: str.h:59
Definition: detection.h:27
Definition: path.h:52
Definition: stream.h:745
Definition: formatinfo.h:28