]> icculus.org git repositories - btb/d2x.git/blob - arch/include/mouse.h
use the orientation parameter of g3_draw_bitmap
[btb/d2x.git] / arch / include / mouse.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 /*
15  *
16  * Header for mouse functions
17  *
18  *
19  */
20
21 #ifndef MOUSE_H
22 #define MOUSE_H
23
24 #include "pstypes.h"
25 #include "fix.h"
26 #include "console.h"
27
28
29 #define MOUSE_MAX_BUTTONS   16
30
31 #ifdef MBTN_RIGHT
32 #undef MBTN_RIGHT
33 #endif
34
35 #define MBTN_LEFT           0
36 #define MBTN_RIGHT          1
37 #define MBTN_MIDDLE         2
38 #define MBTN_Z_UP           3
39 #define MBTN_Z_DOWN         4
40 #define MBTN_PITCH_BACKWARD 5
41 #define MBTN_PITCH_FORWARD  6
42 #define MBTN_BANK_LEFT      7
43 #define MBTN_BANK_RIGHT     8
44 #define MBTN_HEAD_LEFT      9
45 #define MBTN_HEAD_RIGHT     10
46
47 #define MOUSE_LBTN 1
48 #define MOUSE_RBTN 2
49 #define MOUSE_MBTN 4
50
51
52 // Axis mapping cvars
53 // 0 = no action
54 // 1 = move forward/back
55 // 2 = look up/down
56 // 3 = move left/right
57 // 4 = look left/right
58 // 5 = move up/down
59 // 6 = bank left/right
60
61 extern cvar_t mouse_axes[];
62 extern cvar_t mouse_invert[];
63
64
65 //========================================================================
66 // Check for mouse driver, reset driver if installed.
67
68 extern void d_mouse_init(void);
69
70 /* changed from int to void */
71 extern void mouse_set_limits( int x1, int y1, int x2, int y2 );
72 extern void mouse_flush(void); // clears all mice events...
73
74 //========================================================================
75 // Shutdowns mouse system.
76 #ifdef SVGALIB_INPUT
77 extern void d_mouse_close(); /* conflict with <vgamouse.h> */
78 #else
79 extern void mouse_close(void);
80 #endif
81
82 //========================================================================
83 extern void mouse_get_pos( int *x, int *y );
84 extern void mouse_get_delta( int *dx, int *dy, int *dz );
85 extern int mouse_get_btns(void);
86 extern void mouse_set_pos( int x, int y);
87
88 // Returns how long this button has been down since last call.
89 #define mouse_button_down_time(button) key_down_time(KEY_MB1 + (button))
90
91 // Returns how many times this button has went down since last call.
92 #define mouse_button_down_count(button) key_down_count(KEY_MB1 + (button))
93
94 // Returns 1 if this button is currently down
95 extern int mouse_button_state(int button);
96
97 // Take mouse control away from the window manager or not
98 extern int mouse_set_mode(int i);
99
100 #endif