1
/*------------------------------------------------------------------.
2
| Copyright 1997, 1998, 2000, 2001 Alexandre Duret-Lutz |
5
| This file is part of Heroes. |
7
| Heroes is free software; you can redistribute it and/or modify it |
8
| under the terms of the GNU General Public License version 2 as |
9
| published by the Free Software Foundation. |
11
| Heroes is distributed in the hope that it will be useful, but |
12
| WITHOUT ANY WARRANTY; without even the implied warranty of |
13
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14
| General Public License for more details. |
16
| You should have received a copy of the GNU General Public License |
17
| along with this program; if not, write to the Free Software |
18
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
20
`------------------------------------------------------------------*/
27
unsigned int keyboard_modifiers;
28
unsigned char keyboard_map[HKEY_MAX + 1];
31
init_keyboard_map (void)
35
for (i = HKEY_MAX; i >= 0; i--)
37
keyboard_modifiers = 0;
41
uninit_keyboard_map (void)
48
update_mouse_state ();
49
return mouse_pos_x / stretch;
55
update_mouse_state ();
56
return mouse_pos_y / stretch;
62
update_mouse_state ();
63
return mouse_button_left;
69
update_mouse_state ();
70
return mouse_button_right;
76
update_mouse_state ();
77
return mouse_button_middle;
80
/* FIXME: this should be renamed */
84
update_mouse_state ();
85
return mouse_button_left || mouse_button_right || mouse_button_middle;