ScummVM API documentation
bitmap.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 HARVESTER_BITMAP_H
23#define HARVESTER_BITMAP_H
24
25#include "common/array.h"
26
27namespace Graphics {
28class ManagedSurface;
29}
30
31namespace Harvester {
32
34 uint32 width = 0;
35 uint32 height = 0;
37
38 bool isValid() const {
39 return width != 0 && height != 0 && pixels.size() >= width * height;
40 }
41};
42
44 int32 xOffset = 0;
45 int32 yOffset = 0;
46};
47
48// Draw unscaled pixels with index 0 transparent; callers supply the final position.
49void blitTransparentBitmap(Graphics::ManagedSurface &surface, const IndexedBitmap &bitmap, int x, int y);
50
51// Callers choose when to clear output. Failed decoding can leave partial header or frame data.
52bool decodeBitmap(const Common::Array<byte> &data, IndexedBitmap &bitmap);
53bool decodeAbm(const Common::Array<byte> &data, Common::Array<AbmFrame> &frames);
54
55} // End of namespace Harvester
56
57#endif // HARVESTER_BITMAP_H
size_type size() const
Definition: array.h:316
Definition: managed_surface.h:51
Definition: formatinfo.h:28
Definition: bitmap.h:43
Definition: bitmap.h:33