ScummVM API documentation
picture.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 * This file is dual-licensed.
22 * In addition to the GPLv3 license mentioned above, MojoTouch has
23 * exclusively licensed this code on March 23th, 2024, to be used in
24 * closed-source products.
25 * Therefore, any contributions (commits) to it will also be dual-licensed.
26 *
27 */
28
29#ifndef TOON_PICTURE_H
30#define TOON_PICTURE_H
31
32#include "common/stream.h"
33#include "common/array.h"
34#include "common/func.h"
35#include "common/path.h"
36
37#include "toon/toon.h"
38
39namespace Toon {
40
41class ToonEngine;
42
43class Picture {
44public:
46 ~Picture();
47
48 bool loadPicture(const Common::Path &file);
49 void setupPalette();
50 void draw(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy);
51 void drawWithRectList(Graphics::Surface& surface, int16 x, int16 y, int16 dx, int16 dy, Common::Array<Common::Rect>& rectArray);
52 void drawMask(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy);
53 void drawLineOnMask(int16 x, int16 y, int16 x2, int16 y2, bool walkable);
54 void floodFillNotWalkableOnMask(int16 x, int16 y);
55 uint8 getData(int16 x, int16 y);
56 uint8 *getDataPtr() { return _data; }
57 int16 getWidth() const { return _width; }
58 int16 getHeight() const { return _height; }
59
60protected:
61 int16 _width;
62 int16 _height;
63 uint8 *_data;
64 uint8 *_palette; // need to be copied at 3-387
65 int32 _paletteEntries;
66 bool _useFullPalette;
67
68 ToonEngine *_vm;
69};
70
71} // End of namespace Toon
72
73#endif
Definition: path.h:52
Definition: picture.h:43
Definition: toon.h:118
Definition: anim.h:39
Definition: surface.h:67