ScummVM API documentation
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 CURSOR_H_
23
#define CURSOR_H_
24
25
#include "common/hashmap.h"
26
#include "common/rect.h"
27
28
#include "engines/myst3/gfx.h"
29
30
namespace
Myst3
{
31
32
class
Myst3Engine;
33
class
Texture;
34
35
class
Cursor
:
public
Drawable
{
36
public
:
37
Cursor
(
Myst3Engine
*vm);
38
virtual
~
Cursor
();
39
40
void
changeCursor(uint32 index);
41
bool
isPositionLocked() {
return
_lockedAtCenter; }
42
void
lockPosition(
bool
lock);
43
52
Common::Point
getPosition
(
bool
scaled =
true
);
53
void
updatePosition(
const
Common::Point
&mouse);
54
55
void
getDirection(
float
&pitch,
float
&heading);
56
57
void
draw()
override
;
58
void
setVisible(
bool
show);
59
bool
isVisible();
60
private
:
61
Myst3Engine
*_vm;
62
63
uint32 _currentCursorID;
64
int32 _hideLevel;
65
67
Common::Point
_position;
68
69
typedef
Common::HashMap<uint32, Texture *>
TextureMap
;
70
TextureMap _textures;
71
72
bool
_lockedAtCenter;
73
74
void
loadAvailableCursors();
75
float
getTransparencyForId(uint32 cursorId);
76
};
77
78
}
// End of namespace Myst3
79
80
#endif // CURSOR_H_
Myst3::Cursor::getPosition
Common::Point getPosition(bool scaled=true)
Myst3
Definition:
ambient.h:27
Common::HashMap< uint32, Texture * >
Common::Point
Definition:
rect.h:45
Myst3::Cursor
Definition:
cursor.h:35
Myst3::Drawable
Definition:
gfx.h:36
Myst3::Myst3Engine
Definition:
myst3.h:87
engines
myst3
cursor.h
Generated on Tue Dec 17 2024 09:04:13 for ScummVM API documentation by
1.8.13