• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

MIDITrail をピカピカにする。鍵盤方向自動切替・多ポート・歌詞対応等


コミットメタ情報

リビジョンe32735a243d831f0a6350e178ae4f8f51aacb6f0 (tree)
日時2018-04-12 08:44:04
作者yoshy <yoshy@user...>
コミッターyoshy

ログメッセージ

[ADD] タイムインジケータ・グリッドボックスの表示切替機能を追加

変更サマリ

差分

--- a/MIDITrail/MIDITrail.rc
+++ b/MIDITrail/MIDITrail.rc
@@ -79,6 +79,10 @@ BEGIN
7979 MENUITEM "Stars", IDM_ENABLE_STARS
8080 MENUITEM "Counter", IDM_ENABLE_COUNTER
8181 MENUITEM "Background Image", IDM_ENABLE_BACKGROUNDIMAGE
82+// >>> add 20180404 yossiepon begin
83+ MENUITEM "Time Indicator", IDM_ENABLE_TIMEINDICATOR
84+ MENUITEM "Grid Box", IDM_ENABLE_GRIDBOX
85+// <<< add 20180404 yossiepon end
8286 MENUITEM SEPARATOR
8387 MENUITEM "Auto save viewpoint", 32838
8488 MENUITEM SEPARATOR
--- a/MIDITrail/MIDITrailApp.cpp
+++ b/MIDITrail/MIDITrailApp.cpp
@@ -76,6 +76,10 @@ MIDITrailApp::MIDITrailApp(void)
7676 m_isEnableCounter = true;
7777 m_isEnableFileName = false;
7878 m_isEnableBackgroundImage = true;
79+// >>> add 20180404 yossiepon begin
80+ m_isEnableTimeIndicator = true;
81+ m_isEnableGridBox = true;
82+// <<< add 20180404 yossiepon end
7983
8084 //シーン種別
8185 m_SceneType = Title;
@@ -683,6 +687,18 @@ LRESULT MIDITrailApp::_WndProcImpl(
683687 result = _OnMenuEnableEffect(MTScene::EffectBackgroundImage);
684688 if (result != 0) goto EXIT;
685689 break;
690+// >>> add 20180404 yossiepon begin
691+ case IDM_ENABLE_TIMEINDICATOR:
692+ //表示効果:タイムインジケータ
693+ result = _OnMenuEnableEffect(MTScene::EffectTimeIndicator);
694+ if (result != 0) goto EXIT;
695+ break;
696+ case IDM_ENABLE_GRIDBOX:
697+ //表示効果:グリッドボックス
698+ result = _OnMenuEnableEffect(MTScene::EffectGridBox);
699+ if (result != 0) goto EXIT;
700+ break;
701+// <<< add 20180404 yossiepon end
686702 case IDM_WINDOWSIZE:
687703 //ウィンドウサイズ設定
688704 result = _OnMenuWindowSize();
@@ -1275,6 +1291,14 @@ int MIDITrailApp::_OnMenuEnableEffect(
12751291 case MTScene::EffectBackgroundImage:
12761292 m_isEnableBackgroundImage = m_isEnableBackgroundImage ? false : true;
12771293 break;
1294+// >>> add 20180404 yossiepon begin
1295+ case MTScene::EffectTimeIndicator:
1296+ m_isEnableTimeIndicator = !m_isEnableTimeIndicator;
1297+ break;
1298+ case MTScene::EffectGridBox:
1299+ m_isEnableGridBox = !m_isEnableGridBox;
1300+ break;
1301+// <<< add 20180404 yossiepon end
12781302 default:
12791303 break;
12801304 }
@@ -2138,7 +2162,10 @@ int MIDITrailApp::_ChangeMenuStyle()
21382162 IDM_ENABLE_PITCHBEND,
21392163 IDM_ENABLE_STARS,
21402164 IDM_ENABLE_COUNTER,
2141- IDM_ENABLE_BACKGROUNDIMAGE,
2165+// >>> add 20180404 yossiepon begin
2166+ IDM_ENABLE_TIMEINDICATOR,
2167+ IDM_ENABLE_GRIDBOX,
2168+// <<< add 20180404 yossiepon end
21422169 IDM_WINDOWSIZE,
21432170 IDM_OPTION_MIDIOUT,
21442171 IDM_OPTION_MIDIIN,
@@ -2178,6 +2205,10 @@ int MIDITrailApp::_ChangeMenuStyle()
21782205 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_STARS
21792206 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_COUNTER
21802207 { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_BACKGROUNDIMAGE
2208+// >>> add 20180404 yossiepon begin
2209+ { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_TIMEINDICATOR
2210+ { MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED, MF_ENABLED }, //IDM_ENABLE_GRIDBOX
2211+// <<< add 20180404 yossiepon end
21812212 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_WINDOWSIZE
21822213 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_OPTION_MIDIOUT
21832214 { MF_ENABLED, MF_ENABLED, MF_GRAYED, MF_GRAYED, MF_ENABLED, MF_GRAYED }, //IDM_OPTION_MIDIIN
@@ -2798,6 +2829,14 @@ int MIDITrailApp::_UpdateMenuCheckmark()
27982829 //背景画像表示
27992830 _CheckMenuItem(IDM_ENABLE_BACKGROUNDIMAGE, m_isEnableBackgroundImage);
28002831
2832+// >>> add 20180404 yossiepon begin
2833+ //タイムインジケータ表示
2834+ _CheckMenuItem(IDM_ENABLE_TIMEINDICATOR, m_isEnableTimeIndicator);
2835+
2836+ //グリッドボックス表示
2837+ _CheckMenuItem(IDM_ENABLE_GRIDBOX, m_isEnableGridBox);
2838+// <<< add 20180404 yossiepon end
2839+
28012840 //自動視点保存
28022841 _CheckMenuItem(IDM_AUTO_SAVE_VIEWPOINT, m_isAutoSaveViewpoint);
28032842
@@ -2840,6 +2879,10 @@ void MIDITrailApp::_UpdateEffect()
28402879 m_pScene->SetEffect(MTScene::EffectCounter, m_isEnableCounter);
28412880 m_pScene->SetEffect(MTScene::EffectFileName, m_isEnableFileName);
28422881 m_pScene->SetEffect(MTScene::EffectBackgroundImage, m_isEnableBackgroundImage);
2882+// >>> add 20180404 yossiepon begin
2883+ m_pScene->SetEffect(MTScene::EffectTimeIndicator, m_isEnableTimeIndicator);
2884+ m_pScene->SetEffect(MTScene::EffectGridBox, m_isEnableGridBox);
2885+// <<< add 20180404 yossiepon end
28432886 }
28442887 return;
28452888 }
--- a/MIDITrail/MIDITrailApp.h
+++ b/MIDITrail/MIDITrailApp.h
@@ -43,9 +43,9 @@ using namespace SMIDILib;
4343 #define WM_FILEPATH_POSTED (WM_USER + 100)
4444
4545 //メニュースタイル制御
46-// >>> modify 20161223 yossiepon begin
47-#define MT_MENU_NUM (32)
48-// <<< modify 20161223 yossiepon end
46+// >>> modify 20180404 yossiepon begin
47+#define MT_MENU_NUM (34)
48+// <<< modify 20180404 yossiepon end
4949 #define MT_PLAYSTATUS_NUM (6)
5050
5151 //デバイスロスト警告メッセージ
@@ -181,6 +181,10 @@ private:
181181 bool m_isEnableCounter;
182182 bool m_isEnableFileName;
183183 bool m_isEnableBackgroundImage;
184+// >>> add 20180404 yossiepon begin
185+ bool m_isEnableTimeIndicator;
186+ bool m_isEnableGridBox;
187+// <<< add 20180404 yossiepon end
184188
185189 //シーン種別
186190 SceneType m_SceneType;
--- a/MIDITrail/MTGridBox.h
+++ b/MIDITrail/MTGridBox.h
@@ -36,11 +36,13 @@ public:
3636 //生成
3737 int Create(LPDIRECT3DDEVICE9 pD3DDevice, const TCHAR* pSceneName, SMSeqData* pSeqData);
3838
39+// >>> modify function to virtual 20180404 yossiepon begin
3940 //更新
40- int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
41+ virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
4142
4243 //描画
43- int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
44+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
45+// <<< modify function to virtual 20180404 yossiepon end
4446
4547 //解放
4648 void Release();
--- a/MIDITrail/MTGridBoxMod.cpp
+++ b/MIDITrail/MTGridBoxMod.cpp
@@ -20,6 +20,7 @@ using namespace YNBaseLib;
2020 //******************************************************************************
2121 MTGridBoxMod::MTGridBoxMod(void)
2222 {
23+ m_isEnable = true;
2324 }
2425
2526 //******************************************************************************
@@ -71,3 +72,31 @@ int MTGridBoxMod::Transform(
7172
7273 return result;
7374 }
75+
76+//******************************************************************************
77+// 描画
78+//******************************************************************************
79+int MTGridBoxMod::Draw(
80+ LPDIRECT3DDEVICE9 pD3DDevice
81+ )
82+{
83+ int result = 0;
84+
85+ if (!m_isEnable) goto EXIT;
86+
87+ result = MTGridBox::Draw(pD3DDevice);
88+ if (result != 0) goto EXIT;
89+
90+EXIT:;
91+ return result;
92+}
93+
94+//******************************************************************************
95+// 表示設定
96+//******************************************************************************
97+void MTGridBoxMod::SetEnable(
98+ bool isEnable
99+ )
100+{
101+ m_isEnable = isEnable;
102+}
--- a/MIDITrail/MTGridBoxMod.h
+++ b/MIDITrail/MTGridBoxMod.h
@@ -27,5 +27,15 @@ public:
2727 //更新
2828 virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
2929
30+ //描画
31+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
32+
33+ //表示設定
34+ void SetEnable(bool isEnable);
35+
36+private:
37+
38+ //表示可否
39+ bool m_isEnable;
3040 };
3141
--- a/MIDITrail/MTScene.h
+++ b/MIDITrail/MTScene.h
@@ -34,7 +34,11 @@ public:
3434 EffectStars,
3535 EffectCounter,
3636 EffectBackgroundImage,
37- EffectFileName
37+ EffectFileName,
38+// >>> add 20180404 yossiepon begin
39+ EffectTimeIndicator,
40+ EffectGridBox,
41+// <<< add 20180404 yossiepon end
3842 };
3943
4044 typedef std::map<std::string, float> MTViewParamMap;
--- a/MIDITrail/MTScenePianoRoll3DMod.cpp
+++ b/MIDITrail/MTScenePianoRoll3DMod.cpp
@@ -388,6 +388,14 @@ void MTScenePianoRoll3DMod::SetEffect(
388388 case EffectBackgroundImage:
389389 m_BackgroundImage.SetEnable(isEnable);
390390 break;
391+// >>> add 20180404 yossiepon begin
392+ case EffectTimeIndicator:
393+ m_TimeIndicator.SetEnable(isEnable);
394+ break;
395+ case EffectGridBox:
396+ m_GridBoxMod.SetEnable(isEnable);
397+ break;
398+// <<< add 20180404 yossiepon end
391399 default:
392400 break;
393401 }
--- a/MIDITrail/MTTimeIndicator.cpp
+++ b/MIDITrail/MTTimeIndicator.cpp
@@ -23,6 +23,9 @@ MTTimeIndicator::MTTimeIndicator(void)
2323 m_CurPos = 0.0f;
2424 m_CurTickTime = 0;
2525 m_isEnableLine = false;
26+// >>> add 20180404 yossiepon begin
27+ m_isEnable = true;
28+// <<< add 20180404 yossiepon end
2629 }
2730
2831 //******************************************************************************
@@ -203,6 +206,12 @@ int MTTimeIndicator::Draw(
203206 {
204207 int result = 0;
205208
209+// >>> add 20180404 yossiepon begin
210+
211+ if (!m_isEnable) goto EXIT;
212+
213+// <<< add 20180404 yossiepon end
214+
206215 // >>> add 20120728 yossiepon begin
207216
208217 //テクスチャステージ設定
@@ -377,3 +386,12 @@ D3DXVECTOR3 MTTimeIndicator::GetMoveVector()
377386 return D3DXVECTOR3(m_CurPos, 0.0f, 0.0f);
378387 }
379388
389+//******************************************************************************
390+// 表示設定
391+//******************************************************************************
392+void MTTimeIndicator::SetEnable(
393+ bool isEnable
394+ )
395+{
396+ m_isEnable = isEnable;
397+}
--- a/MIDITrail/MTTimeIndicator.h
+++ b/MIDITrail/MTTimeIndicator.h
@@ -57,6 +57,11 @@ public:
5757 //移動ベクトル取得
5858 D3DXVECTOR3 GetMoveVector();
5959
60+// >>> add 20180404 yossiepon begin
61+ //表示設定
62+ void SetEnable(bool isEnable);
63+// <<< add 20180404 yossiepon end
64+
6065 private:
6166
6267 DXPrimitive m_Primitive;
@@ -65,6 +70,11 @@ private:
6570 MTNoteDesign m_NoteDesign;
6671 bool m_isEnableLine;
6772
73+// >>> add 20180404 yossiepon begin
74+ //表示可否
75+ bool m_isEnable;
76+// <<< add 20180404 yossiepon end
77+
6878 unsigned long m_CurTickTime;
6979
7080 //頂点バッファ構造体
--- a/MIDITrail/resource.h
+++ b/MIDITrail/resource.h
@@ -68,7 +68,13 @@
6868 #define IDM_ADD_FILE 32837
6969 // <<< add 20120728 yossiepon end
7070 #define IDM_AUTO_SAVE_VIEWPOINT 32838
71+// >>> add 20180404 yossiepon begin
72+#define IDM_ENABLE_GRIDBOX 32839
73+// <<< add 20180404 yossiepon end
7174 #define IDM_VIEW_PIANOROLLRAIN2D 32840
75+// >>> add 20180404 yossiepon begin
76+#define IDM_ENABLE_TIMEINDICATOR 32841
77+// <<< add 20180404 yossiepon end
7278 #define IDM_ENABLE_BACKGROUNDIMAGE 32842
7379 #define IDC_STATIC -1
7480