• R/O
  • SSH
  • HTTPS

oswan: Commit


Commit MetaInfo

Revision80 (tree)
Time2010-05-10 17:24:40
Authorbird_may_nike

Log Message

(empty log message)

Change Summary

Incremental Difference

--- oswanj/trunk/src/WSInput.cpp (revision 79)
+++ oswanj/trunk/src/WSInput.cpp (revision 80)
@@ -5,10 +5,10 @@
55
66 #include "WSInput.h"
77
8-int WsKeyboardH[12];
9-int WsKeyboardV[12];
10-int WsJoypadH[12];
11-int WsJoypadV[12];
8+int WsKeyboardH[13];
9+int WsKeyboardV[13];
10+int WsJoypadH[13];
11+int WsJoypadV[13];
1212 LPDIRECTINPUTDEVICE8 lpKeyDevice;
1313 LPDIRECTINPUTDEVICE8 lpJoyDevice;
1414 static int* WsJoypad;
--- oswanj/trunk/src/WSDialog.cpp (revision 79)
+++ oswanj/trunk/src/WSDialog.cpp (revision 80)
@@ -12,10 +12,10 @@
1212
1313 static WNDPROC OrgEditProc;
1414 static HWND hTabCtrl, hTab1, hTab2, hTab3, hTab4;
15-static int TmpKeyboardH[12];
16-static int TmpKeyboardV[12];
17-static int TmpJoypadH[12];
18-static int TmpJoypadV[12];
15+static int TmpKeyboardH[13];
16+static int TmpKeyboardV[13];
17+static int TmpJoypadH[13];
18+static int TmpJoypadV[13];
1919 static int SelectedTab;
2020
2121 void WsDlgConfInit(HWND hDlg)
@@ -25,10 +25,10 @@
2525 RECT rt;
2626 LPPOINT pt = (LPPOINT)&rt;
2727
28- memcpy(TmpKeyboardH, WsKeyboardH, sizeof(int) * 12);
29- memcpy(TmpKeyboardV, WsKeyboardV, sizeof(int) * 12);
30- memcpy(TmpJoypadH, WsJoypadH, sizeof(int) * 12);
31- memcpy(TmpJoypadV, WsJoypadV, sizeof(int) * 12);
28+ memcpy(TmpKeyboardH, WsKeyboardH, sizeof(int) * 13);
29+ memcpy(TmpKeyboardV, WsKeyboardV, sizeof(int) * 13);
30+ memcpy(TmpJoypadH, WsJoypadH, sizeof(int) * 13);
31+ memcpy(TmpJoypadV, WsJoypadV, sizeof(int) * 13);
3232 hInst = (HINSTANCE)GetWindowLong(hDlg, GWLP_HINSTANCE);
3333 hTabCtrl = GetDlgItem(hDlg, IDC_TAB1);
3434 // タブコントロールにタブシートを挿入
@@ -226,6 +226,7 @@
226226 switch (msg) {
227227 case WM_INITDIALOG:
228228 OrgEditProc = (WNDPROC)GetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y1), GWLP_WNDPROC);
229+ SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
229230 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y1), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
230231 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y2), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
231232 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y3), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
@@ -238,6 +239,7 @@
238239 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_A), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
239240 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_B), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
240241
242+ SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), keyName[TmpKeyboardH[12]]);
241243 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y1), keyName[TmpKeyboardH[11]]);
242244 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y2), keyName[TmpKeyboardH[10]]);
243245 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y3), keyName[TmpKeyboardH[9]]);
@@ -258,6 +260,7 @@
258260 {
259261 switch (msg) {
260262 case WM_INITDIALOG:
263+ SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
261264 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y1), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
262265 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y2), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
263266 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y3), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
@@ -270,6 +273,7 @@
270273 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_A), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
271274 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_B), GWLP_WNDPROC, (LONG_PTR)EditProcKey);
272275
276+ SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), keyName[TmpKeyboardH[12]]);
273277 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y1), keyName[TmpKeyboardV[11]]);
274278 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y2), keyName[TmpKeyboardV[10]]);
275279 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y3), keyName[TmpKeyboardV[9]]);
@@ -293,6 +297,7 @@
293297
294298 switch (msg) {
295299 case WM_INITDIALOG:
300+ SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
296301 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y1), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
297302 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y2), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
298303 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y3), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
@@ -305,6 +310,7 @@
305310 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_A), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
306311 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_B), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
307312
313+ SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GetJoyName(TmpJoypadH[12]));
308314 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y1), GetJoyName(TmpJoypadH[11]));
309315 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y2), GetJoyName(TmpJoypadH[10]));
310316 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y3), GetJoyName(TmpJoypadH[9]));
@@ -345,6 +351,7 @@
345351
346352 switch (msg) {
347353 case WM_INITDIALOG:
354+ SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
348355 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y1), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
349356 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y2), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
350357 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_Y3), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
@@ -357,6 +364,7 @@
357364 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_A), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
358365 SetWindowLongPtr(GetDlgItem(hCtrl, IDC_EDIT_B), GWLP_WNDPROC, (LONG_PTR)EditProcJoy);
359366
367+ SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_NOWAIT), GetJoyName(TmpJoypadH[12]));
360368 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y1), GetJoyName(TmpJoypadV[11]));
361369 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y2), GetJoyName(TmpJoypadV[10]));
362370 SetWindowText(GetDlgItem(hCtrl, IDC_EDIT_Y3), GetJoyName(TmpJoypadV[9]));
--- oswanj/trunk/src/WSInput.h (revision 79)
+++ oswanj/trunk/src/WSInput.h (revision 80)
@@ -44,10 +44,10 @@
4444 #define WS_JOY_SLIDER2_P 0x100E
4545 #define WS_JOY_SLIDER2_M 0x100F
4646
47-extern int WsKeyboardH[12];
48-extern int WsKeyboardV[12];
49-extern int WsJoypadH[12];
50-extern int WsJoypadV[12];
47+extern int WsKeyboardH[];
48+extern int WsKeyboardV[];
49+extern int WsJoypadH[];
50+extern int WsJoypadV[];
5151 extern LPDIRECTINPUTDEVICE8 lpKeyDevice;
5252 extern LPDIRECTINPUTDEVICE8 lpJoyDevice;
5353
--- oswanj/trunk/src/WSConfig.cpp (revision 79)
+++ oswanj/trunk/src/WSConfig.cpp (revision 80)
@@ -12,7 +12,8 @@
1212 static LPCWSTR KeyName[] = {
1313 L"B", L"A", L"START", L"OPTION",
1414 L"X4", L"X3", L"X2", L"X1",
15- L"Y4", L"Y3", L"Y2", L"Y1"
15+ L"Y4", L"Y3", L"Y2", L"Y1",
16+ L"NOWAIT"
1617 };
1718
1819 void ConfigCreate(void)
@@ -31,6 +32,7 @@
3132 WsKeyboardH[9] = DIK_S; // Y3
3233 WsKeyboardH[10] = DIK_D; // Y2
3334 WsKeyboardH[11] = DIK_W; // Y1
35+ WsKeyboardH[12] = DIK_SPACE; // NO WAIT
3436
3537 WsKeyboardV[0] = DIK_Z; // B
3638 WsKeyboardV[1] = DIK_X; // A
@@ -44,6 +46,7 @@
4446 WsKeyboardV[9] = DIK_RIGHT; // Y3
4547 WsKeyboardV[10] = DIK_UP; // Y2
4648 WsKeyboardV[11] = DIK_LEFT; // Y1
49+ WsKeyboardV[12] = DIK_SPACE; // NO WAIT
4750
4851 WsJoypadH[0] = 1; // B
4952 WsJoypadH[1] = 2; // A
@@ -57,6 +60,7 @@
5760 WsJoypadH[9] = WS_JOY_POV1_DOWN; // Y3
5861 WsJoypadH[10] = WS_JOY_POV1_RIGHT; // Y2
5962 WsJoypadH[11] = WS_JOY_POV1_UP; // Y1
63+ WsJoypadH[12] = 9; // NO WAIT
6064
6165 WsJoypadV[0] = 5; // B
6266 WsJoypadV[1] = 6; // A
@@ -70,20 +74,21 @@
7074 WsJoypadV[9] = WS_JOY_AXIS_X_P; // Y3
7175 WsJoypadV[10] = WS_JOY_AXIS_Y_M; // Y2
7276 WsJoypadV[11] = WS_JOY_AXIS_X_M; // Y1
77+ WsJoypadV[12] = 9; // NO WAIT
7378
74- for (i = 11; i >= 0; i--)
79+ for (i = 12; i >= 0; i--)
7580 {
7681 WsKeyboardH[i] = GetPrivateProfileIntW(L"KEY_H", KeyName[i] , WsKeyboardH[i] , IniPath);
7782 }
78- for (i = 11; i >= 0; i--)
83+ for (i = 12; i >= 0; i--)
7984 {
8085 WsKeyboardV[i] = GetPrivateProfileIntW(L"KEY_V", KeyName[i] , WsKeyboardV[i] , IniPath);
8186 }
82- for (i = 11; i >= 0; i--)
87+ for (i = 12; i >= 0; i--)
8388 {
8489 WsJoypadH[i] = GetPrivateProfileIntW(L"JOY_H", KeyName[i] , WsJoypadH[i] , IniPath);
8590 }
86- for (i = 11; i >= 0; i--)
91+ for (i = 12; i >= 0; i--)
8792 {
8893 WsJoypadV[i] = GetPrivateProfileIntW(L"JOY_V", KeyName[i] , WsJoypadV[i] , IniPath);
8994 }
@@ -101,19 +106,19 @@
101106 {
102107 int i;
103108
104- for (i = 11; i >= 0; i--)
109+ for (i = 12; i >= 0; i--)
105110 {
106111 WritePrivateProfileIntW(L"KEY_H", KeyName[i] , WsKeyboardH[i] , IniPath);
107112 }
108- for (i = 11; i >= 0; i--)
113+ for (i = 12; i >= 0; i--)
109114 {
110115 WritePrivateProfileIntW(L"KEY_V", KeyName[i] , WsKeyboardV[i] , IniPath);
111116 }
112- for (i = 11; i >= 0; i--)
117+ for (i = 12; i >= 0; i--)
113118 {
114119 WritePrivateProfileIntW(L"JOY_H", KeyName[i] , WsJoypadH[i] , IniPath);
115120 }
116- for (i = 11; i >= 0; i--)
121+ for (i = 12; i >= 0; i--)
117122 {
118123 WritePrivateProfileIntW(L"JOY_V", KeyName[i] , WsJoypadV[i] , IniPath);
119124 }
--- oswanj/trunk/resource.h (revision 79)
+++ oswanj/trunk/resource.h (revision 80)
@@ -14,6 +14,8 @@
1414 #define IDC_EDIT_A 1002
1515 #define IDC_EDIT_START 1003
1616 #define IDC_EDIT_OPTION 1004
17+#define IDC_EDIT_A2 1004
18+#define IDC_EDIT_NOWAIT 1004
1719 #define IDC_EDIT_X4 1005
1820 #define IDC_EDIT_X3 1006
1921 #define IDC_EDIT_X2 1007
Show on old repository browser