ScummVM API documentation
image.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/*
23 * This code is based on Labyrinth of Time code with assistance of
24 *
25 * Copyright (c) 1993 Terra Nova Development
26 * Copyright (c) 2004 The Wyrmkeep Entertainment Co.
27 *
28 */
29
30#ifndef LAB_IMAGE_H
31#define LAB_IMAGE_H
32
33namespace Common {
34 class File;
35}
36
37namespace Lab {
38
39class LabEngine;
40
41class Image {
42 LabEngine *_vm;
43
44public:
45 uint16 _width;
46 uint16 _height;
47 byte *_imageData;
48
49 Image(LabEngine *vm) : _width(0), _height(0), _imageData(nullptr), _vm(vm), _autoFree(true) {}
50 Image(int w, int h, byte *d, LabEngine *vm, bool autoFree = true) : _width(w), _height(h), _imageData(d), _vm(vm), _autoFree(autoFree) {}
52 ~Image();
53
54 void setData(byte *d, bool autoFree = true);
55
59 void drawImage(uint16 x, uint16 y);
60
64 void drawMaskImage(uint16 x, uint16 y);
65
69 void readScreenImage(uint16 x, uint16 y);
70
74 void blitBitmap(uint16 srcX, uint16 srcY, Image *imgDest, uint16 destX, uint16 destY, uint16 width, uint16 height, byte masked);
75
76private:
77 bool _autoFree;
78};
79
80} // End of namespace Lab
81
82#endif // LAB_IMAGE_H
Definition: file.h:47
Definition: image.h:41
void drawMaskImage(uint16 x, uint16 y)
void readScreenImage(uint16 x, uint16 y)
void blitBitmap(uint16 srcX, uint16 srcY, Image *imgDest, uint16 destX, uint16 destY, uint16 width, uint16 height, byte masked)
void drawImage(uint16 x, uint16 y)
Definition: lab.h:158
Definition: algorithm.h:29