• 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ón26a3ab7d7eccf2b576bdf1accfe79877ae36c382 (tree)
Tiempo2019-12-22 14:32:23
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

Merge branch 'merge_org_131' into develop

Cambiar Resumen

Diferencia incremental

--- a/MIDITrail/MIDITrail.vcxproj
+++ b/MIDITrail/MIDITrail.vcxproj
@@ -246,6 +246,7 @@
246246 <ClCompile Include="MTNoteRipple.cpp" />
247247 <ClCompile Include="MTNoteRippleMod.cpp" />
248248 <ClCompile Include="MTNoteRippleRing.cpp" />
249+ <ClCompile Include="MTNoteRippleRingLive.cpp" />
249250 <ClCompile Include="MTPianoKeyboard.cpp" />
250251 <ClCompile Include="MTPianoKeyboardCtrl.cpp" />
251252 <ClCompile Include="MTPianoKeyboardCtrlLive.cpp" />
@@ -332,6 +333,7 @@
332333 <ClInclude Include="MTNoteRipple.h" />
333334 <ClInclude Include="MTNoteRippleMod.h" />
334335 <ClInclude Include="MTNoteRippleRing.h" />
336+ <ClInclude Include="MTNoteRippleRingLive.h" />
335337 <ClInclude Include="MTParam.h" />
336338 <ClInclude Include="MTPianoKeyboard.h" />
337339 <ClInclude Include="MTPianoKeyboardCtrl.h" />
--- a/MIDITrail/MIDITrail.vcxproj.filters
+++ b/MIDITrail/MIDITrail.vcxproj.filters
@@ -284,6 +284,9 @@
284284 <ClCompile Include="DXH.cpp">
285285 <Filter>Sources\DirectXUtility</Filter>
286286 </ClCompile>
287+ <ClCompile Include="MTNoteRippleRingLive.cpp">
288+ <Filter>Sources\SceneObject</Filter>
289+ </ClCompile>
287290 </ItemGroup>
288291 <ItemGroup>
289292 <ClInclude Include="MIDITrailApp.h">
@@ -532,5 +535,8 @@
532535 <ClInclude Include="DXH.h">
533536 <Filter>Sources\DirectXUtility</Filter>
534537 </ClInclude>
538+ <ClInclude Include="MTNoteRippleRingLive.h">
539+ <Filter>Sources\SceneObject</Filter>
540+ </ClInclude>
535541 </ItemGroup>
536542 </Project>
\ No newline at end of file
--- a/MIDITrail/MIDITrailApp.cpp
+++ b/MIDITrail/MIDITrailApp.cpp
@@ -2307,12 +2307,18 @@ int MIDITrailApp::_ChangeWindowSize()
23072307 {
23082308 int result = 0;
23092309 bool isMonitor = false;
2310+ MTScene::MTViewParamMap viewParamMap;
23102311
23112312 //モニタ状態の確認
23122313 if ((m_PlayStatus == MonitorOFF) || (m_PlayStatus == MonitorON)) {
23132314 isMonitor = true;
23142315 }
23152316
2317+ //現在の視点を退避
2318+ if (m_pScene != NULL) {
2319+ m_pScene->GetViewParam(&viewParamMap);
2320+ }
2321+
23162322 //シーン破棄
23172323 if (m_pScene != NULL) {
23182324 m_pScene->Release();
@@ -2343,6 +2349,11 @@ int MIDITrailApp::_ChangeWindowSize()
23432349 if (result != 0) goto EXIT;
23442350 }
23452351
2352+ //視点を復帰
2353+ if (m_pScene != NULL) {
2354+ m_pScene->SetViewParam(&viewParamMap);
2355+ }
2356+
23462357 EXIT:;
23472358 return result;
23482359 }
--- a/MIDITrail/MIDITrailVersion.h
+++ b/MIDITrail/MIDITrailVersion.h
@@ -17,8 +17,8 @@
1717
1818 //バージョン文字列
1919 // >>> modify 20191219 yossiepon begin
20-#define MIDITRAIL_VERSION_STRING_X86 _T("1.3.0 (x86), mod. yossiepon_20191219")
21-#define MIDITRAIL_VERSION_STRING_X64 _T("1.3.0 (x64), mod. yossiepon_20191219")
20+#define MIDITRAIL_VERSION_STRING_X86 _T("1.3.1 (x86), mod. yossiepon_20191219")
21+#define MIDITRAIL_VERSION_STRING_X64 _T("1.3.1 (x64), mod. yossiepon_20191219")
2222 // <<< modify 20191219 yossiepon end
2323
2424 //コピーライト
--- a/MIDITrail/MTHowToViewDlg.cpp
+++ b/MIDITrail/MTHowToViewDlg.cpp
@@ -4,7 +4,7 @@
44 //
55 // 操作方法ダイアログ
66 //
7-// Copyright (C) 2010-2014 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -186,6 +186,7 @@ int MTHowToViewDlg::_LoadHowToBmp()
186186 BYTE* pBmpPixcel = NULL;
187187 TCHAR bmpFilePath[_MAX_PATH] = {_T('\0')};
188188 TCHAR* pBmpFileName[3] = { MT_IMGFILE_HOWTOVIEW1, MT_IMGFILE_HOWTOVIEW2, MT_IMGFILE_HOWTOVIEW3 };
189+ DWORD bmpPixelDataSize = 0;
189190
190191 _Clear();
191192
@@ -225,9 +226,9 @@ int MTHowToViewDlg::_LoadHowToBmp()
225226 //BMPファイルヘッダ読み込み
226227 bresult = ReadFile(
227228 hFile, //ファイルハンドル
228- (LPBITMAPFILEHEADER)&m_BmpHead, //バッファ位置
229- sizeof(BITMAPFILEHEADER), //バッファサイズ
230- &numOfBytesRead, //読み取りサイズ
229+ &m_BmpHead, //バッファ位置
230+ sizeof(BITMAPFILEHEADER), //読み取りサイズ
231+ &numOfBytesRead, //読み取ったサイズ
231232 NULL //オーバーラップ構造体バッファ
232233 );
233234 if (!bresult) {
@@ -247,9 +248,9 @@ int MTHowToViewDlg::_LoadHowToBmp()
247248 //BMP情報ヘッダ読み込み
248249 bresult = ReadFile(
249250 hFile, //ファイルハンドル
250- (LPBITMAPINFOHEADER)&m_BmpInfo, //バッファ位置
251- sizeof(BITMAPINFOHEADER), //バッファサイズ
252- &numOfBytesRead, //読み取りサイズ
251+ &m_BmpInfo, //バッファ位置
252+ sizeof(BITMAPINFOHEADER), //読み取りサイズ
253+ &numOfBytesRead, //読み取ったサイズ
253254 NULL //オーバーラップ構造体バッファ
254255 );
255256 if (!bresult) {
@@ -258,6 +259,7 @@ int MTHowToViewDlg::_LoadHowToBmp()
258259 }
259260
260261 //24bit画像以外は読みません
262+ //カラーテーブルが存在しないことを前提とする
261263 if ((m_BmpInfo.biBitCount != 24) || (m_BmpInfo.biClrUsed != 0)) {
262264 result = YN_SET_ERR("Invalid BMP file.", m_BmpInfo.biBitCount, m_BmpInfo.biClrUsed);
263265 goto EXIT;
@@ -278,8 +280,12 @@ int MTHowToViewDlg::_LoadHowToBmp()
278280 goto EXIT;
279281 }
280282
283+ //BMPピクセルデータサイズ
284+ //カラーテーブルが存在しないことを前提とする
285+ bmpPixelDataSize = m_BmpHead.bfSize - sizeof(BITMAPFILEHEADER) - sizeof(BITMAPINFOHEADER);
286+
281287 //ピクセルデータ読み込み用メモリ確保
282- hMemBmpPixel = GlobalAlloc(GHND, m_BmpHead.bfSize);
288+ hMemBmpPixel = GlobalAlloc(GHND, bmpPixelDataSize);
283289 if (hMemBmpPixel == NULL) {
284290 result = YN_SET_ERR("Could not allocate memory.", 0, 0);
285291 goto EXIT;
@@ -294,8 +300,8 @@ int MTHowToViewDlg::_LoadHowToBmp()
294300 bresult = ReadFile(
295301 hFile, //ファイルハンドル
296302 pBmpPixcel, //バッファ位置
297- m_BmpHead.bfSize, //バッファサイズ
298- &numOfBytesRead, //読み取りサイズ
303+ bmpPixelDataSize, //読み取りサイズ
304+ &numOfBytesRead, //読み取ったサイズ
299305 NULL //オーバーラップ構造体バッファ
300306 );
301307 if (!bresult) {
@@ -370,7 +376,7 @@ EXIT:;
370376 void MTHowToViewDlg::_Clear()
371377 {
372378 ZeroMemory(&m_BmpHead, sizeof(BITMAPFILEHEADER));
373- ZeroMemory(&m_BmpInfo, sizeof(BITMAPINFO));
379+ ZeroMemory(&m_BmpInfo, sizeof(BITMAPINFOHEADER));
374380
375381 if (m_hMemBmpPixel != NULL) {
376382 GlobalUnlock(m_hMemBmpPixel);
--- a/MIDITrail/MTNoteBoxMod.cpp
+++ b/MIDITrail/MTNoteBoxMod.cpp
@@ -135,7 +135,7 @@ int MTNoteBoxMod::Transform(
135135 D3DXMatrixRotationX(&rotateMatrix, D3DXToRadian(rollAngle));
136136
137137 //移動行列
138- moveVector = m_NoteDesign.GetWorldMoveVector();
138+ moveVector = m_pNoteDesign->GetWorldMoveVector();
139139 D3DXMatrixTranslation(&moveMatrix, moveVector.x, moveVector.y, moveVector.z);
140140
141141 //行列の合成
--- a/MIDITrail/MTNoteBoxRingLive.cpp
+++ b/MIDITrail/MTNoteBoxRingLive.cpp
@@ -44,7 +44,10 @@ int MTNoteBoxRingLive::_CreateNoteDesign()
4444 result = YN_SET_ERR("Could not allocate memory.", 0, 0);
4545 goto EXIT;
4646 }
47-
47+
48+ //ライブモニタモード設定
49+ ((MTNoteDesignRing*)m_pNoteDesign)->SetLiveMode();
50+
4851 EXIT:;
4952 return result;
5053 }
--- a/MIDITrail/MTNoteDesignMod.cpp
+++ b/MIDITrail/MTNoteDesignMod.cpp
@@ -177,7 +177,7 @@ void MTNoteDesignMod::GetActiveNoteBoxVirtexPos(
177177 }
178178
179179 bh = GetNoteBoxHeight() * curSizeRatio;
180- bw = GetNoteBoxWidht() * curSizeRatio;
180+ bw = GetNoteBoxWidth() * curSizeRatio;
181181
182182 *pVector0 = D3DXVECTOR3(center.x, center.y+(bh/2.0f), center.z+(bw/2.0f));
183183 *pVector1 = D3DXVECTOR3(center.x, center.y+(bh/2.0f), center.z-(bw/2.0f));
--- a/MIDITrail/MTNoteDesignRing.cpp
+++ b/MIDITrail/MTNoteDesignRing.cpp
@@ -24,6 +24,7 @@ using namespace YNBaseLib;
2424 //******************************************************************************
2525 MTNoteDesignRing::MTNoteDesignRing(void)
2626 {
27+ m_isLiveMode = false;
2728 m_NoteAngleStep = 360.0f / (float)SM_MAX_NOTE_NUM;
2829 m_RingRadius = 0.0f;
2930 }
@@ -36,6 +37,14 @@ MTNoteDesignRing::~MTNoteDesignRing(void)
3637 }
3738
3839 //******************************************************************************
40+// ライブモニタモード設定
41+//******************************************************************************
42+void MTNoteDesignRing::SetLiveMode(void)
43+{
44+ m_isLiveMode = true;
45+}
46+
47+//******************************************************************************
3948 // ノートボックス中心座標取得
4049 //******************************************************************************
4150 D3DXVECTOR3 MTNoteDesignRing::GetNoteBoxCenterPosX(
@@ -356,7 +365,12 @@ float MTNoteDesignRing::_GetNoteAngle(
356365 }
357366
358367 //ノート番号で角度を決定
359- angle = (m_NoteAngleStep * noteNo) + (m_NoteAngleStep / 2.0f) + pb;
368+ angle = ((m_NoteAngleStep * noteNo) + (m_NoteAngleStep / 2.0f) + pb) * (-1.0f);
369+
370+ //ライブモニタの場合は反転する
371+ if (m_isLiveMode) {
372+ angle = angle * (-1.0f);
373+ }
360374
361375 return angle;
362376 }
--- a/MIDITrail/MTNoteDesignRing.h
+++ b/MIDITrail/MTNoteDesignRing.h
@@ -26,6 +26,9 @@ public:
2626 MTNoteDesignRing(void);
2727 virtual ~MTNoteDesignRing(void);
2828
29+ //ライブモニタモード設定
30+ void SetLiveMode(void);
31+
2932 //ノートボックス中心座標取得
3033 virtual D3DXVECTOR3 GetNoteBoxCenterPosX(
3134 unsigned long curTickTime,
@@ -101,6 +104,7 @@ public:
101104
102105 private:
103106
107+ bool m_isLiveMode;
104108 float m_NoteAngleStep;
105109 float m_RingRadius;
106110
--- a/MIDITrail/MTNoteRippleMod.cpp
+++ b/MIDITrail/MTNoteRippleMod.cpp
@@ -516,7 +516,7 @@ int MTNoteRippleMod::_SetVertexPosition(
516516 pbSensitivity = m_pNotePitchBend->GetSensitivity(note.portNo, note.chNo);
517517
518518 //ノートボックス中心座標取得
519- center = m_NoteDesign.GetNoteBoxCenterPosX(
519+ center = m_pNoteDesign->GetNoteBoxCenterPosX(
520520 m_CurTickTime,
521521 note.portNo,
522522 note.chNo,
@@ -566,7 +566,7 @@ int MTNoteRippleMod::_SetVertexPosition(
566566
567567 //各頂点のディフューズ色
568568 for (i = 0; i < 6; i++) {
569- color = m_NoteDesign.GetNoteBoxColor(
569+ color = m_pNoteDesign->GetNoteBoxColor(
570570 note.portNo,
571571 note.chNo,
572572 note.noteNo
--- a/MIDITrail/MTNoteRippleRing.cpp
+++ b/MIDITrail/MTNoteRippleRing.cpp
@@ -2,7 +2,7 @@
22 //
33 // MIDITrail / MTNoteRippleRing
44 //
5-// リング用ノート波紋描画クラス
5+// ノート波紋リング描画クラス
66 //
77 // Copyright (C) 2019 WADA Masashi. All Rights Reserved.
88 //
--- a/MIDITrail/MTNoteRippleRing.h
+++ b/MIDITrail/MTNoteRippleRing.h
@@ -2,7 +2,7 @@
22 //
33 // MIDITrail / MTNoteRippleRing
44 //
5-// リング用ノート波紋描画クラス
5+// ノート波紋リング描画クラス
66 //
77 // Copyright (C) 2019 WADA Masashi. All Rights Reserved.
88 //
@@ -12,8 +12,6 @@
1212
1313 #include "MTNoteRipple.h"
1414
15-using namespace SMIDILib;
16-
1715
1816 //******************************************************************************
1917 // リング用ノート波紋描画クラス
--- /dev/null
+++ b/MIDITrail/MTNoteRippleRingLive.cpp
@@ -0,0 +1,55 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteRippleRingLive
4+//
5+// ライブモニタ用ノート波紋リング描画クラス
6+//
7+// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#include "StdAfx.h"
12+#include "YNBaseLib.h"
13+#include "MTNoteDesignRing.h"
14+#include "MTNoteRippleRingLive.h"
15+
16+using namespace YNBaseLib;
17+
18+
19+//******************************************************************************
20+// コンストラクタ
21+//******************************************************************************
22+MTNoteRippleRingLive::MTNoteRippleRingLive(void)
23+{
24+}
25+
26+//******************************************************************************
27+// デストラクタ
28+//******************************************************************************
29+MTNoteRippleRingLive::~MTNoteRippleRingLive(void)
30+{
31+}
32+
33+//******************************************************************************
34+// ノートデザイン生成
35+//******************************************************************************
36+int MTNoteRippleRingLive::_CreateNoteDesign()
37+{
38+ int result = 0;
39+
40+ try {
41+ m_pNoteDesign = new MTNoteDesignRing();
42+ }
43+ catch (std::bad_alloc) {
44+ result = YN_SET_ERR("Could not allocate memory.", 0, 0);
45+ goto EXIT;
46+ }
47+
48+ //ライブモニタモード設定
49+ ((MTNoteDesignRing*)m_pNoteDesign)->SetLiveMode();
50+
51+EXIT:;
52+ return result;
53+}
54+
55+
--- /dev/null
+++ b/MIDITrail/MTNoteRippleRingLive.h
@@ -0,0 +1,33 @@
1+//******************************************************************************
2+//
3+// MIDITrail / MTNoteRippleRingLive
4+//
5+// ライブモニタ用ノート波紋リング描画クラス
6+//
7+// Copyright (C) 2019 WADA Masashi. All Rights Reserved.
8+//
9+//******************************************************************************
10+
11+#pragma once
12+
13+#include "MTNoteRipple.h"
14+
15+
16+//******************************************************************************
17+// ライブモニタ用ノート波紋リング描画クラス
18+//******************************************************************************
19+class MTNoteRippleRingLive : public MTNoteRipple
20+{
21+public:
22+
23+ //コンストラクタ/デストラクタ
24+ MTNoteRippleRingLive(void);
25+ virtual ~MTNoteRippleRingLive(void);
26+
27+private:
28+
29+ virtual int _CreateNoteDesign();
30+
31+};
32+
33+
--- a/MIDITrail/MTPictBoard.cpp
+++ b/MIDITrail/MTPictBoard.cpp
@@ -4,7 +4,7 @@
44 //
55 // ピクチャボード描画クラス
66 //
7-// Copyright (C) 2010-2012 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -202,7 +202,7 @@ int MTPictBoard::_CreateVertexOfBoard(
202202 D3DXVECTOR3 vectorRU;
203203 D3DXVECTOR3 vectorLD;
204204 D3DXVECTOR3 vectorRD;
205- float boardHight = 0.0f;
205+ float boardHeight = 0.0f;
206206 float boardWidth = 0.0f;
207207 float chStep = 0.0f;
208208
@@ -223,8 +223,8 @@ int MTPictBoard::_CreateVertexOfBoard(
223223 &vectorRD
224224 );
225225
226- boardHight = vectorLU.y - vectorLD.y;
227- boardWidth = boardHight * ((float)m_ImgInfo.Width / (float)m_ImgInfo.Height);
226+ boardHeight = vectorLU.y - vectorLD.y;
227+ boardWidth = boardHeight * ((float)m_ImgInfo.Width / (float)m_ImgInfo.Height);
228228 chStep = m_NoteDesign.GetChStep();
229229
230230 //頂点座標:左の面
--- a/MIDITrail/MTPictBoardRing.cpp
+++ b/MIDITrail/MTPictBoardRing.cpp
@@ -74,7 +74,7 @@ int MTPictBoardRing::Create(
7474 if (result != 0) goto EXIT;
7575
7676 //頂点バッファ生成
77- vertexNum = (SM_MAX_NOTE_NUM + 1)* 2;
77+ vertexNum = (SM_MAX_NOTE_NUM + 1) * 2;
7878 result = m_Primitive.CreateVertexBuffer(pD3DDevice, vertexNum);
7979 if (result != 0) goto EXIT;
8080
@@ -206,19 +206,34 @@ int MTPictBoardRing::_CreateVertexOfBoard(
206206 unsigned long virtexIndexStart = 0;
207207 D3DXVECTOR3 basePos;
208208 D3DXVECTOR3 rotatedPos;
209- float boardHight = 0.0f;
209+ float boardHeight = 0.0f;
210210 float boardWidth = 0.0f;
211211 float chStep = 0.0f;
212212 float angle = 0.0f;
213- float tx1 = 0.0f;
214- float tx2 = 0.0f;
213+ float direction = 0.0f;
214+ D3DXVECTOR2 clipAreaP1;
215+ D3DXVECTOR2 clipAreaP2;
216+ D3DXVECTOR2 textureP1;
217+ D3DXVECTOR2 textureP2;
215218
216- //テクスチャX座標
217- tx1 = 1.0f;
218- tx2 = 0.0f;
219+ //テクスチャクリップ領域の座標
220+ clipAreaP1 = D3DXVECTOR2(0.0f, 0.0f); //左上
221+ clipAreaP2 = D3DXVECTOR2(1.0f, 1.0f); //右下
222+
223+ //テスクチャX座標
219224 if (isReverseMode) {
220- tx1 = 0.0f;
221- tx2 = 1.0f;
225+ textureP1.x = clipAreaP1.x;
226+ textureP1.y = clipAreaP2.y;
227+ textureP2.x = clipAreaP2.x;
228+ textureP2.y = clipAreaP1.y;
229+ direction = -1.0f;
230+ }
231+ else {
232+ textureP1.x = clipAreaP2.x;
233+ textureP1.y = clipAreaP1.y;
234+ textureP2.x = clipAreaP1.x;
235+ textureP2.y = clipAreaP2.y;
236+ direction = 1.0f;
222237 }
223238
224239 //基準座標
@@ -227,8 +242,8 @@ int MTPictBoardRing::_CreateVertexOfBoard(
227242 m_NoteDesign.GetPlayPosX(0),
228243 m_NoteDesign.GetPortOriginY(0) + (chStep * (float)SM_MAX_CH_NUM) + chStep + 0.01f,
229244 m_NoteDesign.GetPortOriginZ(0));
230- boardHight = 2.0f * 3.1415926f * basePos.y;
231- boardWidth = boardHight * ((float)m_ImgInfo.Width / (float)m_ImgInfo.Height);
245+ boardHeight = 2.0f * 3.1415926f * basePos.y;
246+ boardWidth = boardHeight * ((float)m_ImgInfo.Width / (float)m_ImgInfo.Height);
232247 basePos.x -= (boardWidth * m_NoteDesign.GetPictBoardRelativePos());
233248
234249 //頂点作成:X軸回りの円筒
@@ -236,13 +251,13 @@ int MTPictBoardRing::_CreateVertexOfBoard(
236251 pVertex[virtexIndex].p = basePos;
237252 pVertex[virtexIndex].n = D3DXVECTOR3(-1.0f, 0.0f, 0.0f);
238253 pVertex[virtexIndex].c = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
239- pVertex[virtexIndex].t = D3DXVECTOR2(tx1, 1.0f);
254+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP1.x, textureP1.y);
240255 virtexIndex++;
241256 pVertex[virtexIndex].p = basePos;
242257 pVertex[virtexIndex].p.x += boardWidth;
243258 pVertex[virtexIndex].n = D3DXVECTOR3(-1.0f, 0.0f, 0.0f);
244259 pVertex[virtexIndex].c = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
245- pVertex[virtexIndex].t = D3DXVECTOR2(tx2, 1.0f);
260+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP2.x, textureP1.y);
246261 for (i = 1; i < SM_MAX_NOTE_NUM; i++) {
247262 virtexIndex++;
248263
@@ -252,13 +267,13 @@ int MTPictBoardRing::_CreateVertexOfBoard(
252267 pVertex[virtexIndex].p = rotatedPos;
253268 pVertex[virtexIndex].n = D3DXVECTOR3(-1.0f, 0.0f, 0.0f);
254269 pVertex[virtexIndex].c = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
255- pVertex[virtexIndex].t = D3DXVECTOR2(tx1, (float)(SM_MAX_NOTE_NUM - i) / (float)SM_MAX_NOTE_NUM);
270+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP1.x, textureP1.y + (direction * (float)i / (float)SM_MAX_NOTE_NUM));
256271 virtexIndex++;
257272 pVertex[virtexIndex].p = rotatedPos;
258273 pVertex[virtexIndex].p.x += boardWidth;
259274 pVertex[virtexIndex].n = D3DXVECTOR3(-1.0f, 0.0f, 0.0f);
260275 pVertex[virtexIndex].c = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
261- pVertex[virtexIndex].t = D3DXVECTOR2(tx2, (float)(SM_MAX_NOTE_NUM - i) / (float)SM_MAX_NOTE_NUM);
276+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP2.x, textureP1.y + (direction * (float)i / (float)SM_MAX_NOTE_NUM));
262277
263278 //インデックスバッファ
264279 // 直前の頂点0,1と追加した頂点2,3で三角形0-1-3と0-3-2を追加
@@ -276,10 +291,10 @@ int MTPictBoardRing::_CreateVertexOfBoard(
276291 //最後の頂点2,3は最初0,1の頂点と同じ(リングを閉じる)
277292 virtexIndex++;
278293 pVertex[virtexIndex] =pVertex[0];
279- pVertex[virtexIndex].t = D3DXVECTOR2(tx1, 0.0f);
294+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP1.x, textureP2.y);
280295 virtexIndex++;
281296 pVertex[virtexIndex] =pVertex[1];
282- pVertex[virtexIndex].t = D3DXVECTOR2(tx2, 0.0f);
297+ pVertex[virtexIndex].t = D3DXVECTOR2(textureP2.x, textureP2.y);
283298
284299 //インデックスバッファ(リングを閉じる)
285300 pIndex[(i-1)*6 + 0] = (i-1)*2 + 0; //0 1つ目の三角形
--- a/MIDITrail/MTScenePianoRollRingLive.h
+++ b/MIDITrail/MTScenePianoRollRingLive.h
@@ -16,7 +16,7 @@
1616 #include "MTScene.h"
1717 #include "MTFirstPersonCam.h"
1818 #include "MTNoteBoxRingLive.h"
19-#include "MTNoteRippleRing.h"
19+#include "MTNoteRippleRingLive.h"
2020 #include "MTNoteDesignRing.h"
2121 #include "MTNotePitchBend.h"
2222 #include "MTGridRingLive.h"
@@ -111,7 +111,7 @@ private:
111111
112112 //描画オブジェクト
113113 MTNoteBoxRingLive m_NoteBoxLive;
114- MTNoteRippleRing m_NoteRipple;
114+ MTNoteRippleRingLive m_NoteRipple;
115115 MTNotePitchBend m_NotePitchBend;
116116 MTGridRingLive m_GridBoxLive;
117117 MTPictBoardRing m_PictBoard;
--- a/MIDITrail/MTTimeIndicatorRing.cpp
+++ b/MIDITrail/MTTimeIndicatorRing.cpp
@@ -85,8 +85,8 @@ int MTTimeIndicatorRing::_CreatePrimitiveLine(
8585 result = m_PrimitiveLine.CreateVertexBuffer(pD3DDevice, vertexNum);
8686 if (result != 0) goto EXIT;
8787
88- //インデックスバッファ生成:1サークル128辺 * 2(始点/終点) * 2(先端/終端)
89- indexNum = 128 * 2 * 2;
88+ //インデックスバッファ生成:1サークル128辺 * 2(始点/終点)
89+ indexNum = 128 * 2;
9090 result = m_PrimitiveLine.CreateIndexBuffer(pD3DDevice, indexNum);
9191 if (result != 0) goto EXIT;
9292
--- a/MIDITrail/MTTimeIndicatorRing.h
+++ b/MIDITrail/MTTimeIndicatorRing.h
@@ -78,13 +78,6 @@ private:
7878 int _CreatePrimitiveLine(LPDIRECT3DDEVICE9 pD3DDevice);
7979 int _CreateVertexOfIndicatorLine(MTTIMEINDICATOR_VERTEX* pVertex, unsigned long* pIndex);
8080
81- D3DXVECTOR3 _RotateYZ(
82- float centerY,
83- float centerZ,
84- D3DXVECTOR3 p1,
85- float angle
86- );
87-
8881 };
8982
9083
--- a/README.en.txt
+++ b/README.en.txt
@@ -1,6 +1,6 @@
11 ******************************************************************************
22
3- MIDITrail source code Ver.1.3.0 for Windows
3+ MIDITrail source code Ver.1.3.1 for Windows
44
55 Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
66
--- a/README.ja.txt
+++ b/README.ja.txt
@@ -1,6 +1,6 @@
11 ******************************************************************************
22
3- MIDITrail ソースコード Ver.1.3.0 for Windows
3+ MIDITrail ソースコード Ver.1.3.1 for Windows
44
55 Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
66
--- a/Resources/conf/PianoRollRingLive.ini
+++ b/Resources/conf/PianoRollRingLive.ini
@@ -12,7 +12,7 @@ QuarterNoteLength=2.0
1212 NoteBoxHeight=0.1
1313 NoteBoxWidth=0.0
1414 NoteStep=0.1
15-ChStep=0.001
15+ChStep=0.004
1616 RippleHeight=1.0
1717 RippleWidth=1.0
1818 PictBoardRelativePos=0.0
@@ -94,4 +94,3 @@ Theta=90.0
9494 ManualRollAngle=0.0
9595 AutoRollVelocity=0.0
9696
97-
--- a/Resources/doc/MANUAL.en.html
+++ b/Resources/doc/MANUAL.en.html
@@ -4,7 +4,7 @@
44 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
55 <meta http-equiv="Content-Language" content="en">
66 <link rel="stylesheet" href="Files/doc.css" type="text/css">
7-<title>MIDITrail Ver.1.3.0 for Windows User Manual</title>
7+<title>MIDITrail Ver.1.3.1 for Windows User Manual</title>
88 </head>
99 <body>
1010
@@ -15,7 +15,7 @@
1515 English / <a href="MANUAL.ja.html">Japanese</a>
1616 </div>
1717
18-<h1>MIDITrail Ver.1.3.0 for Windows User Manual</h1>
18+<h1>MIDITrail Ver.1.3.1 for Windows User Manual</h1>
1919
2020 <p>
2121 Copyright (c) 2010-2019, WADA Masashi All rights reserved.<br>
@@ -822,22 +822,22 @@ POSSIBILITY OF SUCH DAMAGE.
822822 <tr><td>2010/05/18</td><td>Ver.1.0.0 beta</td><td>Beta release.</td></tr>
823823 <tr><td>2010/06/02</td><td>Ver.1.0.0</td><td>First formal release.</td></tr>
824824 <tr><td>2010/06/05</td><td>Ver.1.0.1</td><td>
825-#22102 Fixed bug. (execution fails by missing Visual C++ runtime library)<br>
826-#22106 Fixed bug. (size of about dialog is big on Windows English version)<br>
825+#22102 Fixed bug (execution fails by missing Visual C++ runtime library)<br>
826+#22106 Fixed bug (size of about dialog is big on Windows English version)<br>
827827 </td></tr>
828828 <tr><td>2010/06/20</td><td>Ver.1.0.2</td><td>
829829 #22218 Added English manual.<br>
830-#22108 Fixed bug. (crash when opening the MIDI file exported from VOCALOID)<br>
831-#22217 Fixed bug. (overlapped ripples flicker)<br>
830+#22108 Fixed bug (crash when opening the MIDI file exported from VOCALOID)<br>
831+#22217 Fixed bug (overlapped ripples flicker)<br>
832832 </td></tr>
833833 <tr><td>2010/07/11</td><td>Ver.1.0.3</td><td>
834834 #22319 Added color effect to active piano roll bar.<br>
835835 #22412 Added pitch bend effect to piano roll bar.<br>
836836 #22425 Added view mode of piano roll 2D.<br>
837837 #22442 Added switch interface of display and effect.<br>
838-#22413 Fixed bug. (rendering performance has declined by specular effect)<br>
839-#22414 Fixed bug. (total count of notes is incorrect)<br>
840-#22424 Fixed bug. (duration of a ripple is not constant)<br>
838+#22413 Fixed bug (rendering performance has declined by specular effect)<br>
839+#22414 Fixed bug (total count of notes is incorrect)<br>
840+#22424 Fixed bug (duration of a ripple is not constant)<br>
841841 </td></tr>
842842 <tr><td>2010/07/25</td><td>Ver.1.0.4</td><td>
843843 #22320 Added application icon.<br>
@@ -845,34 +845,34 @@ POSSIBILITY OF SUCH DAMAGE.
845845 #22523 Added command line interface.<br>
846846 #22582 Added double speed playback mode.<br>
847847 #22585 Added function of piano roll rotation by a mouse wheel.<br>
848-#22566 Fixed bug. (Playback time was slightly short)<br>
849-#22506 Fixed bug. (Note may continue sounding after the end of playback)<br>
848+#22566 Fixed bug (Playback time was slightly short)<br>
849+#22506 Fixed bug (Note may continue sounding after the end of playback)<br>
850850 </td></tr>
851851 <tr><td>2010/08/06</td><td>Ver.1.0.5</td><td>
852-#22633 Fixed bug. (Piano roll rotation status is not saved by "Save viewpoint")<br>
853-#22652 Fixed bug. (Parse error when opening 55MCMDL1.MID "WATANABE Michiaki MEDLEY")<br>
854-#22709 Fixed bug. (MIDITrail sends redundant "F7" to MIDI-OUT with multi-packet system exclusive message)<br>
855-#22710 Fixed bug. (Auto rotation speed of piano roll is not constant)<br>
852+#22633 Fixed bug (Piano roll rotation status is not saved by "Save viewpoint")<br>
853+#22652 Fixed bug (Parse error when opening 55MCMDL1.MID "WATANABE Michiaki MEDLEY")<br>
854+#22709 Fixed bug (MIDITrail sends redundant "F7" to MIDI-OUT with multi-packet system exclusive message)<br>
855+#22710 Fixed bug (Auto rotation speed of piano roll is not constant)<br>
856856 </td></tr>
857857 <tr><td>2010/08/29</td><td>Ver.1.1.0 beta</td><td>Beta release.(Added "Piano Roll Rain")</td></tr>
858858 <tr><td>2010/09/19</td><td>Ver.1.1.0</td><td>
859859 #23174 Added view mode "Piano Roll Rain"<br>
860-#23175 Fixed bug. (File open dialog is not modal)<br>
860+#23175 Fixed bug (File open dialog is not modal)<br>
861861 </td></tr>
862862 <tr><td>2010/10/17</td><td>Ver.1.1.1</td><td>
863863 #23439 Added Anti-aliasing support<br>
864-#23347 Fixed bug. (Key down timing and a piano roll don't synchronize in PianoRollRain)<br>
865-#23348 Fixed bug. (Spelling error in file open dialog)<br>
866-#23422 Fixed bug. (Position of black is not correct in PianoRollRain)<br>
864+#23347 Fixed bug (Key down timing and a piano roll don't synchronize in PianoRollRain)<br>
865+#23348 Fixed bug (Spelling error in file open dialog)<br>
866+#23422 Fixed bug (Position of black is not correct in PianoRollRain)<br>
867867 </td></tr>
868868 <tr><td>2010/12/26</td><td>Ver.1.1.2</td><td>
869869 This version was released with MIDITrail for Mac OS X.<br>
870870 #23970 Added eye direction control by key operation.<br>
871871 #23971 Updated texture images.<br>
872872 #23972 Updated application icon.<br>
873-#23497 Fixed bug. ("Piano Roll Rain" item in "View" menu is always enable)<br>
874-#23968 Fixed bug. (Time signature was always 4/4 after loading file)<br>
875-#23969 Fixed bug. (Space charactor in the title string has been ignored)<br>
873+#23497 Fixed bug ("Piano Roll Rain" item in "View" menu is always enable)<br>
874+#23968 Fixed bug (Time signature was always 4/4 after loading file)<br>
875+#23969 Fixed bug (Space charactor in the title string has been ignored)<br>
876876 </td></tr>
877877 <tr><td>2012/01/15</td><td>Ver.1.1.3</td><td>
878878 #27006 Merged features of MIDITrail Ver.1.1.3 for Mac OS X<br>
@@ -882,16 +882,16 @@ This version was released with MIDITrail for Mac OS X.<br>
882882 #26989 Added stars and counter display control<br>
883883 #27005 Added figure of player operations guide to "How to view dialog"<br>
884884 #27091 Added check of DirectX feature support (Index Buffer)<br>
885-#26990 Fixed bug. (Typographical errors on the license)<br>
886-#27139 Fixed bug. (The color of note boxes are whitish in Piano Roll 3D)<br>
887-#27140 Fixed bug. (The color of stars are dark in Piano Roll Rain)<br>
885+#26990 Fixed bug (Typographical errors on the license)<br>
886+#27139 Fixed bug (The color of note boxes are whitish in Piano Roll 3D)<br>
887+#27140 Fixed bug (The color of stars are dark in Piano Roll Rain)<br>
888888 </td></tr>
889889 <tr><td>2012/03/04</td><td>Ver.1.2.0</td><td>
890890 #27711 Merged features of MIDITrail Ver.1.2.0 for Mac OS X<br>
891891 #27458 Added MIDI IN monitoring<br>
892892 #27459 Added MIDI OUT auto configuration<br>
893893 #27712 Added shortcut key of File Open<br>
894-#27725 Fixed bug. (Error occurs when the MIDI data contains the track with 6 or more port numbers)<br>
894+#27725 Fixed bug (Error occurs when the MIDI data contains the track with 6 or more port numbers)<br>
895895 </td></tr>
896896 <tr><td>2013/12/04</td><td>Ver.1.2.1</td><td>
897897 #30545 Added key display range control<br>
@@ -908,15 +908,15 @@ This version was released with MIDITrail for Mac OS X.<br>
908908 #32427 Added note color assignment to active key<br>
909909 #32365 Changed title caption ("TITLE:" string was removed)<br>
910910 #30552 Improved event message queue mechanism<br>
911-#30548 Fixed bug. (At the start of playback, MIDI data transmission is blocked)<br>
912-#32359 Fixed bug. (MIDITrail does not send some CC events at skip processing)<br>
911+#30548 Fixed bug (At the start of playback, MIDI data transmission is blocked)<br>
912+#32359 Fixed bug (MIDITrail does not send some CC events at skip processing)<br>
913913 </td></tr>
914914 <tr><td>2014/02/23</td><td>Ver.1.2.1a</td><td>
915915 #33252 Added support for Windows 64bit<br>
916916 </td></tr>
917917 <tr><td>2014/04/20</td><td>Ver.1.2.1b</td><td>
918-#33674 Fixed bug. (When NSX-39 was selected as MIDI OUT device, error occurs at the start of playback)<br>
919-#33695 Fixed bug. (Program error occurs in MTFont2Bmp::_writeGlyphToBmpBuf.)<br>
918+#33674 Fixed bug (When NSX-39 was selected as MIDI OUT device, error occurs at the start of playback)<br>
919+#33695 Fixed bug (Program error occurs in MTFont2Bmp::_writeGlyphToBmpBuf)<br>
920920 </td></tr>
921921 <tr><td>2016/12/05</td><td>Ver.1.2.2</td><td>
922922 #35775 Changed URL and mail address in user's manual<br>
@@ -937,7 +937,7 @@ This version was released with MIDITrail for Mac OS X.<br>
937937 #39227 Added quarter note length configuration<br>
938938 #39226 Changed development environment to Visual Studio 2017<br>
939939 #39228 Changed appendix of user's manual<br>
940-#39229 fixed bug (Code analysis found some mistakes)<br>
940+#39229 Fixed bug (Code analysis found some mistakes)<br>
941941 </td></tr>
942942 <tr><td>2019/06/02</td><td>Ver.1.2.6</td><td>
943943 #39274 Added full screen mode<br>
@@ -946,6 +946,12 @@ This version was released with MIDITrail for Mac OS X.<br>
946946 <tr><td>2019/10/14</td><td>Ver.1.3.0</td><td>
947947 #39675 Added view mode "Piano Roll Ring"<br>
948948 </td></tr>
949+ <tr><td>2019/11/09</td><td>Ver.1.3.1</td><td>
950+#39733 Changed keyboard display direction on Piano Roll Ring.<br>
951+#39734 Changed processing to keep viewpoint when window size changed.<br>
952+#39735 Fixed bug (Assertion occurs in _controlfp_s when x64 debug configuration)<br>
953+#39736 Fixed bug (Exception occurs in "How to view" dialog when x64 debug configuration)<br>
954+ </td></tr>
949955 </table>
950956 </p>
951957
--- a/Resources/doc/MANUAL.ja.html
+++ b/Resources/doc/MANUAL.ja.html
@@ -4,7 +4,7 @@
44 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
55 <meta http-equiv="Content-Language" content="ja">
66 <link rel="stylesheet" href="Files/doc.css" type="text/css">
7-<title>MIDITrail Ver.1.3.0 for Windows ユーザーマニュアル</title>
7+<title>MIDITrail Ver.1.3.1 for Windows ユーザーマニュアル</title>
88 </head>
99 <body>
1010
@@ -14,7 +14,7 @@
1414 <a href="MANUAL.en.html">English</a> / Japanese
1515 </div>
1616
17-<h1>MIDITrail Ver.1.3.0 for Windows ユーザーマニュアル</h1>
17+<h1>MIDITrail Ver.1.3.1 for Windows ユーザーマニュアル</h1>
1818
1919 <p>
2020 Copyright (c) 2010-2019, WADA Masashi All rights reserved.<br>
@@ -936,6 +936,12 @@ MIDITrail for Mac OS Xと同時にリリース<br>
936936 <tr><td>2019/10/14</td><td>Ver.1.3.0</td><td>
937937 #39675 機能追加:ビューモード「ピアノロールリング」追加<br>
938938 </td></tr>
939+ <tr><td>2019/11/09</td><td>Ver.1.3.1</td><td>
940+#39733 仕様変更:「ピアノロールリング」のキーボードを反転する<br>
941+#39734 仕様変更:ウィンドウサイズ変更時に視点を維持する<br>
942+#39735 バグ修正:x64デバッグ構成のとき_controlfp_sでアサーション発生<br>
943+#39736 バグ修正:x64デバッグ構成のときHow to viewダイアログで例外発生<br>
944+ </td></tr>
939945 </table>
940946 </p>
941947
--- a/SMIDILib/SMFPUCtrl.cpp
+++ b/SMIDILib/SMFPUCtrl.cpp
@@ -4,7 +4,7 @@
44 //
55 // 浮動点小数プロセッサ制御クラス
66 //
7-// Copyright (C) 2010 WADA Masashi. All Rights Reserved.
7+// Copyright (C) 2010-2019 WADA Masashi. All Rights Reserved.
88 //
99 //******************************************************************************
1010
@@ -89,17 +89,22 @@ int SMFPUCtrl::Start(FPUPrecision precision)
8989 result = YN_SET_ERR("Program error.", 0, 0);
9090 goto EXIT;
9191 }
92-#ifndef _WIN64
92+
93+#ifdef _WIN64
94+ //x64(64bit)
95+ //精度制御の必要なし
96+#else
97+ //x86(32bit)
9398 eresult = _controlfp_s(
9499 &curCtrl, //現在の制御ワード
95100 flag, //制御ワード:制御種別
96- _MCW_PC //マスク:制度制御
101+ _MCW_PC //マスク:精度制御
97102 );
98-#endif
99103 if (eresult != 0) {
100104 result = YN_SET_ERR("Windows API error.", eresult, GetLastError());
101105 goto EXIT;
102106 }
107+#endif
103108
104109 _DisplayCurCtrl(_T("Start after"));
105110
@@ -131,18 +136,22 @@ int SMFPUCtrl::End()
131136 goto EXIT;
132137 }
133138
134-#ifndef _WIN64
135139 //浮動小数点精度を復元する
140+#ifdef _WIN64
141+ //x64(64bit)
142+ //精度制御の必要なし
143+#else
144+ //x86(32bit)
136145 eresult = _controlfp_s(
137146 &curCtrl, //現在の制御ワード
138147 m_FPUCtrl, //制御ワード:設定開始時点
139- _MCW_PC //マスク:制度制御
148+ _MCW_PC //マスク:精度制御
140149 );
141-#endif
142150 if (eresult != 0) {
143151 result = YN_SET_ERR("Windows API error.", eresult, GetLastError());
144152 goto EXIT;
145153 }
154+#endif
146155
147156 _DisplayCurCtrl(_T("End after"));
148157