1
0
mirror of synced 2024-11-24 15:40:22 +01:00

Add extra math for diagonal/vertical rolls (unfinished)

This commit is contained in:
0auBSQ 2023-05-04 03:43:33 +09:00
parent 68d3a2fc43
commit 91df1fedae
5 changed files with 48 additions and 46 deletions

View File

@ -370,6 +370,7 @@ namespace TJAPlayer3
public int nチャンネル番号;
public STDGBVALUE<int> nバーからの距離dot;
public int nバーからのーツ末端距離dot;
public int nバーからのーツ末端距離dot_Y;
public int n整数値;
public int n文字数 = 16;
@ -483,6 +484,7 @@ namespace TJAPlayer3
this.nバーからの距離dot.Bass = 0;
this.nバーからの距離dot.Taiko = 0;
this.nバーからのーツ末端距離dot = 0;
this.nバーからのーツ末端距離dot_Y = 0;
this.n総移動時間 = 0;
this.dbBPM = 120.0;
this.fNow_Measure_m = 4.0f;

View File

@ -571,19 +571,6 @@ namespace TJAPlayer3
#region[ ]
/*
if (TJAPlayer3.Tx.SongSelect_Auto != null)
{
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
{
TJAPlayer3.Tx.SongSelect_Auto.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.SongSelect_Auto_X[0], TJAPlayer3.Skin.SongSelect_Auto_Y[0]);
}
if (TJAPlayer3.ConfigIni.nPlayerCount > 1 && TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P)
{
TJAPlayer3.Tx.SongSelect_Auto.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.SongSelect_Auto_X[1], TJAPlayer3.Skin.SongSelect_Auto_Y[1]);
}
}
*/
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{

View File

@ -3279,9 +3279,14 @@ namespace TJAPlayer3
pChip.nバーからの距離dot.Bass = (int) ( time * ScrollSpeedBass );
double _scrollSpeed = pChip.dbSCROLL * (db現在の譜面スクロール速度[nPlayer] + 1.0) / 10.0;
double _scrollSpeed_Y = pChip.dbSCROLL_Y * (db現在の譜面スクロール速度[nPlayer] + 1.0) / 10.0;
pChip.nバーからの距離dot.Taiko = NotesManager.GetNoteX(pChip, time * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, false);
if ( pChip.nーツ終了時刻ms != 0 )
{
pChip.nバーからのーツ末端距離dot = NotesManager.GetNoteX(pChip, (pChip.nーツ終了時刻ms - n現在時刻ms) * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, true);
pChip.nバーからのーツ末端距離dot_Y = NotesManager.GetNoteY(pChip, (pChip.nーツ終了時刻ms - n現在時刻ms) * pChip.dbBPM, _scrollSpeed_Y, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, true);
}
if ( configIni.eScrollMode == EScrollMode.BMSCROLL || configIni.eScrollMode == EScrollMode.HBSCROLL )
{

View File

@ -2152,6 +2152,7 @@ namespace TJAPlayer3
int nート座標 = pChip.nバーからの距離dot.Taiko;
int nート末端座標 = pChip.nバーからのーツ末端距離dot;
int nート末端座標_Y = pChip.nバーからのーツ末端距離dot_Y;
int n先頭発声位置 = 0;
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(nPlayer)];
@ -2170,19 +2171,6 @@ namespace TJAPlayer3
pChip.bShow = false;
else if (pChip.nーツ出現時刻ms != 0 && pChip.nーツ移動開始時刻ms != 0)
pChip.bShow = true;
/*
if (pChip.nーツ移動開始時刻ms != 0 && ((long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) < pChip.n発声時刻ms - pChip.nーツ移動開始時刻ms))
{
nート座標 = NotesManager.GetNoteX(((pChip.n発声時刻ms) - (pChip.n発声時刻ms - pChip.nーツ移動開始時刻ms)) * pChip.dbBPM * pChip.dbSCROLL * (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0), TJAPlayer3.Skin.Game_Note_Interval);
nート末端座標 = NotesManager.GetNoteX((pChip.nーツ終了時刻ms - (pChip.n発声時刻ms - pChip.nーツ移動開始時刻ms)) * pChip.dbBPM * pChip.dbSCROLL * (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0), TJAPlayer3.Skin.Game_Note_Interval);
}
else
{
nート座標 = 0;
nート末端座標 = 0;
}
*/
}
if (NotesManager.IsRollEnd(pChip))
{
@ -2200,24 +2188,21 @@ namespace TJAPlayer3
n先頭発声位置 = cChip.n発声時刻ms;
}
}
/*
//連打音符先頭の開始時刻を取得しなければならない。
//そうしなければ連打先頭と連打末端の移動開始時刻にズレが出てしまう。
if (pChip.nーツ移動開始時刻ms != 0 && ((long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) < n先頭発声位置 - pChip.nーツ移動開始時刻ms))
{
nート座標 = NotesManager.GetNoteX((pChip.n発声時刻ms - (n先頭発声位置 - pChip.nーツ移動開始時刻ms)) * pChip.dbBPM * pChip.dbSCROLL * (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0), TJAPlayer3.Skin.Game_Note_Interval);
}
else
{
nート座標 = 0;
}
*/
}
int x = NoteOriginX[nPlayer] + nート座標;
int x末端 = NoteOriginX[nPlayer] + nート末端座標;
int y = NoteOriginY[nPlayer];// + ((int)(pChip.nコース) * 100)
int y末端 = NoteOriginY[nPlayer] + nート末端座標_Y;
int y = NoteOriginY[nPlayer];
if (pChip.dbSCROLL_Y != 0.0)
{
double _scrollSpeed = pChip.dbSCROLL_Y * (this.act譜面スクロール速度.db現在の譜面スクロール速度[nPlayer] + 1.0) / 10.0;
long __dbt = (long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0));
long time = pChip.n発声時刻ms - __dbt;
float play_bpm_time = this.GetNowPBMTime(dTX, 0);
y += NotesManager.GetNoteY(pChip, time * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, false);
}
#region[ HIDSUD & STEALTH ]
@ -2338,7 +2323,7 @@ namespace TJAPlayer3
if (NotesManager.IsRoll(pChip))
{
NotesManager.DisplayRoll(nPlayer, x, y, pChip, num9, normalColor, effectedColor, x末端);
NotesManager.DisplayRoll(nPlayer, x, y, pChip, num9, normalColor, effectedColor, x末端, y末端);
if (TJAPlayer3.Tx.SENotes[(int)_gt] != null)
{

View File

@ -361,7 +361,7 @@ namespace TJAPlayer3
// Roll display
public static void DisplayRoll(int player, int x, int y, CDTX.CChip chip, int frame,
SharpDX.Color4 normalColor, SharpDX.Color4 effectedColor, int x末端)
SharpDX.Color4 normalColor, SharpDX.Color4 effectedColor, int x末端, int y末端)
{
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(player)];
@ -388,25 +388,48 @@ namespace TJAPlayer3
}
float _adjust = TJAPlayer3.Skin.Game_Notes_Size[0] / 2.0f;
float image_size = TJAPlayer3.Skin.Game_Notes_Size[0];
int index = x末端 - x;
int rollOrigin = (TJAPlayer3.Skin.Game_Notes_Size[0] * 5);
var theta = Math.Atan2(chip.dbSCROLL, chip.dbSCROLL_Y);
var theta = 0;// -Math.Atan2(chip.dbSCROLL_Y, chip.dbSCROLL);
var dist = Math.Sqrt(Math.Pow(x末端 - x, 2) + Math.Pow(y末端 - y, 2));
var div = dist / image_size;
var odiv = (index - _adjust + _adjust + 1) / TJAPlayer3.Skin.Game_Notes_Size[0];
if (TJAPlayer3.Skin.Game_RollColorMode != CSkin.RollColorMode.None)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = (index - _adjust + _adjust + 1) / TJAPlayer3.Skin.Game_Notes_Size[0];
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x + _adjust, y, new Rectangle(rollOrigin + TJAPlayer3.Skin.Game_Notes_Size[0] + _offset, 0, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
// Body
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = (float)div;
TJAPlayer3.Tx.Notes[(int)_gt].fZ軸中心回転 = (float)theta;
var _x0 = x + _adjust;
var _y0 = y + 0f;
//var _center_x = x + image_size;
//var _center_y = _adjust + (y + y末端) / 2;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, _x0, _y0, new Rectangle(rollOrigin + TJAPlayer3.Skin.Game_Notes_Size[0] + _offset, 0, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
//TJAPlayer3.Tx.Notes[(int)_gt].t2D中心基準描画(TJAPlayer3.app.Device, (int)_center_x, (int)_center_y, new Rectangle(rollOrigin + TJAPlayer3.Skin.Game_Notes_Size[0] + _offset, 0, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
//t2D拡大率考慮中央基準描画 t2D中心基準描画
// Tail
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x末端 + _adjust, y, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
_x0 = x末端 + _adjust;
_y0 = y末端 + 0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, (int)_x0, (int)_y0, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
TJAPlayer3.Tx.Notes[(int)_gt].fZ軸中心回転 = 0;
if (TJAPlayer3.Skin.Game_RollColorMode == CSkin.RollColorMode.All)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
// Head
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, 0, new Rectangle(rollOrigin + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
}