1 #ifndef __MOUSE_H
2 #define __MOUSE_H
3 
4 /*
5 MOUSE.H
6 
7 	Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc.
8 	and the "Aleph One" developers.
9 
10 	This program is free software; you can redistribute it and/or modify
11 	it under the terms of the GNU General Public License as published by
12 	the Free Software Foundation; either version 3 of the License, or
13 	(at your option) any later version.
14 
15 	This program is distributed in the hope that it will be useful,
16 	but WITHOUT ANY WARRANTY; without even the implied warranty of
17 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 	GNU General Public License for more details.
19 
20 	This license is contained in the file "COPYING",
21 	which is included with this source code; it is available online at
22 	http://www.gnu.org/licenses/gpl.html
23 
24 Tuesday, January 17, 1995 2:53:17 PM  (Jason')
25 
26     May 16, 2002 (Woody Zenfell):
27         semi-hacky scheme in SDL to let mouse buttons simulate keypresses
28 */
29 
30 #include "world.h"
31 
32 void enter_mouse(short type);
33 fixed_yaw_pitch pull_mouselook_delta();
34 void exit_mouse(short type);
35 void mouse_idle(short type);
36 void recenter_mouse(void);
37 
38 // ZZZ: stuff of various hackiness levels to pretend mouse buttons are keys
39 void mouse_buttons_become_keypresses(Uint8* ioKeyMap);
40 void mouse_scroll(bool up);
41 void mouse_moved(int delta_x, int delta_y);
42 
43 #define NUM_SDL_REAL_MOUSE_BUTTONS 5
44 #define NUM_SDL_MOUSE_BUTTONS 7   		  // two scroll-wheel buttons
45 #define AO_SCANCODE_BASE_MOUSE_BUTTON 400 // this is button 1's pseudo-keysym
46 #define AO_SCANCODE_MOUSESCROLL_UP 405    // stored as mouse button 6
47 #define AO_SCANCODE_MOUSESCROLL_DOWN 406  // stored as mouse button 7
48 
49 #endif
50