Add option to view dance points instead of percentage score in oni courses.
Eval screen numbers are probably going to overflow off the left side until we get a new number skin. Apparently arcade behavior is to *not* dim the extra digits for dance points, but I think this looks cleaner.
This commit is contained in:
@@ -402,7 +402,9 @@ GradeP1X=94
|
|||||||
GradeP2X=546
|
GradeP2X=546
|
||||||
GradeY=100
|
GradeY=100
|
||||||
PercentBaseP1X=120
|
PercentBaseP1X=120
|
||||||
|
PercentBaseDPP1X=170
|
||||||
PercentBaseP2X=572
|
PercentBaseP2X=572
|
||||||
|
PercentBaseDPP2X=622
|
||||||
PercentBaseY=134
|
PercentBaseY=134
|
||||||
JudgeLabelsX=320
|
JudgeLabelsX=320
|
||||||
MarvelousP1X=230
|
MarvelousP1X=230
|
||||||
@@ -821,6 +823,7 @@ Theme=Choose from this list of installed theme packs.::For more information abou
|
|||||||
NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README.
|
NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README.
|
||||||
HowToPlay=Toggle whether the How To Play screen is shown.
|
HowToPlay=Toggle whether the How To Play screen is shown.
|
||||||
Caution=Toggle whether the Caution screen is shown.
|
Caution=Toggle whether the Caution screen is shown.
|
||||||
|
OniScoreDisplay=Toggle whether the score in Oni mode displays Dance Points or the Dance Percent.
|
||||||
SongGroup=Toggle whether the Select Group screen is shown.
|
SongGroup=Toggle whether the Select Group screen is shown.
|
||||||
WheelSections=ALWAYS means sections in group + ABC; NEVER means no sections;::ABC ONLY shows sections in just ABC sort
|
WheelSections=ALWAYS means sections in group + ABC; NEVER means no sections;::ABC ONLY shows sections in just ABC sort
|
||||||
Translations=Choose whether to displays song titles in their native::language (日本語), or to transliterate when possible
|
Translations=Choose whether to displays song titles in their native::language (日本語), or to transliterate when possible
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ const float PERCENT_Y = 0;
|
|||||||
|
|
||||||
const float BATTERY_BLINK_TIME = 1.2f;
|
const float BATTERY_BLINK_TIME = 1.2f;
|
||||||
|
|
||||||
|
const int NUM_DANCE_POINT_DIGITS = 5;
|
||||||
|
|
||||||
|
|
||||||
LifeMeterBattery::LifeMeterBattery()
|
LifeMeterBattery::LifeMeterBattery()
|
||||||
{
|
{
|
||||||
@@ -61,10 +63,20 @@ void LifeMeterBattery::Load( PlayerNumber pn )
|
|||||||
if( bPlayerEnabled )
|
if( bPlayerEnabled )
|
||||||
this->AddChild( &m_textNumLives );
|
this->AddChild( &m_textNumLives );
|
||||||
|
|
||||||
|
if(PREFSMAN->m_bDancePointsForOni)
|
||||||
|
{
|
||||||
|
m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery dance point numbers") );
|
||||||
|
m_textPercent.TurnShadowOff();
|
||||||
|
m_textPercent.SetZoom( 0.7f );
|
||||||
|
m_textPercent.SetText( " " );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery percent numbers") );
|
m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery percent numbers") );
|
||||||
m_textPercent.TurnShadowOff();
|
m_textPercent.TurnShadowOff();
|
||||||
m_textPercent.SetZoom( 0.7f );
|
m_textPercent.SetZoom( 0.7f );
|
||||||
m_textPercent.SetText( "00.0%" );
|
m_textPercent.SetText( "00.0%" );
|
||||||
|
}
|
||||||
if( bPlayerEnabled )
|
if( bPlayerEnabled )
|
||||||
this->AddChild( &m_textPercent );
|
this->AddChild( &m_textPercent );
|
||||||
|
|
||||||
@@ -149,16 +161,24 @@ void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
|
|||||||
void LifeMeterBattery::OnDancePointsChange()
|
void LifeMeterBattery::OnDancePointsChange()
|
||||||
{
|
{
|
||||||
int iActualDancePoints = GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber];
|
int iActualDancePoints = GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber];
|
||||||
|
CString sNumToDisplay;
|
||||||
|
|
||||||
|
if(!PREFSMAN->m_bDancePointsForOni)
|
||||||
|
{
|
||||||
int iPossibleDancePoints = GAMESTATE->m_CurStageStats.iPossibleDancePoints[m_PlayerNumber];
|
int iPossibleDancePoints = GAMESTATE->m_CurStageStats.iPossibleDancePoints[m_PlayerNumber];
|
||||||
iPossibleDancePoints = max( 1, iPossibleDancePoints );
|
iPossibleDancePoints = max( 1, iPossibleDancePoints );
|
||||||
float fPercentDancePoints = iActualDancePoints / (float)iPossibleDancePoints + 0.00001f; // correct for rounding errors
|
float fPercentDancePoints = iActualDancePoints / (float)iPossibleDancePoints + 0.00001f; // correct for rounding errors
|
||||||
|
|
||||||
// LOG->Trace( "Actual %d, Possible %d, Percent %f\n", iActualDancePoints, iPossibleDancePoints, fPercentDancePoints );
|
// LOG->Trace( "Actual %d, Possible %d, Percent %f\n", iActualDancePoints, iPossibleDancePoints, fPercentDancePoints );
|
||||||
|
|
||||||
float fNumToDisplay = MAX( 0, fPercentDancePoints*100 );
|
float fNumToDisplay = MAX( 0, fPercentDancePoints*100 );
|
||||||
CString sNumToDisplay = ssprintf("%03.1f%%", fNumToDisplay);
|
sNumToDisplay = ssprintf("%03.1f%%", fNumToDisplay);
|
||||||
if( sNumToDisplay.GetLength() == 4 )
|
if( sNumToDisplay.GetLength() == 4 )
|
||||||
sNumToDisplay = "0" + sNumToDisplay;
|
sNumToDisplay = "0" + sNumToDisplay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sNumToDisplay = ssprintf( "%*d", NUM_DANCE_POINT_DIGITS , iActualDancePoints );
|
||||||
|
|
||||||
m_textPercent.SetText( sNumToDisplay );
|
m_textPercent.SetText( sNumToDisplay );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ PrefsManager::PrefsManager()
|
|||||||
m_bShowSongOptions = true;
|
m_bShowSongOptions = true;
|
||||||
m_DefaultFailType = SongOptions::FAIL_ARCADE;
|
m_DefaultFailType = SongOptions::FAIL_ARCADE;
|
||||||
m_bDDRExtremeDifficultySelect = false;
|
m_bDDRExtremeDifficultySelect = false;
|
||||||
|
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
|
||||||
|
|
||||||
/* DDR Extreme-style extra stage support.
|
/* DDR Extreme-style extra stage support.
|
||||||
* Default off so people used to the current behavior (or those with extra
|
* Default off so people used to the current behavior (or those with extra
|
||||||
@@ -178,6 +179,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
||||||
ini.GetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
ini.GetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||||
ini.GetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
|
ini.GetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
|
||||||
|
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
|
|
||||||
|
|
||||||
m_asAdditionalSongFolders.clear();
|
m_asAdditionalSongFolders.clear();
|
||||||
@@ -253,6 +255,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
||||||
ini.SetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
ini.SetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||||
ini.SetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
|
ini.SetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
|
||||||
|
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
|
|
||||||
|
|
||||||
/* Only write these if they aren't the default. This ensures that we can change
|
/* Only write these if they aren't the default. This ensures that we can change
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public:
|
|||||||
float m_fMarathonVerSongSeconds;
|
float m_fMarathonVerSongSeconds;
|
||||||
bool m_bShowSongOptions;
|
bool m_bShowSongOptions;
|
||||||
SongOptions::FailType m_DefaultFailType;
|
SongOptions::FailType m_DefaultFailType;
|
||||||
|
bool m_bDancePointsForOni;
|
||||||
|
|
||||||
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
||||||
int m_iBoostAppPriority;
|
int m_iBoostAppPriority;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ enum {
|
|||||||
AO_SKIN,
|
AO_SKIN,
|
||||||
AO_INSTRUCTIONS,
|
AO_INSTRUCTIONS,
|
||||||
AO_CAUTION,
|
AO_CAUTION,
|
||||||
|
AO_DANCE_POINTS_FOR_ONI,
|
||||||
AO_SELECT_GROUP,
|
AO_SELECT_GROUP,
|
||||||
AO_WHEEL_SECTIONS,
|
AO_WHEEL_SECTIONS,
|
||||||
AO_SHOW_TRANSLATIONS,
|
AO_SHOW_TRANSLATIONS,
|
||||||
@@ -46,6 +47,7 @@ OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = {
|
|||||||
{ "Note\nSkin", 0, {""} }, // fill this in on ImportOptions()
|
{ "Note\nSkin", 0, {""} }, // fill this in on ImportOptions()
|
||||||
{ "How To\nPlay", 2, {"SKIP","SHOW"} },
|
{ "How To\nPlay", 2, {"SKIP","SHOW"} },
|
||||||
{ "Caution", 2, {"SKIP","SHOW"} },
|
{ "Caution", 2, {"SKIP","SHOW"} },
|
||||||
|
{ "Oni Score\nDisplay", 2, {"PERCENT","DANCE POINTS"} },
|
||||||
{ "Song\nGroup", 2, {"ALL MUSIC","CHOOSE"} },
|
{ "Song\nGroup", 2, {"ALL MUSIC","CHOOSE"} },
|
||||||
{ "Wheel\nSections", 3, {"NEVER","ALWAYS", "ABC ONLY"} },
|
{ "Wheel\nSections", 3, {"NEVER","ALWAYS", "ABC ONLY"} },
|
||||||
{ "Translations", 2, {"NATIVE","TRANSLITERATE"} },
|
{ "Translations", 2, {"NATIVE","TRANSLITERATE"} },
|
||||||
@@ -160,6 +162,7 @@ void ScreenAppearanceOptions::ImportOptions()
|
|||||||
m_iSelectedOption[0][AO_INSTRUCTIONS] = PREFSMAN->m_bInstructions? 1:0;
|
m_iSelectedOption[0][AO_INSTRUCTIONS] = PREFSMAN->m_bInstructions? 1:0;
|
||||||
m_iSelectedOption[0][AO_CAUTION] = PREFSMAN->m_bShowDontDie? 1:0;
|
m_iSelectedOption[0][AO_CAUTION] = PREFSMAN->m_bShowDontDie? 1:0;
|
||||||
// m_iSelectedOption[0][AO_DIFF_SELECT] = PREFSMAN->m_bDDRExtremeDifficultySelect? 1:0;
|
// m_iSelectedOption[0][AO_DIFF_SELECT] = PREFSMAN->m_bDDRExtremeDifficultySelect? 1:0;
|
||||||
|
m_iSelectedOption[0][AO_DANCE_POINTS_FOR_ONI] = PREFSMAN->m_bDancePointsForOni? 1:0;
|
||||||
m_iSelectedOption[0][AO_SELECT_GROUP] = PREFSMAN->m_bShowSelectGroup? 1:0;
|
m_iSelectedOption[0][AO_SELECT_GROUP] = PREFSMAN->m_bShowSelectGroup? 1:0;
|
||||||
m_iSelectedOption[0][AO_WHEEL_SECTIONS] = (int)PREFSMAN->m_MusicWheelUsesSections;
|
m_iSelectedOption[0][AO_WHEEL_SECTIONS] = (int)PREFSMAN->m_MusicWheelUsesSections;
|
||||||
m_iSelectedOption[0][AO_SHOW_TRANSLATIONS] = PREFSMAN->m_bShowTranslations;
|
m_iSelectedOption[0][AO_SHOW_TRANSLATIONS] = PREFSMAN->m_bShowTranslations;
|
||||||
@@ -190,6 +193,7 @@ void ScreenAppearanceOptions::ExportOptions()
|
|||||||
PREFSMAN->m_bShowSelectGroup = !!m_iSelectedOption[0][AO_SELECT_GROUP];
|
PREFSMAN->m_bShowSelectGroup = !!m_iSelectedOption[0][AO_SELECT_GROUP];
|
||||||
(int&)PREFSMAN->m_MusicWheelUsesSections = m_iSelectedOption[0][AO_WHEEL_SECTIONS];
|
(int&)PREFSMAN->m_MusicWheelUsesSections = m_iSelectedOption[0][AO_WHEEL_SECTIONS];
|
||||||
PREFSMAN->m_bShowTranslations = !!m_iSelectedOption[0][AO_SHOW_TRANSLATIONS];
|
PREFSMAN->m_bShowTranslations = !!m_iSelectedOption[0][AO_SHOW_TRANSLATIONS];
|
||||||
|
PREFSMAN->m_bDancePointsForOni = !!m_iSelectedOption[0][AO_DANCE_POINTS_FOR_ONI];
|
||||||
|
|
||||||
PREFSMAN->SaveGamePrefsToDisk();
|
PREFSMAN->SaveGamePrefsToDisk();
|
||||||
PREFSMAN->SaveGlobalPrefsToDisk();
|
PREFSMAN->SaveGlobalPrefsToDisk();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#define GRADE_X( p ) THEME->GetMetricF("ScreenEvaluation",ssprintf("GradeP%dX",p+1))
|
#define GRADE_X( p ) THEME->GetMetricF("ScreenEvaluation",ssprintf("GradeP%dX",p+1))
|
||||||
#define GRADE_Y THEME->GetMetricF("ScreenEvaluation","GradeY")
|
#define GRADE_Y THEME->GetMetricF("ScreenEvaluation","GradeY")
|
||||||
#define PERCENT_BASE_X( p ) THEME->GetMetricF("ScreenEvaluation",ssprintf("PercentBaseP%dX",p+1))
|
#define PERCENT_BASE_X( p ) THEME->GetMetricF("ScreenEvaluation",ssprintf("PercentBaseP%dX",p+1))
|
||||||
|
#define PERCENT_BASE_DP_X( p ) THEME->GetMetricF("ScreenEvaluation",ssprintf("PercentBaseDPP%dX",p+1))
|
||||||
#define PERCENT_BASE_Y THEME->GetMetricF("ScreenEvaluation","PercentBaseY")
|
#define PERCENT_BASE_Y THEME->GetMetricF("ScreenEvaluation","PercentBaseY")
|
||||||
#define JUDGE_LABELS_X THEME->GetMetricF("ScreenEvaluation","JudgeLabelsX")
|
#define JUDGE_LABELS_X THEME->GetMetricF("ScreenEvaluation","JudgeLabelsX")
|
||||||
#define MARVELOUS_X(o,p) THEME->GetMetricF("ScreenEvaluation",ssprintf("Marvelous%sP%dX",o?"Oni":"",p+1))
|
#define MARVELOUS_X(o,p) THEME->GetMetricF("ScreenEvaluation",ssprintf("Marvelous%sP%dX",o?"Oni":"",p+1))
|
||||||
@@ -327,12 +328,14 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
|
|
||||||
m_textOniPercentLarge[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") );
|
m_textOniPercentLarge[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") );
|
||||||
m_textOniPercentLarge[p].TurnShadowOff();
|
m_textOniPercentLarge[p].TurnShadowOff();
|
||||||
m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
|
m_textOniPercentLarge[p].SetXY( (PREFSMAN->m_bDancePointsForOni ? PERCENT_BASE_DP_X(p) : PERCENT_BASE_X(p) ), PERCENT_BASE_Y );
|
||||||
m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right );
|
m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right );
|
||||||
m_textOniPercentLarge[p].SetVertAlign( Actor::align_bottom );
|
m_textOniPercentLarge[p].SetVertAlign( Actor::align_bottom );
|
||||||
m_textOniPercentLarge[p].SetEffectGlowShift( 2.5f );
|
m_textOniPercentLarge[p].SetEffectGlowShift( 2.5f );
|
||||||
this->AddChild( &m_textOniPercentLarge[p] );
|
this->AddChild( &m_textOniPercentLarge[p] );
|
||||||
|
|
||||||
|
if(!PREFSMAN->m_bDancePointsForOni)
|
||||||
|
{
|
||||||
m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") );
|
m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") );
|
||||||
m_textOniPercentSmall[p].TurnShadowOff();
|
m_textOniPercentSmall[p].TurnShadowOff();
|
||||||
m_textOniPercentSmall[p].SetZoom( 0.5f );
|
m_textOniPercentSmall[p].SetZoom( 0.5f );
|
||||||
@@ -341,7 +344,12 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
m_textOniPercentSmall[p].SetVertAlign( Actor::align_bottom );
|
m_textOniPercentSmall[p].SetVertAlign( Actor::align_bottom );
|
||||||
m_textOniPercentSmall[p].SetEffectGlowShift( 2.5f );
|
m_textOniPercentSmall[p].SetEffectGlowShift( 2.5f );
|
||||||
this->AddChild( &m_textOniPercentSmall[p] );
|
this->AddChild( &m_textOniPercentSmall[p] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if(PREFSMAN->m_bDancePointsForOni)
|
||||||
|
m_textOniPercentLarge[p].SetText( ssprintf("%d", stageStats.iActualDancePoints[p]) );
|
||||||
|
else
|
||||||
|
{
|
||||||
stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] );
|
stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] );
|
||||||
float fPercentDancePoints = stageStats.iActualDancePoints[p] / (float)stageStats.iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
|
float fPercentDancePoints = stageStats.iActualDancePoints[p] / (float)stageStats.iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
|
||||||
fPercentDancePoints = max( fPercentDancePoints, 0 );
|
fPercentDancePoints = max( fPercentDancePoints, 0 );
|
||||||
@@ -349,6 +357,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
int iPercentDancePointsSmall = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 );
|
int iPercentDancePointsSmall = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 );
|
||||||
m_textOniPercentLarge[p].SetText( ssprintf("%02d", iPercentDancePointsLarge) );
|
m_textOniPercentLarge[p].SetText( ssprintf("%02d", iPercentDancePointsLarge) );
|
||||||
m_textOniPercentSmall[p].SetText( ssprintf(".%01d%%", iPercentDancePointsSmall) );
|
m_textOniPercentSmall[p].SetText( ssprintf(".%01d%%", iPercentDancePointsSmall) );
|
||||||
|
}
|
||||||
|
|
||||||
// StageInfo stuff
|
// StageInfo stuff
|
||||||
m_sprCourseFrame[p].Load( THEME->GetPathTo("Graphics","evaluation stage frame 2x1") );
|
m_sprCourseFrame[p].Load( THEME->GetPathTo("Graphics","evaluation stage frame 2x1") );
|
||||||
|
|||||||
Reference in New Issue
Block a user