• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

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


Commit MetaInfo

Revisiónfed44def68a9f2faca90fd0fcea6d86ab4d75296 (tree)
Tiempo2019-12-22 18:26:08
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

[WORKING] PianoRollRingシーンの各種クラスをMod化

Cambiar Resumen

Diferencia incremental

--- a/MIDITrail/MIDITrail.vcxproj
+++ b/MIDITrail/MIDITrail.vcxproj
@@ -197,6 +197,10 @@
197197 <ResourceCompile Include="MIDITrail.rc" />
198198 </ItemGroup>
199199 <ItemGroup>
200+ <ClCompile Include="MTGridRingMod.cpp" />
201+ <ClCompile Include="MTScenePianoRollRingMod.cpp" />
202+ <ClCompile Include="MTTimeIndicatorMod.cpp" />
203+ <ClCompile Include="MTTimeIndicatorRingMod.cpp" />
200204 <ClCompile Include="DIKeyCtrl.cpp" />
201205 <ClCompile Include="DIMouseCtrl.cpp" />
202206 <ClCompile Include="DXCamera.cpp" />
@@ -283,6 +287,10 @@
283287 </ClCompile>
284288 </ItemGroup>
285289 <ItemGroup>
290+ <ClInclude Include="MTGridRingMod.h" />
291+ <ClInclude Include="MTScenePianoRollRingMod.h" />
292+ <ClInclude Include="MTTimeIndicatorMod.h" />
293+ <ClInclude Include="MTTimeIndicatorRingMod.h" />
286294 <ClInclude Include="DIKeyCtrl.h" />
287295 <ClInclude Include="DIMouseCtrl.h" />
288296 <ClInclude Include="DXCamera.h" />
--- a/MIDITrail/MIDITrail.vcxproj.filters
+++ b/MIDITrail/MIDITrail.vcxproj.filters
@@ -242,12 +242,6 @@
242242 <ClCompile Include="MTPianoKeyboardMod.cpp">
243243 <Filter>Sources\SceneObject</Filter>
244244 </ClCompile>
245- <ClCompile Include="MTScenePianoRoll2DMod.cpp">
246- <Filter>Sources\SceneObject</Filter>
247- </ClCompile>
248- <ClCompile Include="MTScenePianoRoll3DMod.cpp">
249- <Filter>Sources\SceneObject</Filter>
250- </ClCompile>
251245 <ClCompile Include="MTNoteLyrics.cpp">
252246 <Filter>Sources\SceneObject</Filter>
253247 </ClCompile>
@@ -287,6 +281,24 @@
287281 <ClCompile Include="MTNoteRippleRingLive.cpp">
288282 <Filter>Sources\SceneObject</Filter>
289283 </ClCompile>
284+ <ClCompile Include="MTScenePianoRoll2DMod.cpp">
285+ <Filter>Sources\Scene</Filter>
286+ </ClCompile>
287+ <ClCompile Include="MTScenePianoRoll3DMod.cpp">
288+ <Filter>Sources\Scene</Filter>
289+ </ClCompile>
290+ <ClCompile Include="MTScenePianoRollRingMod.cpp">
291+ <Filter>Sources\Scene</Filter>
292+ </ClCompile>
293+ <ClCompile Include="MTGridRingMod.cpp">
294+ <Filter>Sources\SceneObject</Filter>
295+ </ClCompile>
296+ <ClCompile Include="MTTimeIndicatorMod.cpp">
297+ <Filter>Sources\SceneObject</Filter>
298+ </ClCompile>
299+ <ClCompile Include="MTTimeIndicatorRingMod.cpp">
300+ <Filter>Sources\SceneObject</Filter>
301+ </ClCompile>
290302 </ItemGroup>
291303 <ItemGroup>
292304 <ClInclude Include="MIDITrailApp.h">
@@ -493,12 +505,6 @@
493505 <ClInclude Include="MTPianoKeyboardMod.h">
494506 <Filter>Sources\SceneObject</Filter>
495507 </ClInclude>
496- <ClInclude Include="MTScenePianoRoll2DMod.h">
497- <Filter>Sources\SceneObject</Filter>
498- </ClInclude>
499- <ClInclude Include="MTScenePianoRoll3DMod.h">
500- <Filter>Sources\SceneObject</Filter>
501- </ClInclude>
502508 <ClInclude Include="MTNoteLyrics.h">
503509 <Filter>Sources\SceneObject</Filter>
504510 </ClInclude>
@@ -538,5 +544,23 @@
538544 <ClInclude Include="MTNoteRippleRingLive.h">
539545 <Filter>Sources\SceneObject</Filter>
540546 </ClInclude>
547+ <ClInclude Include="MTScenePianoRoll2DMod.h">
548+ <Filter>Sources\Scene</Filter>
549+ </ClInclude>
550+ <ClInclude Include="MTScenePianoRoll3DMod.h">
551+ <Filter>Sources\Scene</Filter>
552+ </ClInclude>
553+ <ClInclude Include="MTScenePianoRollRingMod.h">
554+ <Filter>Sources\Scene</Filter>
555+ </ClInclude>
556+ <ClInclude Include="MTGridRingMod.h">
557+ <Filter>Sources\SceneObject</Filter>
558+ </ClInclude>
559+ <ClInclude Include="MTTimeIndicatorMod.h">
560+ <Filter>Sources\SceneObject</Filter>
561+ </ClInclude>
562+ <ClInclude Include="MTTimeIndicatorRingMod.h">
563+ <Filter>Sources\SceneObject</Filter>
564+ </ClInclude>
541565 </ItemGroup>
542566 </Project>
\ No newline at end of file
--- a/MIDITrail/MIDITrailApp.cpp
+++ b/MIDITrail/MIDITrailApp.cpp
@@ -22,7 +22,9 @@
2222 // <<< modify 20120729 yossiepon end
2323 #include "MTScenePianoRollRain.h"
2424 #include "MTScenePianoRollRain2D.h"
25-#include "MTScenePianoRollRing.h"
25+// >>> modify 20191222 yossiepon begin
26+#include "MTScenePianoRollRingMod.h"
27+// <<< modify 20191222 yossiepon end
2628 #include "MTScenePianoRoll3DLive.h"
2729 #include "MTScenePianoRoll2DLive.h"
2830 #include "MTScenePianoRollRainLive.h"
@@ -2550,7 +2552,9 @@ int MIDITrailApp::_CreateScene(
25502552 m_pScene = new MTScenePianoRollRain2D();
25512553 }
25522554 else if (type == PianoRollRing) {
2553- m_pScene = new MTScenePianoRollRing();
2555+ // >>> modify 20191222 yossiepon begin
2556+ m_pScene = new MTScenePianoRollRingMod();
2557+ // <<< modify 20191222 yossiepon end
25542558 }
25552559 }
25562560 //ライブモニタ用シーン生成
--- a/MIDITrail/MTGridBox.h
+++ b/MIDITrail/MTGridBox.h
@@ -36,10 +36,10 @@ public:
3636 //生成
3737 int Create(LPDIRECT3DDEVICE9 pD3DDevice, const TCHAR* pSceneName, SMSeqData* pSeqData);
3838
39-// >>> modify function to virtual 20180404 yossiepon begin
4039 //更新
41- virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
40+ int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
4241
42+// >>> modify function to virtual 20180404 yossiepon begin
4343 //描画
4444 virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
4545 // <<< modify function to virtual 20180404 yossiepon end
--- a/MIDITrail/MTGridBoxMod.cpp
+++ b/MIDITrail/MTGridBoxMod.cpp
@@ -9,11 +9,8 @@
99 //******************************************************************************
1010
1111 #include "StdAfx.h"
12-#include "YNBaseLib.h"
1312 #include "MTGridBoxMod.h"
1413
15-using namespace YNBaseLib;
16-
1714
1815 //******************************************************************************
1916 // コンストラクタ
@@ -31,41 +28,6 @@ MTGridBoxMod::~MTGridBoxMod(void)
3128 }
3229
3330 //******************************************************************************
34-// 移動
35-//******************************************************************************
36-int MTGridBoxMod::Transform(
37- LPDIRECT3DDEVICE9 pD3DDevice,
38- float rollAngle
39- )
40-{
41- int result = 0;
42- D3DXVECTOR3 moveVector;
43- D3DXMATRIX rotateMatrix;
44- D3DXMATRIX moveMatrix;
45- D3DXMATRIX worldMatrix;
46-
47- //行列初期化
48- D3DXMatrixIdentity(&rotateMatrix);
49- D3DXMatrixIdentity(&moveMatrix);
50- D3DXMatrixIdentity(&worldMatrix);
51-
52- //回転行列
53- D3DXMatrixRotationX(&rotateMatrix, D3DXToRadian(rollAngle));
54-
55- //移動行列
56- moveVector = m_NoteDesign.GetWorldMoveVector();
57- D3DXMatrixTranslation(&moveMatrix, moveVector.x, moveVector.y, moveVector.z);
58-
59- //行列の合成
60- D3DXMatrixMultiply(&worldMatrix, &rotateMatrix, &moveMatrix);
61-
62- //変換行列設定
63- m_Primitive.Transform(worldMatrix);
64-
65- return result;
66-}
67-
68-//******************************************************************************
6931 // 描画
7032 //******************************************************************************
7133 int MTGridBoxMod::Draw(
--- a/MIDITrail/MTGridBoxMod.h
+++ b/MIDITrail/MTGridBoxMod.h
@@ -24,9 +24,6 @@ public:
2424 MTGridBoxMod(void);
2525 virtual ~MTGridBoxMod(void);
2626
27- //更新
28- virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice, float rollAngle);
29-
3027 //描画
3128 virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
3229
--- /dev/null
+++ b/MIDITrail/MTGridRingMod.cpp
@@ -0,0 +1,55 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTGridRingMod
4+//
5+// グリッドリング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "MTGridRingMod.h"
13+
14+//******************************************************************************
15+// コンストラクタ
16+//******************************************************************************
17+MTGridRingMod::MTGridRingMod(void)
18+{
19+ m_isEnable = true;
20+}
21+
22+//******************************************************************************
23+// デストラクタ
24+//******************************************************************************
25+MTGridRingMod::~MTGridRingMod(void)
26+{
27+}
28+
29+//******************************************************************************
30+// 描画
31+//******************************************************************************
32+int MTGridRingMod::Draw(
33+ LPDIRECT3DDEVICE9 pD3DDevice
34+ )
35+{
36+ int result = 0;
37+
38+ if (!m_isEnable) goto EXIT;
39+
40+ result = MTGridRing::Draw(pD3DDevice);
41+ if (result != 0) goto EXIT;
42+
43+EXIT:;
44+ return result;
45+}
46+
47+//******************************************************************************
48+// 表示設定
49+//******************************************************************************
50+void MTGridRingMod::SetEnable(
51+ bool isEnable
52+ )
53+{
54+ m_isEnable = isEnable;
55+}
--- /dev/null
+++ b/MIDITrail/MTGridRingMod.h
@@ -0,0 +1,38 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTGridRingMod
4+//
5+// グリッドリング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTGridRing.h"
14+
15+
16+//******************************************************************************
17+// グリッドリング描画Modクラス
18+//******************************************************************************
19+class MTGridRingMod : public MTGridRing
20+{
21+public:
22+
23+ //コンストラクタ/デストラクタ
24+ MTGridRingMod(void);
25+ virtual ~MTGridRingMod(void);
26+
27+ //描画
28+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
29+
30+ //表示設定
31+ void SetEnable(bool isEnable);
32+
33+private:
34+
35+ //表示可否
36+ bool m_isEnable;
37+};
38+
--- a/MIDITrail/MTScenePianoRoll3DMod.cpp
+++ b/MIDITrail/MTScenePianoRoll3DMod.cpp
@@ -85,6 +85,10 @@ int MTScenePianoRoll3DMod::Create(
8585 result = m_NoteLyrics.Create(pD3DDevice, GetName(), pSeqData, &m_NotePitchBend);
8686 if (result != 0) goto EXIT;
8787
88+ //タイムインジケータ生成
89+ result = m_TimeIndicatorMod.Create(pD3DDevice, GetName(), pSeqData);
90+ if (result != 0) goto EXIT;
91+
8892 //ピクチャボード無効
8993 m_PictBoard.SetEnable(false);
9094
@@ -125,6 +129,10 @@ int MTScenePianoRoll3DMod::Transform(
125129 result = m_NoteBoxMod.Transform(pD3DDevice, rollAngle);
126130 if (result != 0) goto EXIT;
127131
132+ //タイムインジケータ更新
133+ result = m_TimeIndicatorMod.Transform(pD3DDevice, camVector, rollAngle);
134+ if (result != 0) goto EXIT;
135+
128136 //ノート波紋更新
129137 result = m_NoteRippleMod.Transform(pD3DDevice, camVector, rollAngle);
130138 if (result != 0) goto EXIT;
@@ -189,7 +197,7 @@ int MTScenePianoRoll3DMod::Draw(
189197 if (result != 0) goto EXIT;
190198
191199 //タイムインジケータ描画
192- result = m_TimeIndicator.Draw(pD3DDevice);
200+ result = m_TimeIndicatorMod.Draw(pD3DDevice);
193201 if (result != 0) goto EXIT;
194202
195203 //ノート歌詞描画
@@ -221,7 +229,7 @@ int MTScenePianoRoll3DMod::Draw(
221229 if (result != 0) goto EXIT;
222230
223231 //タイムインジケータ描画
224- result = m_TimeIndicator.Draw(pD3DDevice);
232+ result = m_TimeIndicatorMod.Draw(pD3DDevice);
225233 if (result != 0) goto EXIT;
226234
227235 //メッシュ描画
@@ -280,7 +288,7 @@ int MTScenePianoRoll3DMod::OnRecvSequencerMsg(
280288 else if (parser.GetMsg() == SMMsgParser::MsgPlayTime) {
281289 m_Dashboard.SetPlayTimeMSec(parser.GetPlayTimeMSec());
282290 m_FirstPersonCam.SetCurTickTime(parser.GetPlayTickTime());
283- m_TimeIndicator.SetCurTickTime(parser.GetPlayTickTime());
291+ m_TimeIndicatorMod.SetCurTickTime(parser.GetPlayTickTime());
284292 m_NoteRippleMod.SetPlayTimeMSec(parser.GetPlayTimeMSec());
285293 m_NoteRippleMod.SetCurTickTime(parser.GetPlayTickTime());
286294 m_PictBoard.SetCurTickTime(parser.GetPlayTickTime());
@@ -373,30 +381,14 @@ void MTScenePianoRoll3DMod::SetEffect(
373381 m_NoteRippleMod.SetEnable(isEnable);
374382 m_NoteLyrics.SetEnable(isEnable);
375383 break;
376- case EffectPitchBend:
377- m_NotePitchBend.SetEnable(isEnable);
378- break;
379- case EffectStars:
380- m_Stars.SetEnable(isEnable);
381- break;
382- case EffectCounter:
383- m_Dashboard.SetEnable(isEnable);
384- break;
385- case EffectFileName:
386- m_Dashboard.SetEnableFileName(isEnable);
387- break;
388- case EffectBackgroundImage:
389- m_BackgroundImage.SetEnable(isEnable);
390- break;
391-// >>> add 20180404 yossiepon begin
392384 case EffectTimeIndicator:
393- m_TimeIndicator.SetEnable(isEnable);
385+ m_TimeIndicatorMod.SetEnable(isEnable);
394386 break;
395387 case EffectGridBox:
396388 m_GridBoxMod.SetEnable(isEnable);
397389 break;
398-// <<< add 20180404 yossiepon end
399390 default:
391+ MTScenePianoRoll3D::SetEffect(type, isEnable);
400392 break;
401393 }
402394
--- a/MIDITrail/MTScenePianoRoll3DMod.h
+++ b/MIDITrail/MTScenePianoRoll3DMod.h
@@ -15,6 +15,7 @@
1515 #include "MTNoteBoxMod.h"
1616 #include "MTNoteRippleMod.h"
1717 #include "MTNoteLyrics.h"
18+#include "MTTimeIndicatorMod.h"
1819 #include "MTPianoKeyboardCtrlMod.h"
1920
2021 //******************************************************************************
@@ -70,6 +71,7 @@ private:
7071 MTNoteBoxMod m_NoteBoxMod;
7172 MTNoteRippleMod m_NoteRippleMod;
7273 MTNoteLyrics m_NoteLyrics;
74+ MTTimeIndicatorMod m_TimeIndicatorMod;
7375 MTPianoKeyboardCtrlMod m_PianoKeyboardCtrlMod;
7476
7577 };
--- a/MIDITrail/MTScenePianoRollRing.h
+++ b/MIDITrail/MTScenePianoRollRing.h
@@ -41,7 +41,9 @@ public:
4141
4242 //コンストラクタ/デストラクタl
4343 MTScenePianoRollRing();
44- ~MTScenePianoRollRing();
44+ // >>> modify 20191222 yossiepon begin
45+ virtual ~MTScenePianoRollRing();
46+ // <<< modify 20191222 yossiepon end
4547
4648 //名称取得
4749 const TCHAR* GetName();
@@ -54,13 +56,19 @@ public:
5456 );
5557
5658 //変換
57- int Transform(LPDIRECT3DDEVICE9 pD3DDevice);
59+ // >>> modify 20191222 yossiepon begin
60+ virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice);
61+ // <<< modify 20191222 yossiepon end
5862
5963 //描画
60- int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
64+ // >>> modify 20191222 yossiepon begin
65+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
66+ // <<< modify 20191222 yossiepon end
6167
6268 //破棄
63- void Release();
69+ // >>> modify 20191222 yossiepon begin
70+ virtual void Release();
71+ // <<< modify 20191222 yossiepon end
6472
6573 //ウィンドウクリックイベント受信
6674 int OnWindowClicked(
@@ -76,7 +84,9 @@ public:
7684 int OnPlayEnd(LPDIRECT3DDEVICE9 pD3DDevice);
7785
7886 //シーケンサメッセージ受信
79- int OnRecvSequencerMsg(
87+ // >>> modify 20191222 yossiepon begin
88+ virtual int OnRecvSequencerMsg(
89+ // <<< modify 20191222 yossiepon end
8090 unsigned long param1,
8191 unsigned long param2
8292 );
@@ -91,10 +101,14 @@ public:
91101 void MoveToStaticViewpoint(unsigned long viewpointNo);
92102
93103 //視点リセット
104+ // >>> modify 20191222 yossiepon begin
94105 void ResetViewpoint();
106+ // <<< modify 20191222 yossiepon end
95107
96108 //エフェクト設定
97- void SetEffect(MTScene::EffectType type, bool isEnable);
109+ // >>> modify 20191222 yossiepon begin
110+ virtual void SetEffect(MTScene::EffectType type, bool isEnable);
111+ // <<< modify 20191222 yossiepon end
98112
99113 //演奏速度設定
100114 void SetPlaySpeedRatio(unsigned long ratio);
@@ -104,7 +118,9 @@ protected:
104118 //ライト有無
105119 BOOL m_IsEnableLight;
106120
107-private:
121+// >>> modify access level to protected 20191222 yossiepon begin
122+//private:
123+// <<< modify 20191222 yossiepon end
108124
109125 //ライト
110126 DXDirLight m_DirLight;
@@ -141,7 +157,11 @@ private:
141157 //スキップ状態
142158 bool m_IsSkipping;
143159
144- void _Reset();
160+ //シーンリセット
161+ // >>> modify 20191222 yossiepon begin
162+ virtual void _Reset();
163+ // <<< modify 20191222 yossiepon end
164+
145165 void _SetLightColor(DXDirLight* pLight);
146166 int _LoadConf();
147167 int _LoadConfViewpoint(MTConfFile* pConfFile, unsigned long viewpointNo, MTScene::MTViewParamMap* pParamMap);
--- /dev/null
+++ b/MIDITrail/MTScenePianoRollRingMod.cpp
@@ -0,0 +1,307 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTScenePianoRollRingMod
4+//
5+// ピアノロールリングシーン描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "stdafx.h"
12+#include <windows.h>
13+#include <mmsystem.h>
14+#include "Commdlg.h"
15+#include "YNBaseLib.h"
16+#include "DXColorUtil.h"
17+#include "MTConfFile.h"
18+#include "MTScenePianoRollRingMod.h"
19+
20+using namespace YNBaseLib;
21+
22+
23+//******************************************************************************
24+// コンストラクタ
25+//******************************************************************************
26+MTScenePianoRollRingMod::MTScenePianoRollRingMod()
27+{
28+}
29+
30+//******************************************************************************
31+// デストラクタ
32+//******************************************************************************
33+MTScenePianoRollRingMod::~MTScenePianoRollRingMod()
34+{
35+ Release();
36+}
37+
38+//******************************************************************************
39+// 名称取得
40+//******************************************************************************
41+const TCHAR* MTScenePianoRollRingMod::GetName()
42+{
43+ return _T("PianoRollRing");
44+}
45+
46+//******************************************************************************
47+// シーン生成
48+//******************************************************************************
49+int MTScenePianoRollRingMod::Create(
50+ HWND hWnd,
51+ LPDIRECT3DDEVICE9 pD3DDevice,
52+ SMSeqData* pSeqData
53+ )
54+{
55+ int result = 0;
56+
57+ Release();
58+
59+ //基底クラスのシーン生成処理を呼び出す
60+ result = MTScenePianoRollRing::Create(hWnd, pD3DDevice, pSeqData);
61+ if (result != 0) goto EXIT;
62+
63+ //----------------------------------
64+ // 描画オブジェクト
65+ //----------------------------------
66+ //ノート波紋生成
67+ result = m_NoteRippleMod.Create(pD3DDevice, GetName(), pSeqData, &m_NotePitchBend);
68+ if (result != 0) goto EXIT;
69+
70+ //グリッドリング生成
71+ result = m_GridRingMod.Create(pD3DDevice, GetName(), pSeqData);
72+ if (result != 0) goto EXIT;
73+
74+ //タイムインジケータ生成
75+ result = m_TimeIndicatorMod.Create(pD3DDevice, GetName(), pSeqData);
76+ if (result != 0) goto EXIT;
77+
78+EXIT:;
79+ return result;
80+}
81+
82+//******************************************************************************
83+// 変換処理
84+//******************************************************************************
85+int MTScenePianoRollRingMod::Transform(
86+ LPDIRECT3DDEVICE9 pD3DDevice
87+ )
88+{
89+ int result = 0;
90+ float rollAngle = 0.0f;
91+ D3DXVECTOR3 camVector;
92+
93+ //基底クラスの変換処理を呼び出す
94+ result = MTScenePianoRollRing::Transform(pD3DDevice);
95+ if (result != 0) goto EXIT;
96+
97+ //カメラ座標取得
98+ m_FirstPersonCam.GetPosition(&camVector);
99+
100+ //回転角度取得
101+ rollAngle = m_FirstPersonCam.GetManualRollAngle();
102+
103+ //グリッドリング更新
104+ result = m_GridRingMod.Transform(pD3DDevice, rollAngle);
105+ if (result != 0) goto EXIT;
106+
107+ //タイムインジケータ更新
108+ result = m_TimeIndicatorMod.Transform(pD3DDevice, camVector, rollAngle);
109+ if (result != 0) goto EXIT;
110+
111+ //ノート波紋更新
112+ result = m_NoteRippleMod.Transform(pD3DDevice, camVector, rollAngle);
113+ if (result != 0) goto EXIT;
114+
115+EXIT:;
116+ return result;
117+}
118+
119+//******************************************************************************
120+// 描画
121+//******************************************************************************
122+int MTScenePianoRollRingMod::Draw(
123+ LPDIRECT3DDEVICE9 pD3DDevice
124+ )
125+{
126+ int result = 0;
127+
128+ if (pD3DDevice == NULL) {
129+ result = YN_SET_ERR("Program error.", 0, 0);
130+ goto EXIT;
131+ }
132+
133+ //更新
134+ result = Transform(pD3DDevice);
135+ if (result != 0) goto EXIT;
136+
137+ //背景画像描画
138+ result = m_BackgroundImage.Draw(pD3DDevice);
139+ if (result != 0) goto EXIT;
140+
141+ //グリッドリング描画
142+ result = m_GridRingMod.Draw(pD3DDevice);
143+ if (result != 0) goto EXIT;
144+
145+ //ノートボックス描画
146+ result = m_NoteBox.Draw(pD3DDevice);
147+ if (result != 0) goto EXIT;
148+
149+ //ピクチャボード描画
150+ result = m_PictBoard.Draw(pD3DDevice);
151+ if (result != 0) goto EXIT;
152+
153+ //星描画
154+ result = m_Stars.Draw(pD3DDevice);
155+ if (result != 0) goto EXIT;
156+
157+ //メッシュ描画
158+ result = m_MeshCtrl.Draw(pD3DDevice);
159+ if (result != 0) goto EXIT;
160+
161+ //タイムインジケータ描画
162+ result = m_TimeIndicatorMod.Draw(pD3DDevice);
163+ if (result != 0) goto EXIT;
164+
165+ //ノート波紋描画
166+ result = m_NoteRippleMod.Draw(pD3DDevice);
167+ if (result != 0) goto EXIT;
168+
169+ //ダッシュボード描画:座標変換済み頂点を用いるため一番最後に描画する
170+ result = m_Dashboard.Draw(pD3DDevice);
171+ if (result != 0) goto EXIT;
172+
173+EXIT:;
174+ return result;
175+}
176+
177+//******************************************************************************
178+// 破棄
179+//******************************************************************************
180+void MTScenePianoRollRingMod::Release()
181+{
182+ m_GridRingMod.Release();
183+ m_TimeIndicatorMod.Release();
184+ m_NoteRippleMod.Release();
185+
186+ MTScenePianoRollRing::Release();
187+}
188+
189+//******************************************************************************
190+// シーケンサメッセージ受信
191+//******************************************************************************
192+int MTScenePianoRollRingMod::OnRecvSequencerMsg(
193+ unsigned long param1,
194+ unsigned long param2
195+)
196+{
197+ int result = 0;
198+ SMMsgParser parser;
199+
200+ parser.Parse(param1, param2);
201+
202+ //演奏状態通知
203+ if (parser.GetMsg() == SMMsgParser::MsgPlayStatus) {
204+ if (parser.GetPlayStatus() == SMMsgParser::StatusStop) {
205+ //停止(終了)
206+ }
207+ else if (parser.GetPlayStatus() == SMMsgParser::StatusPlay) {
208+ //演奏
209+ }
210+ else if (parser.GetPlayStatus() == SMMsgParser::StatusPause) {
211+ //一時停止
212+ }
213+ }
214+ //演奏チックタイム通知
215+ else if (parser.GetMsg() == SMMsgParser::MsgPlayTime) {
216+ m_Dashboard.SetPlayTimeSec(parser.GetPlayTimeSec());
217+ m_FirstPersonCam.SetCurTickTime(parser.GetPlayTickTime());
218+ m_TimeIndicatorMod.SetCurTickTime(parser.GetPlayTickTime());
219+ m_NoteRippleMod.SetCurTickTime(parser.GetPlayTickTime());
220+ m_PictBoard.SetCurTickTime(parser.GetPlayTickTime());
221+ m_NoteBox.SetCurTickTime(parser.GetPlayTickTime());
222+ }
223+ //テンポ変更通知
224+ else if (parser.GetMsg() == SMMsgParser::MsgTempo) {
225+ m_Dashboard.SetTempoBPM(parser.GetTempoBPM());
226+ }
227+ //小節番号通知
228+ else if (parser.GetMsg() == SMMsgParser::MsgBar) {
229+ m_Dashboard.SetBarNo(parser.GetBarNo());
230+ }
231+ //拍子記号変更通知
232+ else if (parser.GetMsg() == SMMsgParser::MsgBeat) {
233+ m_Dashboard.SetBeat(parser.GetBeatNumerator(), parser.GetBeatDenominator());
234+ }
235+ //ノートOFF通知
236+ else if (parser.GetMsg() == SMMsgParser::MsgNoteOff) {
237+ m_NoteRippleMod.SetNoteOff(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo());
238+ }
239+ //ノートON通知
240+ else if (parser.GetMsg() == SMMsgParser::MsgNoteOn) {
241+ m_Dashboard.SetNoteOn();
242+ m_NoteRippleMod.SetNoteOn(parser.GetPortNo(), parser.GetChNo(), parser.GetNoteNo(), parser.GetVelocity());
243+ }
244+ //ピッチベンド通知
245+ else if (parser.GetMsg() == SMMsgParser::MsgPitchBend) {
246+ m_NotePitchBend.SetPitchBend(parser.GetPortNo(), parser.GetChNo(), parser.GetPitchBendValue(), parser.GetPitchBendSensitivity());
247+ }
248+ //スキップ開始通知
249+ else if (parser.GetMsg() == SMMsgParser::MsgSkipStart) {
250+ if (parser.GetSkipStartDirection() == SMMsgParser::SkipBack) {
251+ m_NotePitchBend.Reset();
252+ }
253+ m_NoteBox.Reset();
254+ m_NoteBox.SetSkipStatus(true);
255+ m_NoteRippleMod.Reset();
256+ m_NoteRippleMod.SetSkipStatus(true);
257+ m_IsSkipping = true;
258+ }
259+ //スキップ終了通知
260+ else if (parser.GetMsg() == SMMsgParser::MsgSkipEnd) {
261+ m_Dashboard.SetNotesCount(parser.GetSkipEndNotesCount());
262+ m_NoteBox.SetSkipStatus(false);
263+ m_NoteRippleMod.SetSkipStatus(false);
264+ m_IsSkipping = false;
265+ }
266+
267+ //EXIT:;
268+ return result;
269+}
270+
271+//******************************************************************************
272+// リセット
273+//******************************************************************************
274+void MTScenePianoRollRingMod::_Reset()
275+{
276+ MTScenePianoRollRing::_Reset();
277+
278+ m_TimeIndicatorMod.Reset();
279+ m_NoteRippleMod.Reset();
280+}
281+
282+//******************************************************************************
283+// 表示効果設定
284+//******************************************************************************
285+void MTScenePianoRollRingMod::SetEffect(
286+ MTScene::EffectType type,
287+ bool isEnable
288+ )
289+{
290+ switch (type) {
291+ case EffectRipple:
292+ m_NoteRippleMod.SetEnable(isEnable);
293+ break;
294+ case EffectTimeIndicator:
295+ m_TimeIndicatorMod.SetEnable(isEnable);
296+ break;
297+ case EffectGridBox:
298+ m_GridRingMod.SetEnable(isEnable);
299+ break;
300+ default:
301+ MTScenePianoRollRing::SetEffect(type, isEnable);
302+ break;
303+ }
304+
305+ return;
306+}
307+
--- /dev/null
+++ b/MIDITrail/MTScenePianoRollRingMod.h
@@ -0,0 +1,72 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTScenePianoRollRingMod
4+//
5+// ピアノロールリングシーン描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTGridRingMod.h"
14+#include "MTTimeIndicatorRingMod.h"
15+#include "MTScenePianoRollRing.h"
16+
17+using namespace SMIDILib;
18+
19+
20+//******************************************************************************
21+// ピアノロールリングシーン描画Modクラス
22+//******************************************************************************
23+class MTScenePianoRollRingMod : public MTScenePianoRollRing
24+{
25+public:
26+
27+ //コンストラクタ/デストラクタl
28+ MTScenePianoRollRingMod();
29+ virtual ~MTScenePianoRollRingMod();
30+
31+ //名称取得
32+ const TCHAR* GetName();
33+
34+ //生成
35+ virtual int Create(
36+ HWND hWnd,
37+ LPDIRECT3DDEVICE9 pD3DDevice,
38+ SMSeqData* pSeqData
39+ );
40+
41+ //変換
42+ virtual int Transform(LPDIRECT3DDEVICE9 pD3DDevice);
43+
44+ //描画
45+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
46+
47+ //破棄
48+ virtual void Release();
49+
50+ //シーケンサメッセージ受信
51+ virtual int OnRecvSequencerMsg(
52+ unsigned long param1,
53+ unsigned long param2
54+ );
55+
56+ //エフェクト設定
57+ virtual void SetEffect(MTScene::EffectType type, bool isEnable);
58+
59+protected:
60+
61+ //描画オブジェクト
62+ MTNoteRippleRing m_NoteRippleMod;
63+ MTGridRingMod m_GridRingMod;
64+ MTTimeIndicatorRingMod m_TimeIndicatorMod;
65+
66+ //シーンリセット
67+ virtual void _Reset();
68+
69+private:
70+
71+};
72+
--- a/MIDITrail/MTTimeIndicator.cpp
+++ b/MIDITrail/MTTimeIndicator.cpp
@@ -23,9 +23,6 @@ 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
2926 }
3027
3128 //******************************************************************************
@@ -206,12 +203,6 @@ int MTTimeIndicator::Draw(
206203 {
207204 int result = 0;
208205
209-// >>> add 20180404 yossiepon begin
210-
211- if (!m_isEnable) goto EXIT;
212-
213-// <<< add 20180404 yossiepon end
214-
215206 //テクスチャステージ設定
216207 // カラー演算:引数1を使用 引数1:テクスチャ
217208 pD3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
@@ -393,12 +384,3 @@ D3DXVECTOR3 MTTimeIndicator::GetMoveVector()
393384 return D3DXVECTOR3(m_CurPos, 0.0f, 0.0f);
394385 }
395386
396-//******************************************************************************
397-// 表示設定
398-//******************************************************************************
399-void MTTimeIndicator::SetEnable(
400- bool isEnable
401- )
402-{
403- m_isEnable = isEnable;
404-}
--- a/MIDITrail/MTTimeIndicator.h
+++ b/MIDITrail/MTTimeIndicator.h
@@ -57,11 +57,6 @@ public:
5757 //移動ベクトル取得
5858 D3DXVECTOR3 GetMoveVector();
5959
60-// >>> add 20180404 yossiepon begin
61- //表示設定
62- void SetEnable(bool isEnable);
63-// <<< add 20180404 yossiepon end
64-
6560 private:
6661
6762 DXPrimitive m_Primitive;
@@ -70,11 +65,6 @@ private:
7065 MTNoteDesign m_NoteDesign;
7166 bool m_isEnableLine;
7267
73-// >>> add 20180404 yossiepon begin
74- //表示可否
75- bool m_isEnable;
76-// <<< add 20180404 yossiepon end
77-
7868 unsigned long m_CurTickTime;
7969
8070 //頂点バッファ構造体
--- /dev/null
+++ b/MIDITrail/MTTimeIndicatorMod.cpp
@@ -0,0 +1,55 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTTimeIndicatorMod
4+//
5+// タイムインジケータ描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "MTTimeIndicatorMod.h"
13+
14+//******************************************************************************
15+// コンストラクタ
16+//******************************************************************************
17+MTTimeIndicatorMod::MTTimeIndicatorMod(void)
18+{
19+ m_isEnable = true;
20+}
21+
22+//******************************************************************************
23+// デストラクタ
24+//******************************************************************************
25+MTTimeIndicatorMod::~MTTimeIndicatorMod(void)
26+{
27+}
28+
29+//******************************************************************************
30+// 描画
31+//******************************************************************************
32+int MTTimeIndicatorMod::Draw(
33+ LPDIRECT3DDEVICE9 pD3DDevice
34+ )
35+{
36+ int result = 0;
37+
38+ if (!m_isEnable) goto EXIT;
39+
40+ result = MTTimeIndicator::Draw(pD3DDevice);
41+ if (result != 0) goto EXIT;
42+
43+EXIT:;
44+ return result;
45+}
46+
47+//******************************************************************************
48+// 表示設定
49+//******************************************************************************
50+void MTTimeIndicatorMod::SetEnable(
51+ bool isEnable
52+ )
53+{
54+ m_isEnable = isEnable;
55+}
--- /dev/null
+++ b/MIDITrail/MTTimeIndicatorMod.h
@@ -0,0 +1,38 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTTimeIndicatorMod
4+//
5+// タイムインジケータ描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTTimeIndicator.h"
14+
15+
16+//******************************************************************************
17+// タイムインジケータ描画Modクラス
18+//******************************************************************************
19+class MTTimeIndicatorMod : public MTTimeIndicator
20+{
21+public:
22+
23+ //コンストラクタ/デストラクタ
24+ MTTimeIndicatorMod(void);
25+ virtual ~MTTimeIndicatorMod(void);
26+
27+ //描画
28+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
29+
30+ //表示設定
31+ void SetEnable(bool isEnable);
32+
33+private:
34+
35+ //表示可否
36+ bool m_isEnable;
37+};
38+
--- /dev/null
+++ b/MIDITrail/MTTimeIndicatorRingMod.cpp
@@ -0,0 +1,55 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTTimeIndicatorRingMod
4+//
5+// タイムインジケータリング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "MTTimeIndicatorRingMod.h"
13+
14+//******************************************************************************
15+// コンストラクタ
16+//******************************************************************************
17+MTTimeIndicatorRingMod::MTTimeIndicatorRingMod(void)
18+{
19+ m_isEnable = true;
20+}
21+
22+//******************************************************************************
23+// デストラクタ
24+//******************************************************************************
25+MTTimeIndicatorRingMod::~MTTimeIndicatorRingMod(void)
26+{
27+}
28+
29+//******************************************************************************
30+// 描画
31+//******************************************************************************
32+int MTTimeIndicatorRingMod::Draw(
33+ LPDIRECT3DDEVICE9 pD3DDevice
34+ )
35+{
36+ int result = 0;
37+
38+ if (!m_isEnable) goto EXIT;
39+
40+ result = MTTimeIndicatorRing::Draw(pD3DDevice);
41+ if (result != 0) goto EXIT;
42+
43+EXIT:;
44+ return result;
45+}
46+
47+//******************************************************************************
48+// 表示設定
49+//******************************************************************************
50+void MTTimeIndicatorRingMod::SetEnable(
51+ bool isEnable
52+ )
53+{
54+ m_isEnable = isEnable;
55+}
--- /dev/null
+++ b/MIDITrail/MTTimeIndicatorRingMod.h
@@ -0,0 +1,38 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTTimeIndicatorRingMod
4+//
5+// タイムインジケータリング描画Modクラス
6+//
7+// Copyright (C) 2019 Yossiepon Oniichan. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTTimeIndicatorRing.h"
14+
15+
16+//******************************************************************************
17+// タイムインジケータリング描画Modクラス
18+//******************************************************************************
19+class MTTimeIndicatorRingMod : public MTTimeIndicatorRing
20+{
21+public:
22+
23+ //コンストラクタ/デストラクタ
24+ MTTimeIndicatorRingMod(void);
25+ virtual ~MTTimeIndicatorRingMod(void);
26+
27+ //描画
28+ virtual int Draw(LPDIRECT3DDEVICE9 pD3DDevice);
29+
30+ //表示設定
31+ void SetEnable(bool isEnable);
32+
33+private:
34+
35+ //表示可否
36+ bool m_isEnable;
37+};
38+