Line | |
---|
1 | /* $Id: joyos2.h,v 1.3 2003-04-02 12:59:24 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * Odin Joystick apis
|
---|
4 | *
|
---|
5 | * Copyright 1999 Przemyslaw Dobrowolski <dobrawka@asua.org.pl>
|
---|
6 | *
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #ifndef __JOYOS2_H__
|
---|
12 | #define __JOYOS2_H__
|
---|
13 |
|
---|
14 | // bit masks for each button
|
---|
15 | #define JOY_BUT1_BIT 0x10
|
---|
16 | #define JOY_BUT2_BIT 0x20
|
---|
17 | #define JOY_BUT3_BIT 0x40
|
---|
18 | #define JOY_BUT4_BIT 0x80
|
---|
19 | #define JOY_ALL_BUTS (JOY_BUT1_BIT|JOY_BUT2_BIT|JOY_BUT3_BIT|JOY_BUT4_BIT)
|
---|
20 |
|
---|
21 | typedef SHORT GAME_POS;
|
---|
22 |
|
---|
23 | typedef struct
|
---|
24 | {
|
---|
25 | GAME_POS x;
|
---|
26 | GAME_POS y;
|
---|
27 | } GAME_2DPOS_STRUCT;
|
---|
28 |
|
---|
29 | typedef struct
|
---|
30 | {
|
---|
31 | GAME_2DPOS_STRUCT A; // Joy1
|
---|
32 | GAME_2DPOS_STRUCT B; // Joy2
|
---|
33 | USHORT butMask; // Buttons
|
---|
34 | } GAME_DATA_STRUCT;
|
---|
35 |
|
---|
36 | typedef struct
|
---|
37 | {
|
---|
38 | GAME_POS lower;
|
---|
39 | GAME_POS centre;
|
---|
40 | GAME_POS upper;
|
---|
41 | } GAME_3POS_STRUCT;
|
---|
42 |
|
---|
43 | typedef struct
|
---|
44 | {
|
---|
45 | GAME_DATA_STRUCT curdata;
|
---|
46 | USHORT b1cnt;
|
---|
47 | USHORT b2cnt;
|
---|
48 | USHORT b3cnt;
|
---|
49 | USHORT b4cnt;
|
---|
50 | } GAME_STATUS_STRUCT;
|
---|
51 |
|
---|
52 | typedef struct
|
---|
53 | {
|
---|
54 | USHORT useA;
|
---|
55 | USHORT useB;
|
---|
56 | USHORT mode;
|
---|
57 | USHORT format;
|
---|
58 | USHORT sampDiv;
|
---|
59 | USHORT scale;
|
---|
60 | USHORT res1;
|
---|
61 | USHORT res2;
|
---|
62 | } GAME_PARM_STRUCT;
|
---|
63 |
|
---|
64 | typedef struct
|
---|
65 | {
|
---|
66 | GAME_3POS_STRUCT Ax;
|
---|
67 | GAME_3POS_STRUCT Ay;
|
---|
68 | GAME_3POS_STRUCT Bx;
|
---|
69 | GAME_3POS_STRUCT By;
|
---|
70 | } GAME_CALIB_STRUCT;
|
---|
71 |
|
---|
72 | typedef struct
|
---|
73 | {
|
---|
74 | GAME_3POS_STRUCT Ax;
|
---|
75 | GAME_3POS_STRUCT Ay;
|
---|
76 | GAME_3POS_STRUCT Bx;
|
---|
77 | GAME_3POS_STRUCT By;
|
---|
78 | } GAME_DIGSET_STRUCT;
|
---|
79 |
|
---|
80 | LONG JoyOpen( HANDLE *phGame );
|
---|
81 | LONG JoyGetParams( HANDLE hGame, GAME_PARM_STRUCT *pGameParams );
|
---|
82 | LONG JoyCalibrate( HANDLE hGame, GAME_CALIB_STRUCT gameCalib );
|
---|
83 | LONG JoyGetCalValues( HANDLE hGame, GAME_CALIB_STRUCT *pGameCalib );
|
---|
84 | LONG JoyGetStatus( HANDLE hGame, GAME_STATUS_STRUCT *pGameStatus );
|
---|
85 | LONG JoyClose( HANDLE hGame );
|
---|
86 | LONG JoyInstalled(USHORT wID);
|
---|
87 |
|
---|
88 | #endif /* __JOYOS2_H__ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.