ScummVM API documentation
sprites.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 LASTEXPRESS_SPRITES_H
23#define LASTEXPRESS_SPRITES_H
24
25#include "lastexpress/lastexpress.h"
26
27namespace LastExpress {
28
29class LastExpressEngine;
30
31typedef struct Extent {
32 int left;
33 int top;
34 int right;
35 int bottom;
36 int width;
37 int height;
38
39 Extent() {
40 left = 0;
41 top = 0;
42 right = 0;
43 bottom = 0;
44 width = 0;
45 height = 0;
46 }
47
48 Extent(int newLeft, int newTop, int newRight, int newBottom, int newWidth, int newHeight) {
49 left = newLeft;
50 top = newTop;
51 right = newRight;
52 bottom = newBottom;
53 width = newWidth;
54 height = newHeight;
55 }
56} Extent;
57
58struct Sprite;
59
60typedef uint16 PixMap;
61
63
64public:
67
68 void drawCycle();
69 void drawCycleSimple(PixMap *pixels);
70 void queueErase(Sprite *sprite);
71 void resetEraseQueue();
72 void killSpriteQueue();
73 void touchSpriteQueue();
74 void drawSprite(Sprite *sprite);
75 void removeSprite(Sprite *sprite);
76 void destroySprite(Sprite **sprites, bool redrawFlag);
77
78private:
79 LastExpressEngine *_engine = nullptr;
80
81 bool _drawSequencesFlag = false;
82 Sprite *_frameQueue = nullptr;
83 bool _coordinatesAreSet = false;
84 Extent _eraseRect = Extent(640, 480, 0, 0, 0, 0);
85};
86
87} // End of namespace LastExpress
88
89#endif // LASTEXPRESS_SPRITES_H
Definition: lastexpress.h:523
Definition: sprites.h:62
Definition: archive.h:29
Definition: sprites.h:31
Definition: lastexpress.h:159