header2 -> Common title
Created new PlayerOption group: Perspective Added pref: DefaultModifiers Land -> Brake
This commit is contained in:
@@ -44,10 +44,10 @@ float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
|
||||
float fNewYOffset = fYOffset * 1.5f / ((fYOffset+SCREEN_HEIGHT/1.2f)/SCREEN_HEIGHT);
|
||||
fYAdjust += fAccels[PlayerOptions::ACCEL_BOOST] * (fNewYOffset - fYOffset);
|
||||
}
|
||||
if( fAccels[PlayerOptions::ACCEL_LAND] > 0 )
|
||||
if( fAccels[PlayerOptions::ACCEL_BRAKE] > 0 )
|
||||
{
|
||||
float fNewYOffset = fYOffset * SCALE( fYOffset, 0.f, SCREEN_HEIGHT, 0.25f, 1.5f );
|
||||
fYAdjust += fAccels[PlayerOptions::ACCEL_LAND] * (fNewYOffset - fYOffset);
|
||||
fYAdjust += fAccels[PlayerOptions::ACCEL_BRAKE] * (fNewYOffset - fYOffset);
|
||||
}
|
||||
if( fAccels[PlayerOptions::ACCEL_WAVE] > 0 )
|
||||
fYAdjust += fAccels[PlayerOptions::ACCEL_WAVE] * 20.0f*sinf( fYOffset/38.0f );
|
||||
|
||||
@@ -67,7 +67,7 @@ EditMenu::EditMenu()
|
||||
|
||||
for( i=0; i<NUM_ROWS; i++ )
|
||||
{
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","Common title") );
|
||||
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||
m_textLabel[i].SetText( RowToString((Row)i) );
|
||||
m_textLabel[i].SetZoom( 0.8f );
|
||||
|
||||
@@ -45,7 +45,7 @@ JukeboxMenu::JukeboxMenu()
|
||||
|
||||
for( i=0; i<NUM_ROWS; i++ )
|
||||
{
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","Common title") );
|
||||
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||
m_textLabel[i].SetText( RowToString((Row)i) );
|
||||
m_textLabel[i].SetZoom( 0.8f );
|
||||
|
||||
@@ -214,6 +214,20 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||
|
||||
//
|
||||
// Adjust draw range depending on some effects
|
||||
//
|
||||
int iFirstPixelToDraw = m_iFirstPixelToDraw;
|
||||
int iLastPixelToDraw = m_iLastPixelToDraw;
|
||||
|
||||
float fDrawScale = 1;
|
||||
fDrawScale *= 1 + fabsf( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fPerspectiveTilt );
|
||||
fDrawScale *= 1 + fabsf( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fEffects[PlayerOptions::EFFECT_MINI] );
|
||||
|
||||
iFirstPixelToDraw *= fDrawScale;
|
||||
iLastPixelToDraw *= fDrawScale;
|
||||
|
||||
|
||||
// CPU OPTIMIZATION OPPORTUNITY:
|
||||
// change this probing to binary search
|
||||
|
||||
@@ -223,7 +237,7 @@ void NoteField::DrawPrimitives()
|
||||
{
|
||||
float fYOffset = ArrowGetYOffset(m_PlayerNumber, fFirstBeatToDraw);
|
||||
float fYPosWOReverse = ArrowGetYPosWithoutReverse(m_PlayerNumber, fYOffset );
|
||||
if( fYPosWOReverse < m_iFirstPixelToDraw ) // off screen
|
||||
if( fYPosWOReverse < iFirstPixelToDraw ) // off screen
|
||||
fFirstBeatToDraw += 0.1f; // move toward fSongBeat
|
||||
else // on screen
|
||||
break; // stop probing
|
||||
@@ -236,7 +250,7 @@ void NoteField::DrawPrimitives()
|
||||
{
|
||||
float fYOffset = ArrowGetYOffset(m_PlayerNumber, fLastBeatToDraw);
|
||||
float fYPosWOReverse = ArrowGetYPosWithoutReverse(m_PlayerNumber, fYOffset );
|
||||
if( fYPosWOReverse > m_iLastPixelToDraw ) // off screen
|
||||
if( fYPosWOReverse > iLastPixelToDraw ) // off screen
|
||||
fLastBeatToDraw -= 0.1f; // move toward fSongBeat
|
||||
else // on screen
|
||||
break; // stop probing
|
||||
|
||||
@@ -39,35 +39,33 @@ struct OptionColumnEntry
|
||||
|
||||
const OptionColumnEntry g_OptionColumnEntries[] =
|
||||
{
|
||||
{"Boost", 0},
|
||||
{"Land", 0},
|
||||
{"Wave", 0},
|
||||
{"Expand", 0},
|
||||
{"Boomerang",0},
|
||||
{"Drunk", 1},
|
||||
{"Dizzy", 1},
|
||||
{"Space", 1},
|
||||
{"Mini", 1},
|
||||
{"Flip", 1},
|
||||
{"Tornado", 1},
|
||||
{"Hidden", 2},
|
||||
{"Sudden", 2},
|
||||
{"Stealth", 2},
|
||||
{"Blink", 2},
|
||||
{"Mirror", 3},
|
||||
{"Left", 3},
|
||||
{"Right", 3},
|
||||
{"Shuffle", 3},
|
||||
{"SuperShuffle", 3},
|
||||
{"Little", 4},
|
||||
{"NoHolds", 4},
|
||||
{"Dark", 4},
|
||||
{"Reverse", 5},
|
||||
{"Note", 6},
|
||||
{"Flat", 6},
|
||||
{"Plain", 6},
|
||||
{"Boost", 0},
|
||||
{"Brake", 0},
|
||||
{"Wave", 0},
|
||||
{"Expand", 0},
|
||||
{"Boomerang", 0},
|
||||
{"Drunk", 1},
|
||||
{"Dizzy", 1},
|
||||
{"Mini", 1},
|
||||
{"Flip", 1},
|
||||
{"Tornado", 1},
|
||||
{"Hidden", 2},
|
||||
{"Sudden", 2},
|
||||
{"Stealth", 2},
|
||||
{"Blink", 2},
|
||||
{"Mirror", 3},
|
||||
{"Left", 3},
|
||||
{"Right", 3},
|
||||
{"Shuffle", 3},
|
||||
{"SuperShuffle",3},
|
||||
{"Little", 4},
|
||||
{"NoHolds", 4},
|
||||
{"Dark", 4},
|
||||
{"Reverse", 5},
|
||||
{"Incoming", 6},
|
||||
{"Space", 6},
|
||||
|
||||
{"TimingAssist", -1},
|
||||
{"TimingAssist",-1},
|
||||
};
|
||||
const int NUM_OPTION_COL_ENTRIES = sizeof(g_OptionColumnEntries)/sizeof(OptionColumnEntry);
|
||||
|
||||
@@ -85,7 +83,7 @@ int OptionToPreferredColumn( CString sOptionText )
|
||||
return g_OptionColumnEntries[i].iSlotIndex;
|
||||
|
||||
LOG->Warn("Unknown option: '%s'", sOptionText.GetString() );
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OptionIconRow::Refresh( PlayerNumber pn )
|
||||
|
||||
+10
-21
@@ -127,18 +127,6 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
||||
int iStartDrawingAtPixels = GAMESTATE->m_bEditing ? -100 : START_DRAWING_AT_PIXELS;
|
||||
int iStopDrawingAtPixels = GAMESTATE->m_bEditing ? 400 : STOP_DRAWING_AT_PIXELS;
|
||||
|
||||
// If both options are on, we *do* need to multiply it twice.
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_fEffects[PlayerOptions::EFFECT_MINI]==1 )
|
||||
{
|
||||
iStartDrawingAtPixels *= 2;
|
||||
iStopDrawingAtPixels *= 2;
|
||||
}
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_fEffects[PlayerOptions::EFFECT_SPACE]==1 )
|
||||
{
|
||||
iStartDrawingAtPixels *= 2;
|
||||
iStopDrawingAtPixels *= 2;
|
||||
}
|
||||
|
||||
m_NoteField.Load( (NoteData*)this, pn, iStartDrawingAtPixels, iStopDrawingAtPixels );
|
||||
|
||||
m_GrayArrowRow.Load( pn );
|
||||
@@ -269,20 +257,21 @@ void Player::DrawPrimitives()
|
||||
{
|
||||
m_Combo.Draw(); // draw this below everything else
|
||||
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fEffects[PlayerOptions::EFFECT_SPACE] == 1 )
|
||||
float fTilt = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fPerspectiveTilt;
|
||||
bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll==1;
|
||||
float fReverseScale = bReverse ? -1 : 1;
|
||||
|
||||
if( fTilt != 0 )
|
||||
{
|
||||
DISPLAY->PushMatrix();
|
||||
DISPLAY->EnterPerspective(45, false);
|
||||
|
||||
// construct view and project matrix
|
||||
RageVector3 Eye, At, Up( 0.0f, 1.0f, 0.0f );
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll==1 ) {
|
||||
Eye = RageVector3( CENTER_X, -300.0f, 400.0f );
|
||||
At = RageVector3( CENTER_X, 100.0f, 0.0f );
|
||||
} else {
|
||||
Eye = RageVector3( CENTER_X, 800, 400 );
|
||||
At = RageVector3( CENTER_X, 400, 0.0f );
|
||||
}
|
||||
Eye = RageVector3( CENTER_X, CENTER_Y+SCALE(fTilt*fReverseScale,-1,1,-350,350), 500 );
|
||||
// give a push the receptors toward the edge of the screen so they aren't so far in the middle
|
||||
float fYOffset = SCALE(fTilt,-1,+1,10*fReverseScale,60*fReverseScale);
|
||||
At = RageVector3( CENTER_X, CENTER_Y+fYOffset, 0 );
|
||||
|
||||
DISPLAY->LookAt(Eye, At, Up);
|
||||
}
|
||||
@@ -293,7 +282,7 @@ void Player::DrawPrimitives()
|
||||
m_NoteField.Draw();
|
||||
m_GhostArrowRow.Draw();
|
||||
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fEffects[PlayerOptions::EFFECT_SPACE]==1 )
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fPerspectiveTilt != 0 )
|
||||
{
|
||||
DISPLAY->ExitPerspective();
|
||||
DISPLAY->PopMatrix();
|
||||
|
||||
@@ -27,6 +27,7 @@ void PlayerOptions::Init()
|
||||
m_Transform = TRANSFORM_NONE;
|
||||
m_bHoldNotes = true;
|
||||
m_bTimingAssist = false;
|
||||
m_fPerspectiveTilt = 0;
|
||||
}
|
||||
|
||||
void FLOAT_APPROACH( float& val, float other_val, float deltaPercent )
|
||||
@@ -54,6 +55,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
FLOAT_APPROACH( m_fAppearances[i], other.m_fAppearances[i], fDeltaSeconds );
|
||||
FLOAT_APPROACH( m_fReverseScroll, other.m_fReverseScroll, fDeltaSeconds );
|
||||
FLOAT_APPROACH( m_fDark, other.m_fDark, fDeltaSeconds );
|
||||
FLOAT_APPROACH( m_fPerspectiveTilt, other.m_fPerspectiveTilt, fDeltaSeconds );
|
||||
}
|
||||
|
||||
CString PlayerOptions::GetString()
|
||||
@@ -76,14 +78,13 @@ CString PlayerOptions::GetString()
|
||||
}
|
||||
|
||||
if( m_fAccels[ACCEL_BOOST]==1 ) sReturn += "Boost, ";
|
||||
if( m_fAccels[ACCEL_LAND]==1 ) sReturn += "Land, ";
|
||||
if( m_fAccels[ACCEL_BRAKE]==1 ) sReturn += "Brake, ";
|
||||
if( m_fAccels[ACCEL_WAVE]==1 ) sReturn += "Wave, ";
|
||||
if( m_fAccels[ACCEL_EXPAND]==1 ) sReturn += "Expand, ";
|
||||
if( m_fAccels[ACCEL_BOOMERANG]==1 ) sReturn += "Boomerang, ";
|
||||
|
||||
if( m_fEffects[EFFECT_DRUNK]==1 ) sReturn += "Drunk, ";
|
||||
if( m_fEffects[EFFECT_DIZZY]==1 ) sReturn += "Dizzy, ";
|
||||
if( m_fEffects[EFFECT_SPACE]==1 ) sReturn += "Space, ";
|
||||
if( m_fEffects[EFFECT_MINI]==1 ) sReturn += "Mini, ";
|
||||
if( m_fEffects[EFFECT_FLIP]==1 ) sReturn += "Flip, ";
|
||||
if( m_fEffects[EFFECT_TORNADO]==1 ) sReturn += "Tornado, ";
|
||||
@@ -97,7 +98,6 @@ CString PlayerOptions::GetString()
|
||||
|
||||
if( m_fDark == 1) sReturn += "Dark, ";
|
||||
|
||||
|
||||
switch( m_Turn )
|
||||
{
|
||||
case TURN_NONE: break;
|
||||
@@ -123,6 +123,12 @@ CString PlayerOptions::GetString()
|
||||
if( !m_bHoldNotes ) sReturn += "NoHolds, ";
|
||||
if( m_bTimingAssist ) sReturn += "TimingAssist, ";
|
||||
|
||||
switch( (int)m_fPerspectiveTilt )
|
||||
{
|
||||
case -1: sReturn += "Incoming, "; break;
|
||||
case +1: sReturn += "Space, "; break;
|
||||
}
|
||||
|
||||
if( sReturn.GetLength() > 2 )
|
||||
sReturn.erase( sReturn.GetLength()-2 ); // delete the trailing ", "
|
||||
return sReturn;
|
||||
@@ -153,13 +159,12 @@ void PlayerOptions::FromString( CString sOptions )
|
||||
else if( sBit == "5.0x" ) m_fScrollSpeed = 5.0f;
|
||||
else if( sBit == "8.0x" ) m_fScrollSpeed = 8.0f;
|
||||
else if( sBit == "boost" ) m_fAccels[ACCEL_BOOST] = 1;
|
||||
else if( sBit == "land" ) m_fAccels[ACCEL_LAND] = 1;
|
||||
else if( sBit == "brake" ) m_fAccels[ACCEL_BRAKE] = 1;
|
||||
else if( sBit == "wave" ) m_fAccels[ACCEL_WAVE] = 1;
|
||||
else if( sBit == "expand" ) m_fAccels[ACCEL_EXPAND] = 1;
|
||||
else if( sBit == "boomerang" ) m_fAccels[ACCEL_BOOMERANG] = 1;
|
||||
else if( sBit == "drunk" ) m_fEffects[EFFECT_DRUNK] = 1;
|
||||
else if( sBit == "dizzy" ) m_fEffects[EFFECT_DIZZY] = 1;
|
||||
else if( sBit == "space" ) m_fEffects[EFFECT_SPACE] = 1;
|
||||
else if( sBit == "mini" ) m_fEffects[EFFECT_MINI] = 1;
|
||||
else if( sBit == "flip" ) m_fEffects[EFFECT_FLIP] = 1;
|
||||
else if( sBit == "tornado" ) m_fEffects[EFFECT_TORNADO] = 1;
|
||||
@@ -182,6 +187,8 @@ void PlayerOptions::FromString( CString sOptions )
|
||||
else if( sBit == "nofreeze" ) m_bHoldNotes = false;
|
||||
else if( sBit == "dark" ) m_fDark = 1;
|
||||
else if( sBit == "timingassist")m_bTimingAssist = true;
|
||||
else if( sBit == "incoming" ) m_fPerspectiveTilt = -1;
|
||||
else if( sBit == "space" ) m_fPerspectiveTilt = +1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,6 +239,16 @@ void PlayerOptions::NextTransform()
|
||||
m_Transform = (Transform) ((m_Transform+1)%NUM_TRANSFORMS);
|
||||
}
|
||||
|
||||
void PlayerOptions::NextPerspective()
|
||||
{
|
||||
switch( (int)m_fPerspectiveTilt )
|
||||
{
|
||||
case -1: m_fPerspectiveTilt = 0; break;
|
||||
case 0: m_fPerspectiveTilt = +1; break;
|
||||
case +1: default: m_fPerspectiveTilt = -1; break;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerOptions::ChooseRandomMofifiers()
|
||||
{
|
||||
if( RandomFloat(0,1)>0.8f )
|
||||
|
||||
@@ -23,7 +23,7 @@ struct PlayerOptions
|
||||
|
||||
enum Accel {
|
||||
ACCEL_BOOST,
|
||||
ACCEL_LAND,
|
||||
ACCEL_BRAKE,
|
||||
ACCEL_WAVE,
|
||||
ACCEL_EXPAND,
|
||||
ACCEL_BOOMERANG,
|
||||
@@ -32,7 +32,6 @@ struct PlayerOptions
|
||||
enum Effect {
|
||||
EFFECT_DRUNK,
|
||||
EFFECT_DIZZY,
|
||||
EFFECT_SPACE,
|
||||
EFFECT_MINI,
|
||||
EFFECT_FLIP,
|
||||
EFFECT_TORNADO,
|
||||
@@ -63,7 +62,6 @@ struct PlayerOptions
|
||||
TRANSFORM_SKIPPY,
|
||||
NUM_TRANSFORMS
|
||||
};
|
||||
|
||||
|
||||
float m_fScrollSpeed;
|
||||
float m_fAccels[NUM_ACCELS];
|
||||
@@ -75,12 +73,14 @@ struct PlayerOptions
|
||||
Transform m_Transform;
|
||||
bool m_bHoldNotes;
|
||||
bool m_bTimingAssist;
|
||||
float m_fPerspectiveTilt; // -1 = near, 0 = overhead, +1 = space
|
||||
|
||||
void NextAccel();
|
||||
void NextEffect();
|
||||
void NextAppearance();
|
||||
void NextTurn();
|
||||
void NextTransform();
|
||||
void NextPerspective();
|
||||
|
||||
Accel GetFirstAccel();
|
||||
Effect GetFirstEffect();
|
||||
|
||||
@@ -85,7 +85,6 @@ PrefsManager::PrefsManager()
|
||||
m_iBoostAppPriority = -1;
|
||||
m_iPolygonRadar = -1;
|
||||
m_bShowSongOptions = true;
|
||||
m_DefaultFailType = SongOptions::FAIL_ARCADE;
|
||||
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
|
||||
m_bTimestamping = false;
|
||||
m_bShowLyrics = true;
|
||||
@@ -184,14 +183,14 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||
ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
|
||||
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
||||
ini.GetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||
ini.GetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||
ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||
ini.GetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
|
||||
|
||||
m_asAdditionalSongFolders.clear();
|
||||
CString sAdditionalSongFolders;
|
||||
@@ -264,7 +263,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||
ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
|
||||
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
|
||||
ini.SetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||
ini.SetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||
@@ -272,6 +270,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||
ini.SetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||
ini.SetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
|
||||
|
||||
|
||||
/* Only write these if they aren't the default. This ensures that we can change
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
|
||||
int m_iMusicWheelSwitchSpeed;
|
||||
bool m_bChangeBannersWhenFast;
|
||||
bool m_bDDRExtremeDifficultySelect;
|
||||
bool m_bEasterEggs;
|
||||
bool m_bMarvelousTiming;
|
||||
enum { COIN_HOME, COIN_PAY, COIN_FREE, NUM_COIN_MODES } m_CoinMode;
|
||||
@@ -70,12 +69,12 @@ public:
|
||||
float m_fMarathonVerSongSeconds;
|
||||
bool m_bShowSongOptions;
|
||||
bool m_bSoloSingle;
|
||||
SongOptions::FailType m_DefaultFailType;
|
||||
bool m_bDancePointsForOni;
|
||||
bool m_bTimestamping;
|
||||
bool m_bShowLyrics;
|
||||
bool m_bAutogenMissingTypes;
|
||||
bool m_bAutogenGroupCourses;
|
||||
CString m_sDefaultModifiers;
|
||||
|
||||
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
||||
int m_iBoostAppPriority;
|
||||
@@ -83,8 +82,8 @@ public:
|
||||
/* 0 = no; 1 = yes; -1 = auto (turn on for known-bad drivers) */
|
||||
int m_iPolygonRadar;
|
||||
|
||||
CStringArray m_asAdditionalSongFolders;
|
||||
CString m_DWIPath;
|
||||
CStringArray m_asAdditionalSongFolders;
|
||||
CString m_DWIPath;
|
||||
|
||||
CString m_sSoundDrivers;
|
||||
float m_fSoundVolume;
|
||||
|
||||
@@ -685,7 +685,7 @@ void RageDisplay::EnterPerspective(float fov, bool preserve_loc)
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
float aspect = SCREEN_WIDTH/(float)SCREEN_HEIGHT;
|
||||
gluPerspective(fov, aspect, 1.000f, 1000.0f);
|
||||
gluPerspective(fov, aspect, 1.000f, 1000.0f); // This far clipping this might cause Z-fighting if we ever turn the z-buffer on
|
||||
|
||||
/* Flip the Y coordinate, so positive numbers go down. */
|
||||
glScalef(1, -1, 1);
|
||||
|
||||
@@ -337,10 +337,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
|
||||
m_Grades[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation grades") );
|
||||
m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] );
|
||||
m_Grades[p].Command( GRADE_ON_COMMAND(p) );
|
||||
if( SPIN_GRADES )
|
||||
m_Grades[p].Spin();
|
||||
else
|
||||
m_Grades[p].Command( GRADE_ON_COMMAND(p) );
|
||||
this->AddChild( &m_Grades[p] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
||||
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) // only load if we're going to use it
|
||||
{
|
||||
m_textSurviveTime.LoadFromFont( THEME->GetPathTo("Fonts","ScreenGameplay survive time") );
|
||||
m_textSurviveTime.LoadFromFont( THEME->GetPathTo("Numbers","ScreenGameplay survive time") );
|
||||
m_textSurviveTime.EnableShadow( false );
|
||||
m_textSurviveTime.SetXY( SURVIVE_TIME_X, SURVIVE_TIME_Y );
|
||||
m_textSurviveTime.SetText( "" );
|
||||
|
||||
@@ -97,7 +97,7 @@ bool ScreenJukebox::PrepareForJukebox() // always return true.
|
||||
* too much. */
|
||||
GAMESTATE->m_PlayerOptions[p] = PlayerOptions();
|
||||
GAMESTATE->m_PlayerOptions[p].m_fScrollSpeed = .25f;
|
||||
GAMESTATE->m_PlayerOptions[p].m_fEffects[ PlayerOptions::EFFECT_SPACE ] = 1;
|
||||
GAMESTATE->m_PlayerOptions[p].m_fPerspectiveTilt = -1;
|
||||
GAMESTATE->m_PlayerOptions[p].m_fEffects[ PlayerOptions::EFFECT_MINI ] = 1;
|
||||
}
|
||||
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "RageLog.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "PlayerOptions.h"
|
||||
#include "SongOptions.h"
|
||||
|
||||
|
||||
enum {
|
||||
@@ -97,7 +99,9 @@ void ScreenMachineOptions::ImportOptions()
|
||||
else if( PREFSMAN->m_fLifeDifficultyScale == 0.40f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 6;
|
||||
else m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 3;
|
||||
|
||||
m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_DefaultFailType;
|
||||
SongOptions so;
|
||||
so.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
m_iSelectedOption[0][MO_FAIL] = so.m_FailType;
|
||||
m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||
m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_CoinMode;
|
||||
m_iSelectedOption[0][MO_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1;
|
||||
@@ -135,8 +139,26 @@ void ScreenMachineOptions::ExportOptions()
|
||||
case 6: PREFSMAN->m_fLifeDifficultyScale = 0.40f; break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
(int&)PREFSMAN->m_DefaultFailType = m_iSelectedOption[0][MO_FAIL];
|
||||
|
||||
CString sModifiers = PREFSMAN->m_sDefaultModifiers;
|
||||
PlayerOptions po;
|
||||
po.FromString( sModifiers );
|
||||
SongOptions so;
|
||||
so.FromString( sModifiers );
|
||||
switch( m_iSelectedOption[0][MO_FAIL] )
|
||||
{
|
||||
case 0: so.m_FailType = SongOptions::FAIL_ARCADE; break;
|
||||
case 1: so.m_FailType = SongOptions::FAIL_END_OF_SONG; break;
|
||||
case 2: so.m_FailType = SongOptions::FAIL_OFF; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
CStringArray as;
|
||||
if( po.GetString() != "" )
|
||||
as.push_back( po.GetString() );
|
||||
if( so.GetString() != "" )
|
||||
as.push_back( so.GetString() );
|
||||
PREFSMAN->m_sDefaultModifiers = join(", ",as);
|
||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
|
||||
(int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE];
|
||||
PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1;
|
||||
|
||||
@@ -51,7 +51,7 @@ ScreenMapControllers::ScreenMapControllers()
|
||||
CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[b];
|
||||
CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[b];
|
||||
|
||||
m_textName[b].LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||
m_textName[b].LoadFromFont( THEME->GetPathTo("Fonts","Common title") );
|
||||
m_textName[b].SetXY( CENTER_X, LINE_START_Y + b*LINE_GAP_Y-6 );
|
||||
|
||||
m_textName[b].SetText( sName );
|
||||
@@ -59,7 +59,7 @@ ScreenMapControllers::ScreenMapControllers()
|
||||
m_textName[b].SetShadowLength( 2 );
|
||||
this->AddChild( &m_textName[b] );
|
||||
|
||||
m_textName2[b].LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||
m_textName2[b].LoadFromFont( THEME->GetPathTo("Fonts","Common title") );
|
||||
m_textName2[b].SetXY( CENTER_X, LINE_START_Y + b*LINE_GAP_Y+6 );
|
||||
m_textName2[b].SetText( sSecondary );
|
||||
m_textName2[b].SetZoom( 0.5f );
|
||||
|
||||
@@ -32,12 +32,13 @@ enum {
|
||||
PO_NOTE_SKIN,
|
||||
PO_HOLD_NOTES,
|
||||
PO_DARK,
|
||||
PO_PERSPECTIVE,
|
||||
NUM_PLAYER_OPTIONS_LINES
|
||||
};
|
||||
OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
|
||||
OptionRow( "Speed", "x0.25","x0.5","x0.75","x1","x1.5","x2","x3","x4","x5","x8", "x12" ),
|
||||
OptionRow( "Acceler\n-ation", "OFF","BOOST","LAND","WAVE","EXPAND","BOOMERANG" ),
|
||||
OptionRow( "Effect", "OFF","DRUNK","DIZZY","SPACE","MINI","FLIP","TORNADO" ),
|
||||
OptionRow( "Acceler\n-ation", "OFF","BOOST","BRAKE","WAVE","EXPAND","BOOMERANG" ),
|
||||
OptionRow( "Effect", "OFF","DRUNK","DIZZY","MINI","FLIP","TORNADO" ),
|
||||
OptionRow( "Appear\n-ance", "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK" ),
|
||||
OptionRow( "Turn", "OFF","MIRROR","LEFT","RIGHT","SHUFFLE","SUPER SHUFFLE" ),
|
||||
OptionRow( "Trans\n-form", "OFF","LITTLE","WIDE","BIG","QUICK","SKIPPY" ),
|
||||
@@ -45,6 +46,7 @@ OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
|
||||
OptionRow( "Note\nSkin", "" ),
|
||||
OptionRow( "Holds", "OFF","ON" ),
|
||||
OptionRow( "Dark", "OFF","ON" ),
|
||||
OptionRow( "Perspec\n-tive", "INCOMING","OVERHEAD","SPACE" ),
|
||||
};
|
||||
|
||||
|
||||
@@ -121,6 +123,7 @@ void ScreenPlayerOptions::ImportOptions()
|
||||
|
||||
m_iSelectedOption[p][PO_HOLD_NOTES] = po.m_bHoldNotes ? 1 : 0;
|
||||
m_iSelectedOption[p][PO_DARK] = po.m_fDark==1 ? 1 : 0;
|
||||
m_iSelectedOption[p][PO_PERSPECTIVE]= SCALE( po.m_fPerspectiveTilt, -1, +1, 0, 2 );
|
||||
|
||||
|
||||
po.Init();
|
||||
@@ -166,8 +169,9 @@ void ScreenPlayerOptions::ExportOptions()
|
||||
NOTESKIN->SwitchNoteSkin( (PlayerNumber)p, sNewSkin );
|
||||
|
||||
|
||||
po.m_bHoldNotes = (m_iSelectedOption[p][PO_HOLD_NOTES] == 1);
|
||||
po.m_fDark = (m_iSelectedOption[p][PO_DARK] == 1) ? 1.f : 0.f;
|
||||
po.m_bHoldNotes = (m_iSelectedOption[p][PO_HOLD_NOTES] == 1);
|
||||
po.m_fDark = (m_iSelectedOption[p][PO_DARK] == 1) ? 1.f : 0.f;
|
||||
po.m_fPerspectiveTilt = SCALE( m_iSelectedOption[p][PO_PERSPECTIVE], 0, 2, -1, +1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
|
||||
CodeDetector::RefreshCacheItems();
|
||||
|
||||
GAMESTATE->m_SongOptions.m_FailType = PREFSMAN->m_DefaultFailType;
|
||||
|
||||
int p;
|
||||
|
||||
m_Menu.Load( "ScreenSelectMusic" );
|
||||
@@ -489,18 +487,18 @@ void ScreenSelectMusic::AdjustOptions()
|
||||
* player changes to a mode easier than the preference setting, we might
|
||||
* reset it to the preference later. XXX */
|
||||
|
||||
SongOptions::FailType ft = SongOptions::FailType(-1);
|
||||
// Note all these if()s are mutually exclusive.
|
||||
|
||||
/* Easy and beginner are never harder than FAIL_END_OF_SONG. */
|
||||
if(dc <= DIFFICULTY_EASY)
|
||||
ft = SongOptions::FAIL_END_OF_SONG;
|
||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG;
|
||||
|
||||
/* If beginner's steps were chosen, and this is the first stage,
|
||||
* turn off failure completely--always give a second try. */
|
||||
if(dc == DIFFICULTY_BEGINNER &&
|
||||
!PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */
|
||||
GAMESTATE->m_iCurrentStageIndex == 0)
|
||||
ft = SongOptions::FAIL_OFF;
|
||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
|
||||
|
||||
if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
|
||||
{
|
||||
@@ -511,15 +509,7 @@ void ScreenSelectMusic::AdjustOptions()
|
||||
*
|
||||
* Besides, extra stage should probably always be FAIL_ARCADE anyway,
|
||||
* unless the extra stage course says otherwise. */
|
||||
ft = SongOptions::FAIL_ARCADE;
|
||||
}
|
||||
|
||||
if(ft != SongOptions::FailType(-1))
|
||||
{
|
||||
/* Never make the difficulty harder than the default. (If the main options
|
||||
* are set to FAIL_END_OF_SONG, we should never set it to ARCADE.) */
|
||||
ft = max(ft, PREFSMAN->m_DefaultFailType);
|
||||
GAMESTATE->m_SongOptions.m_FailType = ft;
|
||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_ARCADE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ void ScreenTestFonts::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
case '4': SetText("WAAI\nWAAI"); break;
|
||||
case '5': SetText("WAAI &oni;\nWAAI"); break;
|
||||
|
||||
case 'q': SetFont( "Themes/default/Fonts/header1" ); break;
|
||||
case 'w': SetFont( "Themes/default/Fonts/header2" ); break;
|
||||
case 'q': SetFont( "Themes/default/Fonts/_common11" ); break;
|
||||
case 'w': SetFont( "Themes/default/Fonts/_common2" ); break;
|
||||
case 'e': SetFont( "Themes/default/Fonts/Normal" ); break;
|
||||
case 'r': SetFont( "Themes/SMMAX2/Fonts/titlemenu" ); break;
|
||||
case 't': SetFont( "Themes/default/Fonts/small titles" ); break;
|
||||
|
||||
@@ -246,15 +246,18 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
switch( m_Choice )
|
||||
{
|
||||
case CHOICE_GAME_START:
|
||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||
{
|
||||
// apply default options
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
GAMESTATE->m_PlayerOptions[p].FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
GAMESTATE->m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
|
||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||
}
|
||||
break;
|
||||
case CHOICE_SELECT_GAME:
|
||||
SCREENMAN->SetNewScreen( "ScreenSelectGame" );
|
||||
break;
|
||||
/* At request, moved this into the options/operator menu -- Miryokuteki */
|
||||
/*case CHOICE_MAP_KEY_JOY:
|
||||
SCREENMAN->SetNewScreen( "ScreenMapControllers" );
|
||||
break;*/
|
||||
case CHOICE_OPTIONS:
|
||||
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
|
||||
break;
|
||||
|
||||
@@ -864,18 +864,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons
|
||||
po_out.m_fReverseScroll = 1;
|
||||
po_out.m_fScrollSpeed = 1.5f;
|
||||
so_out.m_DrainType = (bExtra2 ? SongOptions::DRAIN_SUDDEN_DEATH : SongOptions::DRAIN_NO_RECOVER);
|
||||
|
||||
// should we do something fancy here, like turn on different effects?
|
||||
int iSongHash = GetHashForString( pSongOut->GetSongDir() );
|
||||
switch( ((unsigned int)iSongHash) % 5 )
|
||||
{
|
||||
case 0: po_out.m_fEffects[PlayerOptions::EFFECT_DIZZY] = 1; break;
|
||||
case 1: po_out.m_fDark = 1; break;
|
||||
case 2: po_out.m_fEffects[PlayerOptions::EFFECT_DRUNK] = 1; break;
|
||||
case 3: po_out.m_fEffects[PlayerOptions::EFFECT_MINI] = 1; break;
|
||||
case 4: po_out.m_fEffects[PlayerOptions::EFFECT_SPACE] = 1; break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
po_out.m_fDark = 1;
|
||||
}
|
||||
|
||||
Song* SongManager::GetRandomSong()
|
||||
|
||||
@@ -85,5 +85,7 @@ void SongOptions::FromString( CString sOptions )
|
||||
else if( sBit == "1.3xmusic" ) m_fMusicRate = 1.3f;
|
||||
else if( sBit == "1.4xmusic" ) m_fMusicRate = 1.4f;
|
||||
else if( sBit == "1.5xmusic" ) m_fMusicRate = 1.5f;
|
||||
else if( sBit == "failendofsong" ) m_FailType = FAIL_END_OF_SONG;
|
||||
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user