ScummVM API documentation
hspot.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 MADS_CORE_HSPOT_H
23#define MADS_CORE_HSPOT_H
24
25#include "mads/core/general.h"
26
27namespace MADS {
28
29#define max_hot_spots 120 /* Size of hotspot list */
30#define max_hot_lists 2 /* Maximum # of lists */
31
32#define HS_ALL -1 /* Pass in ERASE to wipe entire class */
33#define HS_DEATH -1 /* Used for marking spots to be killed */
34#define HS_STACK_SIZE 5 /* Size of stack */
35
36struct Spot {
37 int ul_x, ul_y; /* Upper Left */
38 int lr_x, lr_y; /* Lower Right */
39 int _class; /* Clasification */
40 int num; /* Spot number */
41 int video_mode; /* Spot video mode */
42 int active; /* TRUE if active */
43};
44
45#define HS_SIZE 16 /* Size of above structure */
46
47
48extern Spot spot[max_hot_spots + 1];
49extern int numspots;
50extern int hotkeys[max_hot_spots + 1];
51
56extern int hspot_add(int ul_x, int ul_y, int lr_x, int lr_y, int class_, int num, int video_mode);
57
61extern int hspot_push();
62
66extern int hspot_pop();
67
75extern int hspot_remove(int class_, int num);
76extern void hspot_toggle(int class_, int num, int active);
77extern void hspot_wipe();
78extern int hspot_key(int key);
79extern int hspot_begin(int x, int y, int class_, int num, int hotkey);
80extern int hspot_end();
81
86extern int hspot_which(int x, int y, int video_mode);
87
93extern int hspot_which_reverse(int x, int y, int video_mode);
94
95extern void init_hspot();
96
97} // namespace MADS
98
99#endif
Definition: hspot.h:36