• R/O
  • SSH
  • HTTPS

oswan: Commit


Commit MetaInfo

Revision77 (tree)
Time2010-05-07 23:30:35
Authorbird_may_nike

Log Message

(empty log message)

Change Summary

Incremental Difference

--- oswanj/trunk/src/WSRender.h (revision 76)
+++ oswanj/trunk/src/WSRender.h (revision 77)
@@ -22,7 +22,7 @@
2222 extern int Layer[3];
2323 extern int Segment[11];
2424
25-void SetPalette(int addr, BYTE PalData);
25+void SetPalette(int addr);
2626 void RefreshLine(int Line);
2727 void RenderSegment(void);
2828 void RenderSleep(void);
--- oswanj/trunk/src/WSDialog.cpp (revision 76)
+++ oswanj/trunk/src/WSDialog.cpp (revision 77)
@@ -11,7 +11,7 @@
1111 #include "keycode.h"
1212
1313 static WNDPROC OrgEditProc;
14-static HWND hTab, hTabCtrl1, hTabCtrl2, hTabCtrl3, hTabCtrl4;
14+static HWND hTabCtrl, hTab1, hTab2, hTab3, hTab4;
1515 static int TmpKeyboardH[12];
1616 static int TmpKeyboardV[12];
1717 static int TmpJoypadH[12];
@@ -30,39 +30,39 @@
3030 memcpy(TmpJoypadH, WsJoypadH, sizeof(int) * 12);
3131 memcpy(TmpJoypadV, WsJoypadV, sizeof(int) * 12);
3232 hInst = (HINSTANCE)GetWindowLong(hDlg, GWLP_HINSTANCE);
33- hTab = GetDlgItem(hDlg, IDC_TAB1);
33+ hTabCtrl = GetDlgItem(hDlg, IDC_TAB1);
3434 // タブコントロールにタブシートを挿入
3535 tc.mask = TCIF_TEXT;
3636 tc.pszText = TEXT("キー横");
37- TabCtrl_InsertItem(hTab , 0, &tc);
37+ TabCtrl_InsertItem(hTabCtrl , 0, &tc);
3838 tc.mask = TCIF_TEXT;
3939 tc.pszText = TEXT("キー縦");
40- TabCtrl_InsertItem(hTab , 1, &tc);
40+ TabCtrl_InsertItem(hTabCtrl , 1, &tc);
4141 tc.mask = TCIF_TEXT;
4242 tc.pszText = TEXT("コントローラー横");
43- TabCtrl_InsertItem(hTab , 2, &tc);
43+ TabCtrl_InsertItem(hTabCtrl , 2, &tc);
4444 tc.mask = TCIF_TEXT;
4545 tc.pszText = TEXT("コントローラー縦");
46- TabCtrl_InsertItem(hTab , 3, &tc);
46+ TabCtrl_InsertItem(hTabCtrl , 3, &tc);
4747 // タブに貼り付けるダイアログを生成
48- hTabCtrl1 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB1, hDlg, (DLGPROC)TabCtrlProc1);
49- hTabCtrl2 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB2, hDlg, (DLGPROC)TabCtrlProc2);
50- hTabCtrl3 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB1, hDlg, (DLGPROC)TabCtrlProc3);
51- hTabCtrl4 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB2, hDlg, (DLGPROC)TabCtrlProc4);
48+ hTab1 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB1, hDlg, (DLGPROC)TabProc1);
49+ hTab2 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB2, hDlg, (DLGPROC)TabProc2);
50+ hTab3 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB1, hDlg, (DLGPROC)TabProc3);
51+ hTab4 = CreateDialog(hInst, (LPCTSTR)IDD_CONFIG_TAB2, hDlg, (DLGPROC)TabProc4);
5252 // タブコントロールのクライアント領域の座標を取得
53- GetClientRect(hTab, &rt);
54- TabCtrl_AdjustRect(hTab, FALSE, &rt);
53+ GetClientRect(hTabCtrl, &rt);
54+ TabCtrl_AdjustRect(hTabCtrl, FALSE, &rt);
5555 // 親ウィンドウがhDlgなのでタブのマップが必要
56- MapWindowPoints(hTab, hDlg, pt, 2);
56+ MapWindowPoints(hTabCtrl, hDlg, pt, 2);
5757 // タブのウィンドウの位置とサイズを変更する
58- MoveWindow(hTabCtrl1, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
59- MoveWindow(hTabCtrl2, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
60- MoveWindow(hTabCtrl3, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
61- MoveWindow(hTabCtrl4, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
58+ MoveWindow(hTab1, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
59+ MoveWindow(hTab2, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
60+ MoveWindow(hTab3, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
61+ MoveWindow(hTab4, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, FALSE);
6262 // デフォルトでタブ1を表示
63- ShowWindow(hTabCtrl1, SW_SHOW);
64- SetFocus(GetDlgItem(hTabCtrl1, IDC_EDIT_Y1));
65- SendMessage(GetDlgItem(hTabCtrl1, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
63+ ShowWindow(hTab1, SW_SHOW);
64+ SetFocus(GetDlgItem(hTab1, IDC_EDIT_Y1));
65+ SendMessage(GetDlgItem(hTab1, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
6666 lpKeyDevice->Acquire();
6767 }
6868
@@ -81,44 +81,44 @@
8181 switch (nm->code)
8282 {
8383 case TCN_SELCHANGE:
84- if (nm->hwndFrom == hTab)
84+ if (nm->hwndFrom == hTabCtrl)
8585 {
86- SelectedTab = TabCtrl_GetCurSel(hTab);
86+ SelectedTab = TabCtrl_GetCurSel(hTabCtrl);
8787 switch (SelectedTab)
8888 {
8989 case 0:
90- ShowWindow(hTabCtrl1, SW_SHOW);
91- ShowWindow(hTabCtrl2, SW_HIDE);
92- ShowWindow(hTabCtrl3, SW_HIDE);
93- ShowWindow(hTabCtrl4, SW_HIDE);
94- SetFocus(GetDlgItem(hTabCtrl1, IDC_EDIT_Y1));
95- SendMessage(GetDlgItem(hTabCtrl1, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
90+ ShowWindow(hTab1, SW_SHOW);
91+ ShowWindow(hTab2, SW_HIDE);
92+ ShowWindow(hTab3, SW_HIDE);
93+ ShowWindow(hTab4, SW_HIDE);
94+ SetFocus(GetDlgItem(hTab1, IDC_EDIT_Y1));
95+ SendMessage(GetDlgItem(hTab1, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
9696 lpKeyDevice->Acquire();
9797 break;
9898 case 1:
99- ShowWindow(hTabCtrl1, SW_HIDE);
100- ShowWindow(hTabCtrl2, SW_SHOW);
101- ShowWindow(hTabCtrl3, SW_HIDE);
102- ShowWindow(hTabCtrl4, SW_HIDE);
103- SetFocus(GetDlgItem(hTabCtrl2, IDC_EDIT_Y1));
104- SendMessage(GetDlgItem(hTabCtrl2, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
99+ ShowWindow(hTab1, SW_HIDE);
100+ ShowWindow(hTab2, SW_SHOW);
101+ ShowWindow(hTab3, SW_HIDE);
102+ ShowWindow(hTab4, SW_HIDE);
103+ SetFocus(GetDlgItem(hTab2, IDC_EDIT_Y1));
104+ SendMessage(GetDlgItem(hTab2, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
105105 lpKeyDevice->Acquire();
106106 break;
107107 case 2:
108- ShowWindow(hTabCtrl1, SW_HIDE);
109- ShowWindow(hTabCtrl2, SW_HIDE);
110- ShowWindow(hTabCtrl3, SW_SHOW);
111- ShowWindow(hTabCtrl4, SW_HIDE);
112- SetFocus(GetDlgItem(hTabCtrl3, IDC_EDIT_Y1));
113- SendMessage(GetDlgItem(hTabCtrl3, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
108+ ShowWindow(hTab1, SW_HIDE);
109+ ShowWindow(hTab2, SW_HIDE);
110+ ShowWindow(hTab3, SW_SHOW);
111+ ShowWindow(hTab4, SW_HIDE);
112+ SetFocus(GetDlgItem(hTab3, IDC_EDIT_Y1));
113+ SendMessage(GetDlgItem(hTab3, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
114114 break;
115115 case 3:
116- ShowWindow(hTabCtrl1, SW_HIDE);
117- ShowWindow(hTabCtrl2, SW_HIDE);
118- ShowWindow(hTabCtrl3, SW_HIDE);
119- ShowWindow(hTabCtrl4, SW_SHOW);
120- SetFocus(GetDlgItem(hTabCtrl4, IDC_EDIT_Y1));
121- SendMessage(GetDlgItem(hTabCtrl4, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
116+ ShowWindow(hTab1, SW_HIDE);
117+ ShowWindow(hTab2, SW_HIDE);
118+ ShowWindow(hTab3, SW_HIDE);
119+ ShowWindow(hTab4, SW_SHOW);
120+ SetFocus(GetDlgItem(hTab4, IDC_EDIT_Y1));
121+ SendMessage(GetDlgItem(hTab4, IDC_EDIT_Y1), EM_SETSEL, 0, -1);
122122 break;
123123 }
124124 return TRUE;
@@ -221,7 +221,7 @@
221221 return CallWindowProc(OrgEditProc, hEditWnd, msg, wParam, lParam);
222222 }
223223
224-LRESULT CALLBACK TabCtrlProc1(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
224+LRESULT CALLBACK TabProc1(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
225225 {
226226 switch (msg) {
227227 case WM_INITDIALOG:
@@ -254,7 +254,7 @@
254254 return FALSE;
255255 }
256256
257-LRESULT CALLBACK TabCtrlProc2(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
257+LRESULT CALLBACK TabProc2(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
258258 {
259259 switch (msg) {
260260 case WM_INITDIALOG:
@@ -286,7 +286,7 @@
286286 return FALSE;
287287 }
288288
289-LRESULT CALLBACK TabCtrlProc3(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
289+LRESULT CALLBACK TabProc3(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
290290 {
291291 HWND hEditWnd;
292292 int key, joy;
@@ -338,7 +338,7 @@
338338 return FALSE;
339339 }
340340
341-LRESULT CALLBACK TabCtrlProc4(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
341+LRESULT CALLBACK TabProc4(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam)
342342 {
343343 HWND hEditWnd;
344344 int key, joy;
--- oswanj/trunk/src/WSDialog.h (revision 76)
+++ oswanj/trunk/src/WSDialog.h (revision 77)
@@ -12,10 +12,10 @@
1212 LRESULT CALLBACK ConfProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
1313 LRESULT CALLBACK EditProcKey(HWND hEditWnd, UINT msg, WPARAM wParam, LPARAM lParam);
1414 LRESULT CALLBACK EditProcJoy(HWND hEditWnd, UINT msg, WPARAM wParam, LPARAM lParam);
15-LRESULT CALLBACK TabCtrlProc1(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
16-LRESULT CALLBACK TabCtrlProc2(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
17-LRESULT CALLBACK TabCtrlProc3(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
18-LRESULT CALLBACK TabCtrlProc4(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
15+LRESULT CALLBACK TabProc1(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
16+LRESULT CALLBACK TabProc2(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
17+LRESULT CALLBACK TabProc3(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
18+LRESULT CALLBACK TabProc4(HWND hCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
1919 LPCTSTR GetJoyName(int joy);
2020 int GetJoyState(void);
2121
--- oswanj/trunk/src/WS.cpp (revision 76)
+++ oswanj/trunk/src/WS.cpp (revision 77)
@@ -164,7 +164,7 @@
164164 IRAM[A & 0xFFFF] = V;
165165 if((A & 0xFE00) == 0xFE00)
166166 {
167- SetPalette(A, V);
167+ SetPalette(A);
168168 }
169169 if(!((A - WaveMap) & 0xFFC0))
170170 {
--- oswanj/trunk/src/WSRender.cpp (revision 76)
+++ oswanj/trunk/src/WSRender.cpp (revision 77)
@@ -34,7 +34,7 @@
3434 int Layer[3] = {1, 1, 1};
3535 int Segment[11];
3636
37-void SetPalette(int addr, BYTE PalData)
37+void SetPalette(int addr)
3838 {
3939 WORD color;
4040
Show on old repository browser