質問編集履歴
1
いらないコードを消しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,33 +20,11 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
//array<float, 2>^inputButton = gcnew array<int, 2>(10, 1);
|
24
|
-
|
25
|
-
//array<array<float, 2>, 10> inputButton;
|
26
|
-
|
27
|
-
|
28
|
-
|
29
23
|
array<float, 10> input_time;
|
30
24
|
|
31
25
|
array<string, 10> input_button;
|
32
26
|
|
33
27
|
|
34
|
-
|
35
|
-
/*struct ButtonData{
|
36
|
-
|
37
|
-
char push_button; //入力されるボタン
|
38
|
-
|
39
|
-
clock_t input_time; //入力された瞬間の時間
|
40
|
-
|
41
|
-
clock_t release_time; //離したときの時間
|
42
|
-
|
43
|
-
bool click_status; //ボタンの状態(trueの時は押している)
|
44
|
-
|
45
|
-
};*/
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
//int Csv_input(array<array<float, 2>, 10> &inputButton){
|
50
28
|
|
51
29
|
int Csv_input(array<string, 10> input_button, array<float, 10> input_time){
|
52
30
|
|
@@ -118,82 +96,6 @@
|
|
118
96
|
|
119
97
|
|
120
98
|
|
121
|
-
/* MSG msg;
|
122
|
-
|
123
|
-
char input = 0;
|
124
|
-
|
125
|
-
int c;
|
126
|
-
|
127
|
-
clock_t start, end;
|
128
|
-
|
129
|
-
start = clock();
|
130
|
-
|
131
|
-
array<char, 10> now_push_button;
|
132
|
-
|
133
|
-
struct ButtonData b;
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
struct ButtonData buttons[]={
|
138
|
-
|
139
|
-
{"a", 0, 0, false},
|
140
|
-
|
141
|
-
{"s", 0, 0, false},
|
142
|
-
|
143
|
-
{"d", 0, 0, false},
|
144
|
-
|
145
|
-
{"w", 0, 0, false},
|
146
|
-
|
147
|
-
};
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
while(1){
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
if(c = kbhit()){ //何か押されたら
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
input = getch(); //キーの取得
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
for(int i = 0; i < now_push_button.size(); i++){ //すでに押されているかを判定
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
if(input == now_push_button[i]){ //連続で押されていたら
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}else{ //連続で押されてない場合
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
}
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
}
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
}else{ //何も押されていなかったら
|
184
|
-
|
185
|
-
input = '';
|
186
|
-
|
187
|
-
for(int j = 0; j < now_push_button.size(); j++) now_push_button[j] = '';
|
188
|
-
|
189
|
-
}
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
}*/
|
194
|
-
|
195
|
-
|
196
|
-
|
197
99
|
int j = 0;
|
198
100
|
|
199
101
|
string input_key_code;
|
@@ -243,8 +145,6 @@
|
|
243
145
|
input = getch(); //特殊キーの場合
|
244
146
|
|
245
147
|
}
|
246
|
-
|
247
|
-
//cout << "time ; " << (double)(end-start)/CLOCKS_PER_SEC << endl; //1.23~
|
248
148
|
|
249
149
|
if(input == before_input){ //同じボタンを押し続けていたら
|
250
150
|
|