Added ScreenJukeboxMenu, and UI cleanup.
This commit is contained in:
@@ -462,6 +462,12 @@ ExplanationY=410
|
|||||||
ExplanationText=In this mode, you can edit existing notes patterns,::create note patterns, or synchronize notes with the music.
|
ExplanationText=In this mode, you can edit existing notes patterns,::create note patterns, or synchronize notes with the music.
|
||||||
HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to continue
|
HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to continue
|
||||||
|
|
||||||
|
[ScreenJukeboxMenu]
|
||||||
|
ExplanationX=320
|
||||||
|
ExplanationY=410
|
||||||
|
ExplanationText=In this mode, you can edit existing notes patterns,::create note patterns, or synchronize notes with the music.
|
||||||
|
HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to continue
|
||||||
|
|
||||||
[ScreenManager]
|
[ScreenManager]
|
||||||
StatsX=632
|
StatsX=632
|
||||||
StatsY=10
|
StatsY=10
|
||||||
@@ -845,7 +851,7 @@ NumCharsToDrawTotal=10
|
|||||||
FakeBeatsPerSec=2.5
|
FakeBeatsPerSec=2.5
|
||||||
TimerSeconds=24
|
TimerSeconds=24
|
||||||
|
|
||||||
[SongSelector]
|
[EditMenu]
|
||||||
Arrows1X=190
|
Arrows1X=190
|
||||||
Arrows2X=590
|
Arrows2X=590
|
||||||
SongBannerX=490
|
SongBannerX=490
|
||||||
@@ -878,6 +884,19 @@ Row5Y=260
|
|||||||
Row6Y=300
|
Row6Y=300
|
||||||
Row7Y=340
|
Row7Y=340
|
||||||
|
|
||||||
|
[JukeboxMenu]
|
||||||
|
Arrows1X=190
|
||||||
|
Arrows2X=590
|
||||||
|
RowLabelsX=20
|
||||||
|
RowValue1X=380
|
||||||
|
RowValue2X=380
|
||||||
|
RowValue3X=380
|
||||||
|
RowValue4X=380
|
||||||
|
Row1Y=80
|
||||||
|
Row2Y=130
|
||||||
|
Row3Y=180
|
||||||
|
Row4Y=230
|
||||||
|
|
||||||
[ScreenOptionsMenu]
|
[ScreenOptionsMenu]
|
||||||
InputOptions=
|
InputOptions=
|
||||||
MachineOptions=
|
MachineOptions=
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
Class: SongSelector
|
Class: EditMenu
|
||||||
|
|
||||||
Desc: See header.
|
Desc: See header.
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SongSelector.h"
|
#include "EditMenu.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "SongManager.h"
|
#include "SongManager.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
@@ -18,34 +18,32 @@
|
|||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Defines specific to SongSelector
|
// Defines specific to EditMenu
|
||||||
//
|
//
|
||||||
#define ARROWS_X( i ) THEME->GetMetricF("SongSelector",ssprintf("Arrows%dX",i+1))
|
#define ARROWS_X( i ) THEME->GetMetricF("EditMenu",ssprintf("Arrows%dX",i+1))
|
||||||
#define SONG_BANNER_X THEME->GetMetricF("SongSelector","SongBannerX")
|
#define SONG_BANNER_X THEME->GetMetricF("EditMenu","SongBannerX")
|
||||||
#define SONG_BANNER_Y THEME->GetMetricF("SongSelector","SongBannerY")
|
#define SONG_BANNER_Y THEME->GetMetricF("EditMenu","SongBannerY")
|
||||||
#define SONG_BANNER_WIDTH THEME->GetMetricF("SongSelector","SongBannerWidth")
|
#define SONG_BANNER_WIDTH THEME->GetMetricF("EditMenu","SongBannerWidth")
|
||||||
#define SONG_BANNER_HEIGHT THEME->GetMetricF("SongSelector","SongBannerHeight")
|
#define SONG_BANNER_HEIGHT THEME->GetMetricF("EditMenu","SongBannerHeight")
|
||||||
#define SONG_TEXT_BANNER_X THEME->GetMetricF("SongSelector","SongTextBannerX")
|
#define SONG_TEXT_BANNER_X THEME->GetMetricF("EditMenu","SongTextBannerX")
|
||||||
#define SONG_TEXT_BANNER_Y THEME->GetMetricF("SongSelector","SongTextBannerY")
|
#define SONG_TEXT_BANNER_Y THEME->GetMetricF("EditMenu","SongTextBannerY")
|
||||||
#define GROUP_BANNER_X THEME->GetMetricF("SongSelector","GroupBannerX")
|
#define GROUP_BANNER_X THEME->GetMetricF("EditMenu","GroupBannerX")
|
||||||
#define GROUP_BANNER_Y THEME->GetMetricF("SongSelector","GroupBannerY")
|
#define GROUP_BANNER_Y THEME->GetMetricF("EditMenu","GroupBannerY")
|
||||||
#define GROUP_BANNER_WIDTH THEME->GetMetricF("SongSelector","GroupBannerWidth")
|
#define GROUP_BANNER_WIDTH THEME->GetMetricF("EditMenu","GroupBannerWidth")
|
||||||
#define GROUP_BANNER_HEIGHT THEME->GetMetricF("SongSelector","GroupBannerHeight")
|
#define GROUP_BANNER_HEIGHT THEME->GetMetricF("EditMenu","GroupBannerHeight")
|
||||||
#define METER_X THEME->GetMetricF("SongSelector","MeterX")
|
#define METER_X THEME->GetMetricF("EditMenu","MeterX")
|
||||||
#define METER_Y THEME->GetMetricF("SongSelector","MeterY")
|
#define METER_Y THEME->GetMetricF("EditMenu","MeterY")
|
||||||
#define SOURCE_METER_X THEME->GetMetricF("SongSelector","SourceMeterX")
|
#define SOURCE_METER_X THEME->GetMetricF("EditMenu","SourceMeterX")
|
||||||
#define SOURCE_METER_Y THEME->GetMetricF("SongSelector","SourceMeterY")
|
#define SOURCE_METER_Y THEME->GetMetricF("EditMenu","SourceMeterY")
|
||||||
#define ROW_LABELS_X THEME->GetMetricF("SongSelector","RowLabelsX")
|
#define ROW_LABELS_X THEME->GetMetricF("EditMenu","RowLabelsX")
|
||||||
#define ROW_VALUE_X( i ) THEME->GetMetricF("SongSelector",ssprintf("RowValue%dX",i+1))
|
#define ROW_VALUE_X( i ) THEME->GetMetricF("EditMenu",ssprintf("RowValue%dX",i+1))
|
||||||
#define ROW_Y( i ) THEME->GetMetricF("SongSelector",ssprintf("Row%dY",i+1))
|
#define ROW_Y( i ) THEME->GetMetricF("EditMenu",ssprintf("Row%dY",i+1))
|
||||||
|
|
||||||
|
|
||||||
SongSelector::SongSelector()
|
EditMenu::EditMenu()
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenEditMenu::ScreenEditMenu()" );
|
LOG->Trace( "ScreenEditMenu::ScreenEditMenu()" );
|
||||||
|
|
||||||
m_bAllowNewNotes = true;
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for( i=0; i<2; i++ )
|
for( i=0; i<2; i++ )
|
||||||
@@ -59,6 +57,13 @@ SongSelector::SongSelector()
|
|||||||
|
|
||||||
ZERO( m_iSelection );
|
ZERO( m_iSelection );
|
||||||
|
|
||||||
|
|
||||||
|
// start out on easy, not beginner
|
||||||
|
m_iSelection[ROW_DIFFICULTY] = DIFFICULTY_EASY;
|
||||||
|
m_iSelection[ROW_SOURCE_DIFFICULTY] = DIFFICULTY_EASY;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for( i=0; i<NUM_ROWS; i++ )
|
for( i=0; i<NUM_ROWS; i++ )
|
||||||
{
|
{
|
||||||
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
||||||
@@ -121,38 +126,38 @@ SongSelector::SongSelector()
|
|||||||
OnRowValueChanged( (Row)0 );
|
OnRowValueChanged( (Row)0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
SongSelector::~SongSelector()
|
EditMenu::~EditMenu()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::Refresh()
|
void EditMenu::Refresh()
|
||||||
{
|
{
|
||||||
ChangeToRow( (Row)0 );
|
ChangeToRow( (Row)0 );
|
||||||
OnRowValueChanged( (Row)0 );
|
OnRowValueChanged( (Row)0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::DrawPrimitives()
|
void EditMenu::DrawPrimitives()
|
||||||
{
|
{
|
||||||
ActorFrame::DrawPrimitives();
|
ActorFrame::DrawPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SongSelector::CanGoUp()
|
bool EditMenu::CanGoUp()
|
||||||
{
|
{
|
||||||
return m_SelectedRow != 0;
|
return m_SelectedRow != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SongSelector::CanGoDown()
|
bool EditMenu::CanGoDown()
|
||||||
{
|
{
|
||||||
return m_SelectedRow != NUM_ROWS-1;
|
return m_SelectedRow != NUM_ROWS-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SongSelector::CanGoLeft()
|
bool EditMenu::CanGoLeft()
|
||||||
{
|
{
|
||||||
return m_iSelection[m_SelectedRow] != 0;
|
return m_iSelection[m_SelectedRow] != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SongSelector::CanGoRight()
|
bool EditMenu::CanGoRight()
|
||||||
{
|
{
|
||||||
int num_values[NUM_ROWS] =
|
int num_values[NUM_ROWS] =
|
||||||
{
|
{
|
||||||
@@ -168,7 +173,7 @@ bool SongSelector::CanGoRight()
|
|||||||
return m_iSelection[m_SelectedRow] != (num_values[m_SelectedRow]-1);
|
return m_iSelection[m_SelectedRow] != (num_values[m_SelectedRow]-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::Up()
|
void EditMenu::Up()
|
||||||
{
|
{
|
||||||
if( CanGoUp() )
|
if( CanGoUp() )
|
||||||
{
|
{
|
||||||
@@ -180,7 +185,7 @@ void SongSelector::Up()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::Down()
|
void EditMenu::Down()
|
||||||
{
|
{
|
||||||
if( CanGoDown() )
|
if( CanGoDown() )
|
||||||
{
|
{
|
||||||
@@ -192,7 +197,7 @@ void SongSelector::Down()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::Left()
|
void EditMenu::Left()
|
||||||
{
|
{
|
||||||
if( CanGoLeft() )
|
if( CanGoLeft() )
|
||||||
{
|
{
|
||||||
@@ -202,7 +207,7 @@ void SongSelector::Left()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::Right()
|
void EditMenu::Right()
|
||||||
{
|
{
|
||||||
if( CanGoRight() )
|
if( CanGoRight() )
|
||||||
{
|
{
|
||||||
@@ -213,7 +218,7 @@ void SongSelector::Right()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SongSelector::ChangeToRow( Row newRow )
|
void EditMenu::ChangeToRow( Row newRow )
|
||||||
{
|
{
|
||||||
m_SelectedRow = newRow;
|
m_SelectedRow = newRow;
|
||||||
|
|
||||||
@@ -223,7 +228,7 @@ void SongSelector::ChangeToRow( Row newRow )
|
|||||||
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongSelector::OnRowValueChanged( Row row )
|
void EditMenu::OnRowValueChanged( Row row )
|
||||||
{
|
{
|
||||||
m_sprArrows[0].SetDiffuse( CanGoLeft()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
m_sprArrows[0].SetDiffuse( CanGoLeft()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
@@ -287,12 +292,12 @@ void SongSelector::OnRowValueChanged( Row row )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Notes* SongSelector::GetSelectedNotes()
|
Notes* EditMenu::GetSelectedNotes()
|
||||||
{
|
{
|
||||||
return GetSelectedSong()->GetNotes(GetSelectedNotesType(),GetSelectedDifficulty(), false);
|
return GetSelectedSong()->GetNotes(GetSelectedNotesType(),GetSelectedDifficulty(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Notes* SongSelector::GetSelectedSourceNotes()
|
Notes* EditMenu::GetSelectedSourceNotes()
|
||||||
{
|
{
|
||||||
return GetSelectedSong()->GetNotes(GetSelectedSourceNotesType(),GetSelectedSourceDifficulty(), false);
|
return GetSelectedSong()->GetNotes(GetSelectedSourceNotesType(),GetSelectedSourceDifficulty(), false);
|
||||||
}
|
}
|
||||||
@@ -1,29 +1,30 @@
|
|||||||
#ifndef SONG_SELECTOR_H
|
#ifndef EDITMENU_H
|
||||||
#define SONG_SELECTOR_H
|
#define EDITMENU_H
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
Class: SongSelector
|
Class: EditMenu
|
||||||
|
|
||||||
Desc: Choose a game, style, song and notes on one screen.
|
Desc: UI on Edit Menu screen. Create Notes, delete Notes, or launch Notes
|
||||||
|
in editor.
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
Chris Danford
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
#include "MenuElements.h"
|
|
||||||
#include "Banner.h"
|
#include "Banner.h"
|
||||||
#include "TextBanner.h"
|
#include "TextBanner.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "FootMeter.h"
|
#include "FootMeter.h"
|
||||||
|
#include "RandomSample.h"
|
||||||
|
|
||||||
|
|
||||||
class SongSelector: public ActorFrame
|
class EditMenu: public ActorFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SongSelector();
|
EditMenu();
|
||||||
~SongSelector();
|
~EditMenu();
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
bool CanGoUp();
|
bool CanGoUp();
|
||||||
@@ -98,10 +99,6 @@ public:
|
|||||||
Notes* GetSelectedNotes();
|
Notes* GetSelectedNotes();
|
||||||
Notes* GetSelectedSourceNotes();
|
Notes* GetSelectedSourceNotes();
|
||||||
|
|
||||||
/* not used yet */
|
|
||||||
bool m_bAllowNewNotes;
|
|
||||||
void AllowNewNotes(bool b) { m_bAllowNewNotes = b; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Sprite m_sprArrows[2];
|
Sprite m_sprArrows[2];
|
||||||
|
|
||||||
@@ -70,6 +70,7 @@ void GameState::Reset()
|
|||||||
m_PlayMode = PLAY_MODE_INVALID;
|
m_PlayMode = PLAY_MODE_INVALID;
|
||||||
m_bEditing = false;
|
m_bEditing = false;
|
||||||
m_bDemonstration = false;
|
m_bDemonstration = false;
|
||||||
|
m_bJukeboxUsesModifiers = false;
|
||||||
m_iCurrentStageIndex = 0;
|
m_iCurrentStageIndex = 0;
|
||||||
m_bAllow2ndExtraStage = true;
|
m_bAllow2ndExtraStage = true;
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ public:
|
|||||||
PlayMode m_PlayMode; // many screen display different info depending on this value
|
PlayMode m_PlayMode; // many screen display different info depending on this value
|
||||||
bool m_bEditing; // NoteField does special stuff when this is true
|
bool m_bEditing; // NoteField does special stuff when this is true
|
||||||
bool m_bDemonstration; // ScreenGameplay does special stuff when this is true
|
bool m_bDemonstration; // ScreenGameplay does special stuff when this is true
|
||||||
|
bool m_bJukeboxUsesModifiers;
|
||||||
int m_iCurrentStageIndex; // incremented on Eval screen
|
int m_iCurrentStageIndex; // incremented on Eval screen
|
||||||
|
|
||||||
int GetStageIndex();
|
int GetStageIndex();
|
||||||
|
|||||||
@@ -0,0 +1,190 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: JukeboxMenu
|
||||||
|
|
||||||
|
Desc: See header.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "JukeboxMenu.h"
|
||||||
|
#include "RageLog.h"
|
||||||
|
#include "SongManager.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "ThemeManager.h"
|
||||||
|
#include "GameManager.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Defines specific to JukeboxMenu
|
||||||
|
//
|
||||||
|
#define ARROWS_X( i ) THEME->GetMetricF("JukeboxMenu",ssprintf("Arrows%dX",i+1))
|
||||||
|
#define ROW_LABELS_X THEME->GetMetricF("JukeboxMenu","RowLabelsX")
|
||||||
|
#define ROW_VALUE_X( i ) THEME->GetMetricF("JukeboxMenu",ssprintf("RowValue%dX",i+1))
|
||||||
|
#define ROW_Y( i ) THEME->GetMetricF("JukeboxMenu",ssprintf("Row%dY",i+1))
|
||||||
|
|
||||||
|
|
||||||
|
JukeboxMenu::JukeboxMenu()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenJukeboxMenu::ScreenJukeboxMenu()" );
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for( i=0; i<2; i++ )
|
||||||
|
{
|
||||||
|
m_sprArrows[i].Load( THEME->GetPathTo("Graphics",ssprintf("jukebox menu %s",(i==0?"left":"right"))) );
|
||||||
|
m_sprArrows[i].SetX( ARROWS_X(i) );
|
||||||
|
this->AddChild( &m_sprArrows[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_SelectedRow = (Row)0;
|
||||||
|
|
||||||
|
ZERO( m_iSelection );
|
||||||
|
|
||||||
|
for( i=0; i<NUM_ROWS; i++ )
|
||||||
|
{
|
||||||
|
m_textLabel[i].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
||||||
|
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||||
|
m_textLabel[i].SetText( RowToString((Row)i) );
|
||||||
|
m_textLabel[i].SetZoom( 0.8f );
|
||||||
|
m_textLabel[i].SetHorizAlign( Actor::align_left );
|
||||||
|
this->AddChild( &m_textLabel[i] );
|
||||||
|
|
||||||
|
m_textValue[i].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
|
m_textValue[i].SetXY( ROW_VALUE_X(i), ROW_Y(i) );
|
||||||
|
m_textValue[i].SetText( "blah" );
|
||||||
|
m_textValue[i].SetZoom( 0.8f );
|
||||||
|
this->AddChild( &m_textValue[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_soundChangeRow.Load( THEME->GetPathTo("sounds","jukebox menu row") );
|
||||||
|
m_soundChangeValue.Load( THEME->GetPathTo("sounds","jukebox menu value") );
|
||||||
|
|
||||||
|
|
||||||
|
// fill in data structures
|
||||||
|
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, m_Styles );
|
||||||
|
SONGMAN->GetGroupNames( m_sGroups );
|
||||||
|
m_sGroups.insert( m_sGroups.begin(), "All Music" );
|
||||||
|
m_sDifficulties.push_back( "all difficulties" );
|
||||||
|
for( int d=0; d<NUM_DIFFICULTIES; d++ )
|
||||||
|
m_sDifficulties.push_back( DifficultyToString( (Difficulty)d ) );
|
||||||
|
m_sModifiers.push_back( "no modifiers" );
|
||||||
|
m_sModifiers.push_back( "random modifiers" );
|
||||||
|
|
||||||
|
ChangeToRow( (Row)0 );
|
||||||
|
OnRowValueChanged( (Row)0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
JukeboxMenu::~JukeboxMenu()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::DrawPrimitives()
|
||||||
|
{
|
||||||
|
ActorFrame::DrawPrimitives();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JukeboxMenu::CanGoUp()
|
||||||
|
{
|
||||||
|
return m_SelectedRow != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JukeboxMenu::CanGoDown()
|
||||||
|
{
|
||||||
|
return m_SelectedRow != NUM_ROWS-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JukeboxMenu::CanGoLeft()
|
||||||
|
{
|
||||||
|
return m_iSelection[m_SelectedRow] != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JukeboxMenu::CanGoRight()
|
||||||
|
{
|
||||||
|
int num_values[NUM_ROWS] =
|
||||||
|
{
|
||||||
|
m_Styles.size(),
|
||||||
|
m_sGroups.size(),
|
||||||
|
m_sDifficulties.size(),
|
||||||
|
m_sModifiers.size()
|
||||||
|
};
|
||||||
|
|
||||||
|
return m_iSelection[m_SelectedRow] != (num_values[m_SelectedRow]-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::Up()
|
||||||
|
{
|
||||||
|
if( CanGoUp() )
|
||||||
|
{
|
||||||
|
ChangeToRow( Row(m_SelectedRow-1) );
|
||||||
|
m_soundChangeRow.PlayRandom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::Down()
|
||||||
|
{
|
||||||
|
if( CanGoDown() )
|
||||||
|
{
|
||||||
|
ChangeToRow( Row(m_SelectedRow+1) );
|
||||||
|
m_soundChangeRow.PlayRandom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::Left()
|
||||||
|
{
|
||||||
|
if( CanGoLeft() )
|
||||||
|
{
|
||||||
|
m_iSelection[m_SelectedRow]--;
|
||||||
|
OnRowValueChanged( m_SelectedRow );
|
||||||
|
m_soundChangeValue.PlayRandom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::Right()
|
||||||
|
{
|
||||||
|
if( CanGoRight() )
|
||||||
|
{
|
||||||
|
m_iSelection[m_SelectedRow]++;
|
||||||
|
OnRowValueChanged( m_SelectedRow );
|
||||||
|
m_soundChangeValue.PlayRandom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void JukeboxMenu::ChangeToRow( Row newRow )
|
||||||
|
{
|
||||||
|
m_SelectedRow = newRow;
|
||||||
|
|
||||||
|
for( int i=0; i<2; i++ )
|
||||||
|
m_sprArrows[i].SetY( ROW_Y(newRow) );
|
||||||
|
m_sprArrows[0].SetDiffuse( CanGoLeft()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
|
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void JukeboxMenu::OnRowValueChanged( Row row )
|
||||||
|
{
|
||||||
|
m_sprArrows[0].SetDiffuse( CanGoLeft()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
|
m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
|
||||||
|
|
||||||
|
switch( row )
|
||||||
|
{
|
||||||
|
case ROW_STYLE:
|
||||||
|
m_textValue[ROW_STYLE].SetText( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_szName );
|
||||||
|
// fall through
|
||||||
|
case ROW_GROUP:
|
||||||
|
m_textValue[ROW_GROUP].SetText( SONGMAN->ShortenGroupName(GetSelectedGroup()) );
|
||||||
|
// fall through
|
||||||
|
case ROW_DIFFICULTY:
|
||||||
|
m_textValue[ROW_DIFFICULTY].SetText( GetSelectedDifficultyString() );
|
||||||
|
// fall through
|
||||||
|
case ROW_MODIFIERS:
|
||||||
|
m_textValue[ROW_MODIFIERS].SetText( m_sModifiers[GetSelectedModifiers()] );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0); // invalid row
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
#ifndef JukeboxMenu_H
|
||||||
|
#define JukeboxMenu_H
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: JukeboxMenu
|
||||||
|
|
||||||
|
Desc: UI on ScreenJukeboxMenu.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ActorFrame.h"
|
||||||
|
#include "Banner.h"
|
||||||
|
#include "TextBanner.h"
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "FootMeter.h"
|
||||||
|
#include "RandomSample.h"
|
||||||
|
#include "Style.h"
|
||||||
|
|
||||||
|
|
||||||
|
class JukeboxMenu: public ActorFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
JukeboxMenu();
|
||||||
|
~JukeboxMenu();
|
||||||
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
|
bool CanGoUp();
|
||||||
|
bool CanGoDown();
|
||||||
|
bool CanGoLeft();
|
||||||
|
bool CanGoRight();
|
||||||
|
|
||||||
|
void Up();
|
||||||
|
void Down();
|
||||||
|
void Left();
|
||||||
|
void Right();
|
||||||
|
|
||||||
|
enum Row
|
||||||
|
{
|
||||||
|
ROW_STYLE,
|
||||||
|
ROW_GROUP,
|
||||||
|
ROW_DIFFICULTY,
|
||||||
|
ROW_MODIFIERS,
|
||||||
|
NUM_ROWS
|
||||||
|
} m_SelectedRow;
|
||||||
|
CString RowToString( Row r )
|
||||||
|
{
|
||||||
|
const CString s[NUM_ROWS] =
|
||||||
|
{
|
||||||
|
"Style",
|
||||||
|
"Group",
|
||||||
|
"Difficulty",
|
||||||
|
"Modifiers",
|
||||||
|
};
|
||||||
|
return s[r];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Style GetSelectedStyle() { return m_Styles[m_iSelection[ROW_STYLE]]; }
|
||||||
|
CString GetSelectedGroup() { return m_sGroups[m_iSelection[ROW_GROUP]]; }
|
||||||
|
CString GetSelectedDifficultyString() { return m_sDifficulties[m_iSelection[ROW_DIFFICULTY]]; }
|
||||||
|
Difficulty GetSelectedDifficulty() { return StringToDifficulty( GetSelectedDifficultyString() ); }
|
||||||
|
bool GetSelectedModifiers() { return m_iSelection[ROW_MODIFIERS] != 0; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
Sprite m_sprArrows[2];
|
||||||
|
|
||||||
|
int m_iSelection[NUM_ROWS];
|
||||||
|
BitmapText m_textLabel[NUM_ROWS];
|
||||||
|
BitmapText m_textValue[NUM_ROWS];
|
||||||
|
|
||||||
|
vector<Style> m_Styles;
|
||||||
|
CStringArray m_sGroups;
|
||||||
|
vector<string> m_sDifficulties;
|
||||||
|
CStringArray m_sModifiers;
|
||||||
|
|
||||||
|
void OnRowValueChanged( Row row );
|
||||||
|
void ChangeToRow( Row newRow );
|
||||||
|
|
||||||
|
RandomSample m_soundChangeRow;
|
||||||
|
RandomSample m_soundChangeValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -206,3 +206,24 @@ void PlayerOptions::NextTurn()
|
|||||||
{
|
{
|
||||||
m_TurnType = (TurnType) ((m_TurnType+1)%NUM_TURN_TYPES);
|
m_TurnType = (TurnType) ((m_TurnType+1)%NUM_TURN_TYPES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerOptions::ChooseRandomMofifiers()
|
||||||
|
{
|
||||||
|
if( RandomFloat(0,1)>0.8f )
|
||||||
|
m_fScrollSpeed = 1.5f;
|
||||||
|
if( RandomFloat(0,1)>0.8f )
|
||||||
|
m_bReverseScroll = true;
|
||||||
|
if( RandomFloat(0,1)>0.9f )
|
||||||
|
m_bDark = true;
|
||||||
|
float f;
|
||||||
|
f = RandomFloat(0,1);
|
||||||
|
if( f>0.66f )
|
||||||
|
m_AccelType = (AccelType)(rand()%NUM_ACCEL_TYPES);
|
||||||
|
else if( f>0.33f )
|
||||||
|
m_bEffects[ rand()%NUM_EFFECT_TYPES ] = true;
|
||||||
|
f = RandomFloat(0,1);
|
||||||
|
if( f>0.95f )
|
||||||
|
m_AppearanceType = APPEARANCE_HIDDEN;
|
||||||
|
else if( f>0.9f )
|
||||||
|
m_AppearanceType = APPEARANCE_SUDDEN;
|
||||||
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ struct PlayerOptions
|
|||||||
void Init();
|
void Init();
|
||||||
CString GetString();
|
CString GetString();
|
||||||
void FromString( CString sOptions );
|
void FromString( CString sOptions );
|
||||||
|
void ChooseRandomMofifiers();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -109,18 +109,7 @@ bool SetUpSongOptions() // always return true.
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
GAMESTATE->m_PlayerOptions[p] = PlayerOptions();
|
GAMESTATE->m_PlayerOptions[p] = PlayerOptions();
|
||||||
|
GAMESTATE->m_PlayerOptions[p].ChooseRandomMofifiers();
|
||||||
if( RandomFloat(0,1)>0.8f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_fScrollSpeed = 1.5f;
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bEffects[ rand()%PlayerOptions::NUM_EFFECT_TYPES ] = true;
|
|
||||||
if( RandomFloat(0,1)>0.9f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_HIDDEN;
|
|
||||||
if( RandomFloat(0,1)>0.9f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_SUDDEN;
|
|
||||||
if( RandomFloat(0,1)>0.7f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bReverseScroll = true;
|
|
||||||
if( RandomFloat(0,1)>0.8f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bDark = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GAMESTATE->m_SongOptions = SongOptions();
|
GAMESTATE->m_SongOptions = SongOptions();
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
// NotesType soureNT = m_Selector.GetSelectedSourceNotesType();
|
// NotesType soureNT = m_Selector.GetSelectedSourceNotesType();
|
||||||
// Difficulty sourceDiff = m_Selector.GetSelectedSourceDifficulty();
|
// Difficulty sourceDiff = m_Selector.GetSelectedSourceDifficulty();
|
||||||
Notes* pSourceNotes = m_Selector.GetSelectedSourceNotes();
|
Notes* pSourceNotes = m_Selector.GetSelectedSourceNotes();
|
||||||
SongSelector::Action action = m_Selector.GetSelectedAction();
|
EditMenu::Action action = m_Selector.GetSelectedAction();
|
||||||
|
|
||||||
GAMESTATE->m_pCurSong = pSong;
|
GAMESTATE->m_pCurSong = pSong;
|
||||||
GAMESTATE->m_CurStyle = GAMEMAN->GetEditorStyleForNotesType( nt );
|
GAMESTATE->m_CurStyle = GAMEMAN->GetEditorStyleForNotesType( nt );
|
||||||
@@ -164,7 +164,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
|
|
||||||
switch( action )
|
switch( action )
|
||||||
{
|
{
|
||||||
case SongSelector::ACTION_EDIT:
|
case EditMenu::ACTION_EDIT:
|
||||||
// Prepare prepare for ScreenEdit
|
// Prepare prepare for ScreenEdit
|
||||||
ASSERT( pNotes );
|
ASSERT( pNotes );
|
||||||
SOUNDMAN->StopMusic();
|
SOUNDMAN->StopMusic();
|
||||||
@@ -172,12 +172,12 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false );
|
m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false );
|
||||||
m_Fade.CloseWipingRight( SM_None );
|
m_Fade.CloseWipingRight( SM_None );
|
||||||
break;
|
break;
|
||||||
case SongSelector::ACTION_DELETE:
|
case EditMenu::ACTION_DELETE:
|
||||||
ASSERT( pNotes );
|
ASSERT( pNotes );
|
||||||
SCREENMAN->Prompt( SM_RefreshSelector, "These notes will be lost permanently.\nContinue with delete?", true, false, DeleteCurNotes );
|
SCREENMAN->Prompt( SM_RefreshSelector, "These notes will be lost permanently.\nContinue with delete?", true, false, DeleteCurNotes );
|
||||||
m_Selector.Refresh();
|
m_Selector.Refresh();
|
||||||
return;
|
return;
|
||||||
case SongSelector::ACTION_COPY:
|
case EditMenu::ACTION_COPY:
|
||||||
ASSERT( !pNotes );
|
ASSERT( !pNotes );
|
||||||
ASSERT( pSourceNotes );
|
ASSERT( pSourceNotes );
|
||||||
{
|
{
|
||||||
@@ -194,7 +194,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
pSong->Save();
|
pSong->Save();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case SongSelector::ACTION_AUTOGEN:
|
case EditMenu::ACTION_AUTOGEN:
|
||||||
ASSERT( !pNotes );
|
ASSERT( !pNotes );
|
||||||
ASSERT( pSourceNotes );
|
ASSERT( pSourceNotes );
|
||||||
{
|
{
|
||||||
@@ -212,7 +212,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
pSong->Save();
|
pSong->Save();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case SongSelector::ACTION_BLANK:
|
case EditMenu::ACTION_BLANK:
|
||||||
ASSERT( !pNotes );
|
ASSERT( !pNotes );
|
||||||
{
|
{
|
||||||
// Yuck. Doing the memory allocation doesn't seem right since
|
// Yuck. Doing the memory allocation doesn't seem right since
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "SongSelector.h"
|
#include "EditMenu.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionFade.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
#include "MenuElements.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenEditMenu : public Screen
|
class ScreenEditMenu : public Screen
|
||||||
{
|
{
|
||||||
@@ -34,7 +36,7 @@ private:
|
|||||||
void MenuBack( PlayerNumber pn );
|
void MenuBack( PlayerNumber pn );
|
||||||
void MenuStart( PlayerNumber pn );
|
void MenuStart( PlayerNumber pn );
|
||||||
|
|
||||||
SongSelector m_Selector;
|
EditMenu m_Selector;
|
||||||
|
|
||||||
BitmapText m_textExplanation;
|
BitmapText m_textExplanation;
|
||||||
|
|
||||||
|
|||||||
@@ -739,7 +739,8 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
Screen::Update( fDeltaTime );
|
Screen::Update( fDeltaTime );
|
||||||
|
|
||||||
|
|
||||||
m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
||||||
|
m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||||
|
|
||||||
|
|
||||||
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
||||||
|
|||||||
@@ -24,48 +24,45 @@ const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+101); // MUST be sa
|
|||||||
|
|
||||||
bool PrepareForJukebox() // always return true.
|
bool PrepareForJukebox() // always return true.
|
||||||
{
|
{
|
||||||
//
|
// ScreeJukeboxMenu must set this
|
||||||
// Set the current song to prepare for a demonstration
|
ASSERT( GAMESTATE->m_CurStyle != STYLE_INVALID );
|
||||||
//
|
|
||||||
|
|
||||||
switch( GAMESTATE->m_CurGame )
|
|
||||||
{
|
|
||||||
case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS; break;
|
|
||||||
case GAME_PUMP: GAMESTATE->m_CurStyle = STYLE_PUMP_VERSUS; break;
|
|
||||||
case GAME_EZ2: GAMESTATE->m_CurStyle = STYLE_EZ2_SINGLE_VERSUS; break;
|
|
||||||
case GAME_PARA: GAMESTATE->m_CurStyle = STYLE_PARA_SINGLE; break;
|
|
||||||
case GAME_DS3DDX: GAMESTATE->m_CurStyle = STYLE_DS3DDX_SINGLE; break;
|
|
||||||
case GAME_BM: GAMESTATE->m_CurStyle = STYLE_BM_SINGLE; break;
|
|
||||||
default: ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
||||||
|
|
||||||
|
vector<Song*> vSongs;
|
||||||
|
if( GAMESTATE->m_sPreferredGroup.CompareNoCase("all music") == 0 )
|
||||||
|
SONGMAN->GetSongs( vSongs );
|
||||||
|
else
|
||||||
|
SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup );
|
||||||
|
|
||||||
//
|
//
|
||||||
// Search for a Song and Steps to play during the demo
|
// Search for a Song and Notes to play during the demo
|
||||||
//
|
//
|
||||||
for( int i=0; i<600; i++ ) // try 600 times
|
for( int i=0; i<600; i++ )
|
||||||
{
|
{
|
||||||
Song* pSong = SONGMAN->GetRandomSong();
|
if( vSongs.size() == 0 )
|
||||||
if( pSong == NULL ) // returns NULL there are no songs
|
return true;
|
||||||
return true; // we need to detect this and abort demonstration later
|
|
||||||
|
|
||||||
if( pSong->m_apNotes.empty() )
|
Song* pSong = vSongs[rand()%vSongs.size()];
|
||||||
continue; // skip
|
|
||||||
|
|
||||||
if( !pSong->HasMusic() )
|
if( !pSong->HasMusic() )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
vector<Notes*> apNotes;
|
Difficulty dc = GAMESTATE->m_PreferredDifficulty[PLAYER_1];
|
||||||
pSong->GetNotes( apNotes, GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
Notes* pNotes = NULL;
|
||||||
|
if( dc != DIFFICULTY_INVALID )
|
||||||
|
pNotes = pSong->GetNotes( GAMESTATE->GetCurrentStyleDef()->m_NotesType, GAMESTATE->m_PreferredDifficulty[PLAYER_1] );
|
||||||
|
else // "all difficulties"
|
||||||
|
{
|
||||||
|
vector<Notes*> vNotes;
|
||||||
|
pSong->GetNotes( vNotes, GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
||||||
|
if( vNotes.size() > 0 )
|
||||||
|
pNotes = vNotes[rand()%vNotes.size()];
|
||||||
|
}
|
||||||
|
|
||||||
if( apNotes.empty() )
|
if( pNotes == NULL )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
// Found something we can use!
|
// Found something we can use!
|
||||||
Notes* pNotes = apNotes[ rand()%apNotes.size() ];
|
|
||||||
|
|
||||||
GAMESTATE->m_pCurSong = pSong;
|
GAMESTATE->m_pCurSong = pSong;
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
GAMESTATE->m_pCurNotes[p] = pNotes;
|
GAMESTATE->m_pCurNotes[p] = pNotes;
|
||||||
@@ -106,17 +103,8 @@ bool PrepareForJukebox() // always return true.
|
|||||||
|
|
||||||
GAMESTATE->m_PlayerOptions[p] = PlayerOptions();
|
GAMESTATE->m_PlayerOptions[p] = PlayerOptions();
|
||||||
|
|
||||||
if( RandomFloat(0,1)>0.8f )
|
if( GAMESTATE->m_bJukeboxUsesModifiers )
|
||||||
GAMESTATE->m_PlayerOptions[p].m_fScrollSpeed = 1.5f;
|
GAMESTATE->m_PlayerOptions[p].ChooseRandomMofifiers();
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bEffects[ rand()%PlayerOptions::NUM_EFFECT_TYPES ] = true;
|
|
||||||
if( RandomFloat(0,1)>0.9f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_HIDDEN;
|
|
||||||
if( RandomFloat(0,1)>0.9f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_AppearanceType = PlayerOptions::APPEARANCE_SUDDEN;
|
|
||||||
if( RandomFloat(0,1)>0.7f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bReverseScroll = true;
|
|
||||||
if( RandomFloat(0,1)>0.8f )
|
|
||||||
GAMESTATE->m_PlayerOptions[p].m_bDark = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GAMESTATE->m_SongOptions = SongOptions();
|
GAMESTATE->m_SongOptions = SongOptions();
|
||||||
|
|||||||
@@ -0,0 +1,152 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: ScreenJukeboxMenu
|
||||||
|
|
||||||
|
Desc: The main title screen and menu.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ScreenJukeboxMenu.h"
|
||||||
|
#include "SongManager.h"
|
||||||
|
#include "ScreenManager.h"
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
|
#include "PrefsManager.h"
|
||||||
|
#include "GameManager.h"
|
||||||
|
#include "RageLog.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "RageSoundManager.h"
|
||||||
|
#include "ThemeManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Defines specific to ScreenJukeboxMenu
|
||||||
|
//
|
||||||
|
#define EXPLANATION_X THEME->GetMetricF("ScreenJukeboxMenu","ExplanationX")
|
||||||
|
#define EXPLANATION_Y THEME->GetMetricF("ScreenJukeboxMenu","ExplanationY")
|
||||||
|
#define EXPLANATION_TEXT THEME->GetMetric("ScreenJukeboxMenu","ExplanationText")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("ScreenJukeboxMenu","HelpText")
|
||||||
|
|
||||||
|
|
||||||
|
ScreenJukeboxMenu::ScreenJukeboxMenu()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenJukeboxMenu::ScreenJukeboxMenu()" );
|
||||||
|
|
||||||
|
GAMESTATE->m_CurStyle = STYLE_INVALID;
|
||||||
|
|
||||||
|
m_Selector.SetXY( 0, 0 );
|
||||||
|
// m_Selector.AllowNewNotes();
|
||||||
|
this->AddChild( &m_Selector );
|
||||||
|
|
||||||
|
m_Menu.Load(
|
||||||
|
THEME->GetPathTo("BGAnimations","jukebox menu"),
|
||||||
|
THEME->GetPathTo("Graphics","jukebox menu top edge"),
|
||||||
|
HELP_TEXT, false, false, 99
|
||||||
|
);
|
||||||
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
|
|
||||||
|
m_textExplanation.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
|
m_textExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
|
||||||
|
m_textExplanation.SetText( EXPLANATION_TEXT );
|
||||||
|
m_textExplanation.SetZoom( 0.7f );
|
||||||
|
this->AddChild( &m_textExplanation );
|
||||||
|
|
||||||
|
m_Fade.SetOpened();
|
||||||
|
this->AddChild( &m_Fade);
|
||||||
|
|
||||||
|
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","jukebox menu music") );
|
||||||
|
|
||||||
|
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||||
|
|
||||||
|
m_Menu.TweenOnScreenFromBlack( SM_None );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ScreenJukeboxMenu::~ScreenJukeboxMenu()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenJukeboxMenu::~ScreenJukeboxMenu()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::DrawPrimitives()
|
||||||
|
{
|
||||||
|
m_Menu.DrawBottomLayer();
|
||||||
|
Screen::DrawPrimitives();
|
||||||
|
m_Menu.DrawTopLayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenJukeboxMenu::Input()" );
|
||||||
|
|
||||||
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||||
|
{
|
||||||
|
switch( SM )
|
||||||
|
{
|
||||||
|
case SM_GoToPrevScreen:
|
||||||
|
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||||
|
break;
|
||||||
|
case SM_GoToNextScreen:
|
||||||
|
SCREENMAN->SetNewScreen( "ScreenJukebox" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuUp( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_Selector.Up();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuDown( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_Selector.Down();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
|
||||||
|
{
|
||||||
|
m_Selector.Left();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuRight( PlayerNumber pn, const InputEventType type )
|
||||||
|
{
|
||||||
|
m_Selector.Right();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuStart( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
if( m_Fade.IsClosing() || m_Fade.IsClosed() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Style style = m_Selector.GetSelectedStyle();
|
||||||
|
string sGroup = m_Selector.GetSelectedGroup();
|
||||||
|
Difficulty dc = m_Selector.GetSelectedDifficulty();
|
||||||
|
bool bModifiers = m_Selector.GetSelectedModifiers();
|
||||||
|
|
||||||
|
GAMESTATE->m_CurStyle = style;
|
||||||
|
GAMESTATE->m_sPreferredGroup = sGroup;
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
GAMESTATE->m_PreferredDifficulty[p] = dc;
|
||||||
|
GAMESTATE->m_bJukeboxUsesModifiers = bModifiers;
|
||||||
|
|
||||||
|
|
||||||
|
SOUNDMAN->StopMusic();
|
||||||
|
m_soundSelect.PlayRandom();
|
||||||
|
m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false );
|
||||||
|
m_Fade.CloseWipingRight( SM_None );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenJukeboxMenu::MenuBack( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_Menu.TweenOffScreenToBlack( SM_None, true );
|
||||||
|
|
||||||
|
SOUNDMAN->StopMusic();
|
||||||
|
|
||||||
|
m_Fade.CloseWipingLeft( SM_GoToPrevScreen );
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Class: ScreenJukeboxMenu
|
||||||
|
|
||||||
|
Desc: See header.
|
||||||
|
|
||||||
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Screen.h"
|
||||||
|
#include "JukeboxMenu.h"
|
||||||
|
#include "BitmapText.h"
|
||||||
|
#include "TransitionFade.h"
|
||||||
|
#include "RandomSample.h"
|
||||||
|
#include "MenuElements.h"
|
||||||
|
|
||||||
|
|
||||||
|
class ScreenJukeboxMenu : public Screen
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ScreenJukeboxMenu();
|
||||||
|
virtual ~ScreenJukeboxMenu();
|
||||||
|
|
||||||
|
virtual void DrawPrimitives();
|
||||||
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void MenuUp( PlayerNumber pn );
|
||||||
|
void MenuDown( PlayerNumber pn );
|
||||||
|
void MenuLeft( PlayerNumber pn, const InputEventType type );
|
||||||
|
void MenuRight( PlayerNumber pn, const InputEventType type );
|
||||||
|
void MenuBack( PlayerNumber pn );
|
||||||
|
void MenuStart( PlayerNumber pn );
|
||||||
|
|
||||||
|
JukeboxMenu m_Selector;
|
||||||
|
|
||||||
|
BitmapText m_textExplanation;
|
||||||
|
|
||||||
|
MenuElements m_Menu;
|
||||||
|
|
||||||
|
TransitionFade m_Fade;
|
||||||
|
|
||||||
|
RandomSample m_soundSelect;
|
||||||
|
RandomSample m_soundCreate;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -202,6 +202,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
|||||||
#include "ScreenInstructions.h"
|
#include "ScreenInstructions.h"
|
||||||
#include "ScreenNameEntry.h"
|
#include "ScreenNameEntry.h"
|
||||||
#include "ScreenJukebox.h"
|
#include "ScreenJukebox.h"
|
||||||
|
#include "ScreenJukeboxMenu.h"
|
||||||
#include "ScreenOptionsMenu.h"
|
#include "ScreenOptionsMenu.h"
|
||||||
#include "ScreenGameplayOptions.h"
|
#include "ScreenGameplayOptions.h"
|
||||||
#include "ScreenStyleSplash.h"
|
#include "ScreenStyleSplash.h"
|
||||||
@@ -257,6 +258,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
|
|||||||
else if( 0==stricmp(sClassName, "ScreenInstructions") ) ret = new ScreenInstructions;
|
else if( 0==stricmp(sClassName, "ScreenInstructions") ) ret = new ScreenInstructions;
|
||||||
else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry;
|
else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry;
|
||||||
else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox;
|
else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox;
|
||||||
|
else if( 0==stricmp(sClassName, "ScreenJukeboxMenu") ) ret = new ScreenJukeboxMenu;
|
||||||
else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu;
|
else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu;
|
||||||
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
|
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
|
||||||
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
|
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
|
||||||
|
|||||||
@@ -10,11 +10,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "SongSelector.h"
|
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "TransitionFade.h"
|
#include "TransitionFade.h"
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
#include "GrayArrowRow.h"
|
#include "GrayArrowRow.h"
|
||||||
|
#include "BGAnimation.h"
|
||||||
|
#include "MenuTimer.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenNameEntry : public Screen
|
class ScreenNameEntry : public Screen
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
|
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
|
||||||
break;
|
break;
|
||||||
case CHOICE_JUKEBOX:
|
case CHOICE_JUKEBOX:
|
||||||
SCREENMAN->SetNewScreen( "ScreenJukebox" );
|
SCREENMAN->SetNewScreen( "ScreenJukeboxMenu" );
|
||||||
break;
|
break;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
case CHOICE_SANDBOX:
|
case CHOICE_SANDBOX:
|
||||||
|
|||||||
+9
-11
@@ -827,17 +827,15 @@ bool Song::IsNew() const
|
|||||||
|
|
||||||
bool Song::IsEasy( NotesType nt ) const
|
bool Song::IsEasy( NotesType nt ) const
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_apNotes.size(); i++ )
|
Notes* pBeginnerNotes = GetNotes( nt, DIFFICULTY_BEGINNER );
|
||||||
{
|
Notes* pEasyNotes = GetNotes( nt, DIFFICULTY_EASY );
|
||||||
Notes* pNotes = m_apNotes[i];
|
Notes* pHardNotes = GetNotes( nt, DIFFICULTY_HARD );
|
||||||
if( pNotes->m_NotesType != nt )
|
|
||||||
continue;
|
// HACK: Looks bizarre to see the easy mark by Legend of MAX.
|
||||||
if( pNotes->GetDifficulty() == DIFFICULTY_BEGINNER )
|
if( pHardNotes->GetMeter() <= 9 )
|
||||||
continue; // ignore beginner steps for marking songs easy; very bizarre to see the beginner mark by Legend of MAX
|
return false;
|
||||||
if( pNotes->GetMeter() <= 2 )
|
|
||||||
return true;
|
return pBeginnerNotes->GetMeter() == 1 || pEasyNotes->GetMeter() == 1;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Song::HasEdits( NotesType nt ) const
|
bool Song::HasEdits( NotesType nt ) const
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="ScreenJukebox.h">
|
RelativePath="ScreenJukebox.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScreenJukeboxMenu.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScreenJukeboxMenu.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="ScreenLogo.cpp">
|
RelativePath="ScreenLogo.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -954,6 +960,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="DifficultyRating.h">
|
RelativePath="DifficultyRating.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EditMenu.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EditMenu.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="FadingBanner.cpp">
|
RelativePath="FadingBanner.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -984,6 +996,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="GroupList.h">
|
RelativePath="GroupList.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="JukeboxMenu.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="JukeboxMenu.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="MenuElements.cpp">
|
RelativePath="MenuElements.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -1080,12 +1098,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="SnapDisplay.h">
|
RelativePath="SnapDisplay.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="SongSelector.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="SongSelector.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="StageDisplay.cpp">
|
RelativePath="StageDisplay.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
Reference in New Issue
Block a user