ScummVM API documentation
mouse.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#ifndef TOT_MOUSE_H
22#define TOT_MOUSE_H
23
24namespace Tot {
25
26struct MouseMask {
27 void *mask;
28 uint width;
29 uint height;
30};
31
33public:
36 void drawMask(int idx);
37 void warpMouse(int mask, int x, int y);
38 void setMask(int maskNum);
39 void animateMouseIfNeeded();
40 void hide();
41 void show();
42 void setMouseArea(Common::Rect rect);
43 void warpMouse(Common::Point p);
44 void printPos(int x, int y, int screenPosX, int screenPosY);
45 Common::Point getClickCoordsWithinGrid();
46 Common::Point getMouseCoordsWithinGrid();
47
48 uint mouseX, mouseY; // Coords of the mouse sprite
49 uint mouseClickX, mouseClickY; // Coords of mouse clicks
50 byte mouseMaskIndex; // Frame index of the mouse mask
51
52private:
53 Common::Rect _mouseArea;
54 int _currentMouseMask = 0;
55 MouseMask _mouseMasks[8];
56 void loadMasks();
57 void setMouseMask(int numMask);
58};
59
60} // End of namespace Tot
61
62#endif
Definition: mouse.h:32
Definition: rect.h:144
Definition: rect.h:536
Definition: mouse.h:26