ScummVM API documentation
cgbi.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 IMAGE_CGBI_H
23#define IMAGE_CGBI_H
24
25#include "common/scummsys.h"
26#include "image/image_decoder.h"
27#include "image/png.h"
28#include "graphics/surface.h"
29
30namespace Image {
31
32class CgBIDecoder : public ImageDecoder {
33public:
36
37 bool loadStream(Common::SeekableReadStream &stream) override;
38 void destroy() override;
39 Graphics::Surface *getSurface() const override {
40 return _surface;
41 }
42 const Graphics::Palette &getPalette() const override {
43 return _palette;
44 }
45 void unfilterScanline(uint8 *scanline, uint8 *prev, int scanlineLen, int bpp);
46 void unfilterScanlines(uint8 *filtered, uint32 width, uint32 height, uint32 bpp);
47 void convertBGRAtoRGBA(const byte *filtered, byte *out, uint32 width, uint32 height, uint32 bpp, bool hasAlpha);
48
49private:
50 Graphics::Surface *_surface;
51 Graphics::Palette _palette;
52};
53
54} // End of namespace Image
55
56#endif
Definition: stream.h:745
Simple class for handling a palette data.
Definition: palette.h:61
Definition: cgbi.h:32
const Graphics::Palette & getPalette() const override
Definition: cgbi.h:42
void destroy() override
bool loadStream(Common::SeekableReadStream &stream) override
Graphics::Surface * getSurface() const override
Definition: cgbi.h:39
Definition: image_decoder.h:53
Definition: surface.h:67