Mercurial > sdl-ios-xcode
annotate src/haptic/nds/SDL_syshaptic.c @ 3012:7e30c2dc7783
Fixed Visual C++ release build for Visual C++ 2005
* Some math functions become intrinsic in release mode, so we need to
convert all the math functions into SDL math functions, like we did
with the stdlib functions.
* Constant initializers of 8-bit values become calls to memset() in
release mode, but memset() itself is an intrinsic when explicitly
called. So we'll just explicitly call memset() in those cases.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Jan 2009 18:32:24 +0000 |
parents | 8f4ed5ec2b06 |
children | 8cc00819c8d6 |
rev | line source |
---|---|
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
1 /* |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
3 Copyright (C) 2008 Edgar Simo |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
4 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
9 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
14 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
18 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
19 Sam Lantinga |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
20 slouken@libsdl.org |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
21 */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
23 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
24 #ifdef SDL_HAPTIC_NDS |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
25 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
26 #include "SDL_haptic.h" |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
27 #include "../SDL_syshaptic.h" |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
28 #include "SDL_joystick.h" |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
29 #include <nds/arm9/rumble.h> |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
30 #include <nds/memory.h> |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
31 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
32 #define MAX_HAPTICS 1 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
33 /* right now only the ezf3in1 (and maybe official rumble pak) are supported |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
34 and there can only be one of those in at a time (in GBA slot.) */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
35 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
36 SDL_Haptic *nds_haptic = NULL; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
37 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
38 typedef struct |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
39 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
40 enum |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
41 { NONE, OFFICIAL, EZF3IN1 } type; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
42 int pos; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
43 } NDS_HapticData; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
44 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
45 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
46 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
47 void |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
48 NDS_EZF_OpenNorWrite() |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
49 { |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
50 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
51 GBA_BUS[0x0FF0000] = 0xD200; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
52 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
53 GBA_BUS[0x0000000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
54 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
55 GBA_BUS[0x0010000] = 0xD200; |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
56 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
57 GBA_BUS[0x0020000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
58 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
59 GBA_BUS[0x0E20000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
60 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
61 GBA_BUS[0x0FE0000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
62 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
63 } |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
64 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
65 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
66 void |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
67 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
68 NDS_EZF_CloseNorWrite() |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
69 { |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
70 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
71 GBA_BUS[0x0FF0000] = 0xD200; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
72 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
73 GBA_BUS[0x0000000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
74 |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
75 GBA_BUS[0x0010000] = 0xD200; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
76 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
77 GBA_BUS[0x0020000] = 0x1500; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
78 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
79 GBA_BUS[0x0E20000] = 0xD200; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
80 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
81 GBA_BUS[0x0FE0000] = 0x1500; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
82 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
83 } |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
84 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
85 void |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
86 NDS_EZF_ChipReset() |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
87 { |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
88 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
89 GBA_BUS[0x0000] = 0x00F0; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
90 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
91 GBA_BUS[0x1000] = 0x00F0; |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
92 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
93 uint32 NDS_EZF_IsPresent() |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
94 { |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
95 |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
96 vuint16 id1, id2; |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
97 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
98 NDS_EZF_OpenNorWrite(); |
3011
8f4ed5ec2b06
I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents:
2750
diff
changeset
|
99 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
100 GBA_BUS[0x0555] = 0x00AA; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
101 GBA_BUS[0x02AA] = 0x0055; |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
102 GBA_BUS[0x0555] = 0x0090; |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
103 GBA_BUS[0x1555] = 0x00AA; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
104 GBA_BUS[0x12AA] = 0x0055; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
105 GBA_BUS[0x1555] = 0x0090; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
106 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
107 id1 = GBA_BUS[0x0001]; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
108 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
109 id2 = GBA_BUS[0x1001]; |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
110 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
111 if ((id1 != 0x227E) || (id2 != 0x227E)) { |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
112 NDS_EZF_CloseNorWrite(); |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
113 |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
114 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
115 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
116 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
117 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
118 id1 = GBA_BUS[0x000E]; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
119 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
120 id2 = GBA_BUS[0x100E]; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
121 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
122 NDS_EZF_CloseNorWrite(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
123 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
124 if (id1 == 0x2218 && id2 == 0x2218) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
125 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
126 return 1; |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
127 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
128 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
129 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
130 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
131 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
132 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
133 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
134 void |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
135 NDS_EZF_SetShake(u8 pos) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
136 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
137 u16 data = ((pos % 3) | 0x00F0); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
138 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
139 GBA_BUS[0x0FF0000] = 0xD200; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
140 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
141 GBA_BUS[0x0000000] = 0x1500; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
142 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
143 GBA_BUS[0x0010000] = 0xD200; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
144 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
145 GBA_BUS[0x0020000] = 0x1500; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
146 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
147 GBA_BUS[0x0F10000] = data; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
148 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
149 GBA_BUS[0x0FE0000] = 0x1500; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
150 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
151 GBA_BUS[0] = 0x0000; /* write any value for vibration. */ |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
152 GBA_BUS[0] = 0x0002; |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
153 |
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
154 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
155 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
156 static int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
157 SDL_SYS_LogicError(void) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
158 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
159 SDL_SetError("Logic error: No haptic devices available."); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
160 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
161 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
162 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
163 |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
164 int |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
165 SDL_SYS_HapticInit(void) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
166 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
167 int ret = 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
168 if (isRumbleInserted()) { |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
169 /* official rumble pak is present. */ |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
170 ret = 1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
171 printf("debug: haptic present: nintendo\n"); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
172 } else if (NDS_EZF_IsPresent()) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
173 /* ezflash 3-in-1 pak is present. */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
174 ret = 1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
175 printf("debug: haptic present: ezf3in1\n"); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
176 NDS_EZF_ChipReset(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
177 } else { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
178 printf("debug: no haptic found\n"); |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
179 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
180 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
181 return ret; |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
182 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
183 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
184 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
185 const char * |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
186 SDL_SYS_HapticName(int index) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
187 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
188 if (nds_haptic) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
189 switch (nds_haptic->hwdata->type) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
190 case OFFICIAL: |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
191 return "Nintendo DS Rumble Pak"; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
192 case EZF3IN1: |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
193 return "EZFlash 3-in-1 Rumble"; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
194 default: |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
195 return NULL; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
196 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
197 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
198 return NULL; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
199 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
200 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
201 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
202 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
203 SDL_SYS_HapticOpen(SDL_Haptic * haptic) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
204 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
205 if (!haptic) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
206 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
207 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
208 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
209 haptic->hwdata = SDL_malloc(sizeof(NDS_HapticData)); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
210 if (!haptic->hwdata) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
211 SDL_OutOfMemory(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
212 return -1; |
2750
e3affc66d963
Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality.
Darren Alton <dalton@stevens.edu>
parents:
2749
diff
changeset
|
213 } |
2749
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
214 nds_haptic = haptic; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
215 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
216 haptic->supported = SDL_HAPTIC_CONSTANT; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
217 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
218 /* determine what is here, if anything */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
219 haptic->hwdata->type = NONE; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
220 if (isRumbleInserted()) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
221 /* official rumble pak is present. */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
222 haptic->hwdata->type = OFFICIAL; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
223 } else if (NDS_EZF_IsPresent()) { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
224 /* ezflash 3-in-1 pak is present. */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
225 haptic->hwdata->type = EZF3IN1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
226 NDS_EZF_ChipReset(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
227 } else { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
228 /* no haptic present */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
229 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
230 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
231 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
232 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
233 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
234 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
235 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
236 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
237 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
238 SDL_SYS_HapticMouse(void) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
239 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
240 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
241 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
242 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
243 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
244 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
245 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
246 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
247 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
248 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
249 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
250 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
251 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
252 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
253 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
254 /*SDL_SYS_LogicError(); */ |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
255 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
256 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
257 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
258 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
259 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
260 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
261 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
262 return 0; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
263 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
264 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
265 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
266 void |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
267 SDL_SYS_HapticClose(SDL_Haptic * haptic) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
268 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
269 return; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
270 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
271 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
272 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
273 void |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
274 SDL_SYS_HapticQuit(void) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
275 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
276 return; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
277 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
278 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
279 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
280 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
281 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
282 struct haptic_effect *effect, SDL_HapticEffect * base) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
283 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
284 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
285 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
286 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
287 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
288 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
289 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
290 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
291 struct haptic_effect *effect, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
292 SDL_HapticEffect * data) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
293 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
294 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
295 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
296 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
297 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
298 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
299 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
300 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
301 Uint32 iterations) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
302 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
303 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
304 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
305 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
306 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
307 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
308 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
309 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
310 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
311 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
312 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
313 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
314 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
315 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
316 void |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
317 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
318 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
319 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
320 return; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
321 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
322 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
323 |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
324 int |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
325 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
326 struct haptic_effect *effect) |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
327 { |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
328 SDL_SYS_LogicError(); |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
329 return -1; |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
330 } |
1c5f440a60fe
Initial work for NDS haptic support.
Darren Alton <dalton@stevens.edu>
parents:
diff
changeset
|
331 |