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
22#ifndef NEVERHOOD_MOUSE_H
23#define NEVERHOOD_MOUSE_H
24
25#include "neverhood/neverhood.h"
26#include "neverhood/sprite.h"
27#include "neverhood/graphics.h"
28#include "neverhood/resource.h"
29
30namespace Neverhood {
31
32enum MouseType {
33 kMouseType433,
34 kMouseType435,
35 kMouseTypeNavigation
36};
37
38class Mouse : public StaticSprite {
39public:
40 Mouse(NeverhoodEngine *vm, uint32 fileHash, const NRect &mouseRect);
41 Mouse(NeverhoodEngine *vm, uint32 fileHash, int16 x1, int16 x2);
42 Mouse(NeverhoodEngine *vm, uint32 fileHash, int _type);
43 ~Mouse() override;
44 void load(uint32 fileHash);
45 void updateCursor();
46protected:
47 MouseType _mouseType;
48 MouseCursorResource _mouseCursorResource;
49 int _frameNum;
50 NRect _mouseRect;
51 int16 _x1;
52 int16 _x2;
53 int _type;
54 void init(uint32 fileHash);
55 void update();
56 void updateCursorNum();
57 uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
58};
59
60} // End of namespace Neverhood
61
62#endif /* NEVERHOOD_MOUSE_H */
Definition: entity.h:77
Definition: resource.h:122
Definition: mouse.h:38
Definition: neverhood.h:69
Definition: sprite.h:119
Definition: entity.h:42
Definition: graphics.h:42