Scale scroll speed to skin resolution to avoid widescreening, fix a crash while changing skins with different bar count in game
This commit is contained in:
parent
1aff11fa65
commit
65922a29ab
@ -2545,6 +2545,8 @@ namespace TJAPlayer3
|
||||
|
||||
private void tバーの初期化()
|
||||
{
|
||||
stバー情報 = new STバー情報[TJAPlayer3.Skin.SongSelect_Bar_Count];
|
||||
|
||||
int barCenterNum = (TJAPlayer3.Skin.SongSelect_Bar_Count - 1) / 2;
|
||||
for ( int i = 0; i < TJAPlayer3.Skin.SongSelect_Bar_Count; i++ )
|
||||
{
|
||||
|
@ -1773,7 +1773,7 @@ namespace TJAPlayer3
|
||||
long time = pChip.n発声時刻ms - __dbt;
|
||||
float play_bpm_time = this.GetNowPBMTime(dTX, 0);
|
||||
|
||||
y += NotesManager.GetNoteX(pChip, time * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, false);
|
||||
y += NotesManager.GetNoteY(pChip, time * pChip.dbBPM, _scrollSpeed, TJAPlayer3.Skin.Game_Notes_Interval, play_bpm_time, configIni.eScrollMode, false);
|
||||
|
||||
/*
|
||||
if (TJAPlayer3.ConfigIni.eScrollMode == EScrollMode.Normal)
|
||||
|
@ -63,17 +63,39 @@ namespace TJAPlayer3
|
||||
public static int GetNoteX(CDTX.CChip pChip, double timems, double scroll, int interval, float play_bpm_time, EScrollMode eScrollMode, bool roll)
|
||||
{
|
||||
double hbtime = ((roll ? pChip.fBMSCROLLTime_end : pChip.fBMSCROLLTime) - (play_bpm_time));
|
||||
double screen_ratio = TJAPlayer3.Skin.Resolution[0] / 1280.0;
|
||||
switch (eScrollMode)
|
||||
{
|
||||
case EScrollMode.Normal:
|
||||
return (int)((timems / 240000.0) * interval * scroll);
|
||||
return (int)((timems / 240000.0) * interval * scroll * screen_ratio);
|
||||
case EScrollMode.BMSCROLL:
|
||||
{
|
||||
return (int)((hbtime / 16.0) * interval);
|
||||
return (int)((hbtime / 16.0) * interval * screen_ratio);
|
||||
}
|
||||
case EScrollMode.HBSCROLL:
|
||||
{
|
||||
return (int)((hbtime / 16.0) * interval * scroll);
|
||||
return (int)((hbtime / 16.0) * interval * scroll * screen_ratio);
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetNoteY(CDTX.CChip pChip, double timems, double scroll, int interval, float play_bpm_time, EScrollMode eScrollMode, bool roll)
|
||||
{
|
||||
double hbtime = ((roll ? pChip.fBMSCROLLTime_end : pChip.fBMSCROLLTime) - (play_bpm_time));
|
||||
double screen_ratio = TJAPlayer3.Skin.Resolution[1] / 720.0;
|
||||
switch (eScrollMode)
|
||||
{
|
||||
case EScrollMode.Normal:
|
||||
return (int)((timems / 240000.0) * interval * scroll * screen_ratio);
|
||||
case EScrollMode.BMSCROLL:
|
||||
{
|
||||
return (int)((hbtime / 16.0) * interval * screen_ratio);
|
||||
}
|
||||
case EScrollMode.HBSCROLL:
|
||||
{
|
||||
return (int)((hbtime / 16.0) * interval * scroll * screen_ratio);
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user