Ez2/Pump/Para Song Select Screen now supports the 'stars' and/or 'blob' difficulty ratings as seen in para/ez2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Possible NextScreen Codes:
|
||||
// Possible NextScreen Codes:
|
||||
// - ScreenCaution
|
||||
// - ScreenEz2SelectPlayer
|
||||
// - ScreenSelectMode
|
||||
@@ -254,6 +254,10 @@ ShuffleIconP1X=40
|
||||
ShuffleIconP2X=600
|
||||
ShuffleIconP1Y=320
|
||||
ShuffleIconP2Y=320
|
||||
DifficultyRatingX=999
|
||||
DifficultyRatingY=999
|
||||
DifficultyRatingOrientation=0
|
||||
DifficultyRatingSpacing=40.0
|
||||
PreviewMusicMode=0 // 0 = play music as you select, 1 = no music plays, select once and preview music plays, select again for confirm, 2 = no music plays at all.
|
||||
|
||||
[ScreenSelectCourse]
|
||||
@@ -714,6 +718,7 @@ MenuButtons=The default setting allows the dance pad's panels to navigate::the m
|
||||
AutoPlay=This option is useful for those who would like to play::without using a pad. However, you will not be able to set::high scores or earn extra stages while this options is ON.
|
||||
BackDelayed=Turning this option ON will require that you hold the Back button::for 0.5 seconds before it will regiser. This is useful if you find::yourself accidentally pressing the Back button on your controller.
|
||||
OptionsNavigation=When using &oq;SM style&cq;, the Start button will take::you to the next screen and Up/Down will switch option lines.::When using &oq;Arcade style&cq;, the Start button will move the cursor::to the next line and Up/Down will be ignored.
|
||||
WheelSpeed=Adjusts the speed of the DDR style musicwheel.
|
||||
|
||||
[ScreenMachineOptions]
|
||||
MenuTimer=Turn this &oq;OFF&cq; to disable the time limit in menus.
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
#include "stdafx.h"
|
||||
#include "DifficultyRating.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
/****************************
|
||||
DifficultyRating
|
||||
Desc: see header
|
||||
Copyright: Andrew Livy
|
||||
*****************************/
|
||||
|
||||
const int ORIENTATION_LEFT = 0;
|
||||
const int ORIENTATION_CENTER = 1;
|
||||
|
||||
#define ELEMSPACING THEME->GetMetricF("ScreenEz2SelectMusic","DifficultyRatingSpacing")
|
||||
|
||||
DifficultyRating::DifficultyRating()
|
||||
{
|
||||
iMaxElements=10;
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
Sprite* pNewSprite = new Sprite;
|
||||
pNewSprite->Load( THEME->GetPathTo("Graphics","Select Music DifficultyRatingIcon") );
|
||||
m_apSprites.push_back( pNewSprite );
|
||||
m_apSprites[i]->SetDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
}
|
||||
|
||||
DifficultyRating::~DifficultyRating()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DifficultyRating::DrawPrimitives()
|
||||
{
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
m_apSprites[i]->Draw();
|
||||
}
|
||||
}
|
||||
|
||||
void DifficultyRating::SetDifficulty(int Difficulty)
|
||||
{
|
||||
iCurrentDifficulty = Difficulty;
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
if(i < iCurrentDifficulty)
|
||||
{
|
||||
m_apSprites[i]->SetDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_apSprites[i]->SetDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DifficultyRating::SetOrientation(int Orientation)
|
||||
{
|
||||
if(Orientation == ORIENTATION_LEFT)
|
||||
{
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
m_apSprites[i]->SetX(0 + (ELEMSPACING * i) );
|
||||
}
|
||||
}
|
||||
else // central orientation
|
||||
{
|
||||
if(iCurrentDifficulty % 2 == 0) // even number?
|
||||
{
|
||||
//damn! in that case everything is to the side of the middle....
|
||||
int incrementor=1; // start on one... 0 is reserved for 'central' (read odd number)
|
||||
int offset=0;
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
if(incrementor == 1) // + offset
|
||||
{
|
||||
m_apSprites[i]->SetX((0 - 0.5f) + offset);
|
||||
incrementor++;
|
||||
}
|
||||
else // - offset
|
||||
{
|
||||
m_apSprites[i]->SetX((0 + 0.5f) - offset);
|
||||
offset += ELEMSPACING; // increase offset
|
||||
incrementor=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int incrementor=0;
|
||||
int offset=0;
|
||||
for(int i=0; i<iMaxElements; i++)
|
||||
{
|
||||
if(incrementor == 0) // special case.... this means we're in the middle.
|
||||
{
|
||||
m_apSprites[i]->SetX(0); // set to the middle.
|
||||
offset=ELEMSPACING;
|
||||
incrementor++;
|
||||
}
|
||||
//the rest go either side....
|
||||
else
|
||||
{
|
||||
if(incrementor == 1) // + offset
|
||||
{
|
||||
m_apSprites[i]->SetX(0+offset);
|
||||
incrementor++;
|
||||
}
|
||||
else // - offset
|
||||
{
|
||||
m_apSprites[i]->SetX(0-offset);
|
||||
offset += ELEMSPACING; // increase offset
|
||||
incrementor=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef DIFFICULTYRATING_H
|
||||
#define DIFFICULTYRATING_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: DifficultyRating
|
||||
|
||||
Desc: Displays a whole bunch of graphics, either left aligned or center aligned.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Andrew Livy
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ActorFrame.h"
|
||||
#include "Banner.h"
|
||||
#include "Sprite.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
class DifficultyRating : public ActorFrame
|
||||
{
|
||||
public:
|
||||
DifficultyRating();
|
||||
~DifficultyRating();
|
||||
void SetDifficulty(int Difficulty);
|
||||
void SetOrientation(int Orientation);
|
||||
virtual void DrawPrimitives();
|
||||
private:
|
||||
int iMaxElements;
|
||||
int iOrientation;
|
||||
int iCurrentDifficulty;
|
||||
vector<Sprite*> m_apSprites; // stores the list of elements (left to right)
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -502,7 +502,7 @@ void RageDisplay::DrawLoop_Polys( const RageVertex v[], int iNumVerts, float Lin
|
||||
|
||||
/* Join the lines with circles so we get rounded corners. */
|
||||
GLUquadricObj *q = gluNewQuadric();
|
||||
for(int i = 0; i < iNumVerts; ++i)
|
||||
for(i = 0; i < iNumVerts; ++i)
|
||||
{
|
||||
glPushMatrix();
|
||||
glColor4fv(v[i].c);
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
#define SHUFFLEICON_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ShuffleIconP%dX",p+1))
|
||||
#define SHUFFLEICON_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ShuffleIconP%dY",p+1))
|
||||
#define PREVIEWMUSICMODE THEME->GetMetricI("ScreenEz2SelectMusic","PreviewMusicMode")
|
||||
#define DIFFICULTYRATING_X THEME->GetMetricF("ScreenEz2SelectMusic","DifficultyRatingX")
|
||||
#define DIFFICULTYRATING_Y THEME->GetMetricF("ScreenEz2SelectMusic","DifficultyRatingY")
|
||||
#define DIFFICULTYRATING_ORIENTATION THEME->GetMetricF("ScreenEz2SelectMusic","DifficultyRatingOrientation")
|
||||
|
||||
const float TWEEN_TIME = 0.5f;
|
||||
|
||||
@@ -106,9 +109,9 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic()
|
||||
|
||||
for(int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
|
||||
m_FootMeter[p].SetShadowLength( 2 );
|
||||
this->AddChild( &m_FootMeter[p] );
|
||||
// m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) );
|
||||
// m_FootMeter[p].SetShadowLength( 2 );
|
||||
// this->AddChild( &m_FootMeter[p] );
|
||||
|
||||
m_SpeedIcon[p].Load( THEME->GetPathTo("Graphics","select music speedicon"));
|
||||
m_SpeedIcon[p].SetXY( SPEEDICON_X(p), SPEEDICON_Y(p) );
|
||||
@@ -138,6 +141,10 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic()
|
||||
m_PumpDifficultyRating.SetXY( PUMP_DIFF_X, PUMP_DIFF_Y );
|
||||
this->AddChild(&m_PumpDifficultyRating);
|
||||
|
||||
m_DifficultyRating.SetOrientation(DIFFICULTYRATING_ORIENTATION);
|
||||
m_DifficultyRating.SetX(DIFFICULTYRATING_X);
|
||||
m_DifficultyRating.SetY(DIFFICULTYRATING_Y);
|
||||
this->AddChild(&m_DifficultyRating);
|
||||
|
||||
m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message") );
|
||||
m_sprOptionsMessage.StopAnimating();
|
||||
@@ -498,12 +505,15 @@ void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
|
||||
|
||||
if( pNotes != NULL && pn == GAMESTATE->m_MasterPlayerNumber )
|
||||
{
|
||||
m_PumpDifficultyRating.SetText(ssprintf("Lv.%d",pNotes->GetMeter()));
|
||||
m_DifficultyRating.SetDifficulty(pNotes->GetMeter());
|
||||
}
|
||||
|
||||
// GAMESTATE->m_pCurNotes[pn] = pNotes;
|
||||
|
||||
// Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];
|
||||
|
||||
m_FootMeter[pn].SetFromNotes( pNotes );
|
||||
// m_FootMeter[pn].SetFromNotes( pNotes );
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "MusicBannerWheel.h"
|
||||
#include "MenuElements.h"
|
||||
#include "FootMeter.h"
|
||||
#include "DifficultyRating.h"
|
||||
|
||||
|
||||
class ScreenEz2SelectMusic : public Screen
|
||||
{
|
||||
@@ -65,7 +67,8 @@ protected:
|
||||
|
||||
MusicBannerWheel m_MusicBannerWheel;
|
||||
MenuElements m_Menu;
|
||||
FootMeter m_FootMeter[NUM_PLAYERS];
|
||||
DifficultyRating m_DifficultyRating;
|
||||
// FootMeter m_FootMeter[NUM_PLAYERS];
|
||||
vector<Notes*> m_arrayNotes[NUM_PLAYERS];
|
||||
int m_iSelection[NUM_PLAYERS];
|
||||
bool m_bGoToOptions;
|
||||
|
||||
@@ -57,10 +57,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /verbose /pdb:none
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Release6
|
||||
TargetDir=\temp\stepmania
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -92,10 +92,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Debug6
|
||||
TargetDir=\temp\stepmania
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -956,6 +956,14 @@ SOURCE=.\DifficultyIcon.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DifficultyRating.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DifficultyRating.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FadingBanner.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
Reference in New Issue
Block a user