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
27
namespace
Graphics
{
28
class
ManagedSurface;
29
}
30
31
namespace
Harvester {
32
33
struct
IndexedBitmap
{
34
uint32 width = 0;
35
uint32 height = 0;
36
Common::Array<byte>
pixels;
37
38
bool
isValid()
const
{
39
return
width != 0 && height != 0 && pixels.
size
() >= width * height;
40
}
41
};
42
43
struct
AbmFrame
:
IndexedBitmap
{
44
int32 xOffset = 0;
45
int32 yOffset = 0;
46
};
47
48
// Draw unscaled pixels with index 0 transparent; callers supply the final position.
49
void
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.
52
bool
decodeBitmap(
const
Common::Array<byte>
&data,
IndexedBitmap
&bitmap);
53
bool
decodeAbm(
const
Common::Array<byte>
&data,
Common::Array<AbmFrame>
&frames);
54
55
}
// End of namespace Harvester
56
57
#endif
// HARVESTER_BITMAP_H
Common::Array< byte >
Common::Array::size
size_type size() const
Definition:
array.h:316
Graphics::ManagedSurface
Definition:
managed_surface.h:51
Graphics
Definition:
formatinfo.h:28
Harvester::AbmFrame
Definition:
bitmap.h:43
Harvester::IndexedBitmap
Definition:
bitmap.h:33
engines
harvester
bitmap.h
Generated on Sat Oct 24 2026 09:15:52 for ScummVM API documentation by
1.9.4