ScummVM API documentation
mouse_cursor.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 TITANIC_MOUSE_CURSOR_H
23#define TITANIC_MOUSE_CURSOR_H
24
25#include "common/scummsys.h"
26#include "graphics/managed_surface.h"
27#include "titanic/support/rect.h"
28
29namespace Titanic {
30
31#define NUM_CURSORS 15
32
33enum CursorId {
34 CURSOR_ARROW = 1,
35 CURSOR_MOVE_LEFT = 2,
36 CURSOR_MOVE_RIGHT = 3,
37 CURSOR_MOVE_FORWARD = 4,
38 CURSOR_LOOK_UP = 5,
39 CURSOR_LOOK_DOWN = 6,
40 CURSOR_MOVE_THROUGH = 7,
41 CURSOR_HAND = 8,
42 CURSOR_ACTIVATE = 9,
43 CURSOR_INVALID = 10,
44 CURSOR_MAGNIFIER = 11,
45 CURSOR_IGNORE = 12,
46 CURSOR_BACKWARDS = 13,
47 CURSOR_DOWN = 14,
48 CURSOR_HOURGLASS = 15
49};
50
51class CScreenManager;
52class CVideoSurface;
53
55 struct CursorEntry {
57 Common::Point _centroid;
58
59 CursorEntry() : _surface(nullptr) {}
60 ~CursorEntry();
61 };
62private:
63 CScreenManager *_screenManager;
64 CursorId _cursorId;
65 CursorEntry _cursors[NUM_CURSORS];
66 uint _setCursorCount;
67 int _hideCounter;
68 int _busyCount;
69 bool _cursorSuppressed;
70 int _fieldE8;
71 Common::Point _moveStartPos;
72 Common::Point _moveDestPos;
73 uint32 _moveStartTime, _moveEndTime;
74
78 void loadCursorImages();
79public:
80 bool _inputEnabled;
81public:
82 CMouseCursor(CScreenManager *screenManager);
84
89
95
101
106
112
118
122 void setCursor(CursorId cursorId);
123
127 void update();
128
132 uint getChangeCount() const { return _setCursorCount; }
133
138
143
147 void setPosition(const Point &pt, double duration);
148};
149
150
151} // End of namespace Titanic
152
153#endif /* TITANIC_MOUSE_CURSOR_H */
Definition: managed_surface.h:51
Definition: mouse_cursor.h:54
uint getChangeCount() const
Definition: mouse_cursor.h:132
void setPosition(const Point &pt, double duration)
void setCursor(CursorId cursorId)
Definition: screen_manager.h:49
Definition: rect.h:144