Added: Player options
This commit is contained in:
@@ -144,6 +144,11 @@ CLIENT to SERVER protocol:
|
|||||||
1 If this value is 1 then the user entered the screen
|
1 If this value is 1 then the user entered the screen
|
||||||
If this value is 0 then the user exited the screen
|
If this value is 0 then the user exited the screen
|
||||||
|
|
||||||
|
011: User has changed player options
|
||||||
|
Size:
|
||||||
|
NT Player 0's options
|
||||||
|
NT Player 1's options
|
||||||
|
|
||||||
SERVER to CLIENT protocol: (begins at 128)
|
SERVER to CLIENT protocol: (begins at 128)
|
||||||
|
|
||||||
NOTE: Server responces always add 128, thus a server responce for no operation
|
NOTE: Server responces always add 128, thus a server responce for no operation
|
||||||
@@ -270,6 +275,8 @@ NOTE: Server responces always add 128, thus a server responce for no operation
|
|||||||
NT Set Specified gametype
|
NT Set Specified gametype
|
||||||
NT Set Specified style
|
NT Set Specified style
|
||||||
|
|
||||||
|
011: Reserved
|
||||||
|
|
||||||
///Potential for SMOnline/SMLAN (Changed to 020)
|
///Potential for SMOnline/SMLAN (Changed to 020)
|
||||||
020: SMonline Packet. (Adam)
|
020: SMonline Packet. (Adam)
|
||||||
Bytemap(Game Packet - SMO/TCP[C=010] Data)
|
Bytemap(Game Packet - SMO/TCP[C=010] Data)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -888,6 +888,11 @@ SelOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
|||||||
SelTo1Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,150
|
SelTo1Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,150
|
||||||
SelTo2Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,350
|
SelTo2Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,350
|
||||||
SelTo3Command=linear,0.3;x,260;y,400;zoomx,0.3;zoomy,2.0
|
SelTo3Command=linear,0.3;x,260;y,400;zoomx,0.3;zoomy,2.0
|
||||||
|
SelTo4Command=linear,0.3;x,80;y,70;zoomx,0.4;zoomy,2.2
|
||||||
|
optionsY=70
|
||||||
|
optionsX=80
|
||||||
|
optionsOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,0.7;zoomx,0.7
|
||||||
|
optionsOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||||
MeterP1Y=435
|
MeterP1Y=435
|
||||||
MeterP1X=240
|
MeterP1X=240
|
||||||
MeterP1OnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
|
MeterP1OnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
|
||||||
@@ -1417,10 +1422,10 @@ User2Y=80
|
|||||||
User2X=500
|
User2X=500
|
||||||
UserDX=0
|
UserDX=0
|
||||||
UserDY=32
|
UserDY=32
|
||||||
UserOnCommand=zoomx,0.0;zoomy,0.0;linear,0.1;zoomx,1.0;zoomy,1.0
|
UserOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomx,1.0;zoomy,1.0
|
||||||
UserOffCommand=zoomx,1.0;zoomy,1.0;linear,0.1;zoomx,0.0;zoomy,0.0
|
UserOffCommand=zoomx,1.0;zoomy,1.0;linear,0.5;zoomx,0.0;zoomy,0.0
|
||||||
UserDeSelCommand=zoomx,1.4;zoomy,1.4;linear,0.3;zoomx,1.0;zoomy,1.0
|
UserDeSelCommand=zoomx,1.4;zoomy,1.4;linear,0.1;zoomx,1.0;zoomy,1.0
|
||||||
UserSelCommand=zoomx,1.0;zoomy,1.0;linear,0.3;zoomx,1.4;zoomy,1.4
|
UserSelCommand=zoomx,1.0;zoomy,1.0;linear,0.1;zoomx,1.4;zoomy,1.4
|
||||||
|
|
||||||
[ScreenEvaluationStage]
|
[ScreenEvaluationStage]
|
||||||
Fallback=ScreenEvaluation
|
Fallback=ScreenEvaluation
|
||||||
@@ -4115,7 +4120,7 @@ PrevScreen=ScreenTitleMenu
|
|||||||
# when using entries that change the screen; otherwise, the only way to
|
# when using entries that change the screen; otherwise, the only way to
|
||||||
# exit the screen when in regular mode is "exit".
|
# exit the screen when in regular mode is "exit".
|
||||||
|
|
||||||
LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
|
||||||
OptionMenuFlags=together;forceallplayers;smnavigation
|
OptionMenuFlags=together;forceallplayers;smnavigation
|
||||||
# This NextScreen is only used for the "exit" choice.
|
# This NextScreen is only used for the "exit" choice.
|
||||||
Line1=list,Appearance Options
|
Line1=list,Appearance Options
|
||||||
@@ -4133,6 +4138,7 @@ Line12=list,Profile Options
|
|||||||
Line13=list,Other Options
|
Line13=list,Other Options
|
||||||
Line14=list,Reload Songs/Courses
|
Line14=list,Reload Songs/Courses
|
||||||
Line15=list,Test Input
|
Line15=list,Test Input
|
||||||
|
Line16=list,Network Options
|
||||||
|
|
||||||
[TextBanner]
|
[TextBanner]
|
||||||
TitleX=-90
|
TitleX=-90
|
||||||
|
|||||||
@@ -660,6 +660,14 @@ void NetworkSyncManager::SendChat( CString message )
|
|||||||
NetPlayerClient->SendPack((char*)&m_packet.Data, m_packet.Position);
|
NetPlayerClient->SendPack((char*)&m_packet.Data, m_packet.Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NetworkSyncManager::ReportPlayerOptions()
|
||||||
|
{
|
||||||
|
m_packet.ClearPacket();
|
||||||
|
m_packet.Write1( 11 );
|
||||||
|
FOREACH_PlayerNumber (pn)
|
||||||
|
m_packet.WriteNT( GAMESTATE->m_PlayerOptions[pn].GetString() );
|
||||||
|
}
|
||||||
|
|
||||||
void NetworkSyncManager::SelectUserSong()
|
void NetworkSyncManager::SelectUserSong()
|
||||||
{
|
{
|
||||||
m_packet.ClearPacket();
|
m_packet.ClearPacket();
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ public:
|
|||||||
void SendChat( CString message );
|
void SendChat( CString message );
|
||||||
CString m_WaitingChat;
|
CString m_WaitingChat;
|
||||||
|
|
||||||
|
//Used for options
|
||||||
|
void ReportPlayerOptions();
|
||||||
|
|
||||||
//Used for song checking/changing
|
//Used for song checking/changing
|
||||||
CString m_sMainTitle;
|
CString m_sMainTitle;
|
||||||
CString m_sArtist;
|
CString m_sArtist;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
|
const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
|
||||||
const ScreenMessage SM_AddToChat = ScreenMessage(SM_User+4);
|
const ScreenMessage SM_AddToChat = ScreenMessage(SM_User+4);
|
||||||
const ScreenMessage SM_ChangeSong = ScreenMessage(SM_User+5);
|
const ScreenMessage SM_ChangeSong = ScreenMessage(SM_User+5);
|
||||||
|
const ScreenMessage SM_BackFromOpts = ScreenMessage(SM_User+6);
|
||||||
|
|
||||||
const CString AllGroups = "[ALL MUSIC]";
|
const CString AllGroups = "[ALL MUSIC]";
|
||||||
|
|
||||||
@@ -158,6 +159,11 @@ ScreenNetSelectMusic::ScreenNetSelectMusic( const CString& sName ) : ScreenWithM
|
|||||||
SET_XY_AND_ON_COMMAND( m_textSubtitle );
|
SET_XY_AND_ON_COMMAND( m_textSubtitle );
|
||||||
this->AddChild( &m_textSubtitle );
|
this->AddChild( &m_textSubtitle );
|
||||||
|
|
||||||
|
//SelectOptions Sprite
|
||||||
|
m_sprSelOptions.Load( THEME->GetPathG( m_sName, "options" ) );
|
||||||
|
m_sprSelOptions.SetName( "options" );
|
||||||
|
SET_XY_AND_ON_COMMAND( m_sprSelOptions );
|
||||||
|
this->AddChild( &m_sprSelOptions );
|
||||||
|
|
||||||
//Diff Icon background
|
//Diff Icon background
|
||||||
m_rectDiff.SetDiffuse( DIFFBG_COLOR );
|
m_rectDiff.SetDiffuse( DIFFBG_COLOR );
|
||||||
@@ -288,12 +294,13 @@ void ScreenNetSelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
|||||||
case ']': c='}'; break;
|
case ']': c='}'; break;
|
||||||
case '\\': c='|'; break;
|
case '\\': c='|'; break;
|
||||||
case ';': c=':'; break;
|
case ';': c=':'; break;
|
||||||
case '\'': c='"'; break;
|
|
||||||
case ',': c='<'; break;
|
case ',': c='<'; break;
|
||||||
case '.': c='>'; break;
|
case '.': c='>'; break;
|
||||||
case '/': c='?'; break;
|
case '/': c='?'; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( !bHoldingShift && (c == '\"') )
|
||||||
|
c = '\'';
|
||||||
|
|
||||||
//Search list for given letter (to aide in searching)
|
//Search list for given letter (to aide in searching)
|
||||||
if( bHoldingCtrl )
|
if( bHoldingCtrl )
|
||||||
@@ -392,6 +399,11 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SM_BackFromOpts:
|
||||||
|
//XXX: HACK: This will causes ScreenSelectOptions to go back here.
|
||||||
|
GAMESTATE->m_bEditing = false;
|
||||||
|
NSMAN->ReportPlayerOptions();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -413,25 +425,33 @@ void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type
|
|||||||
UpdateSongsListPos();
|
UpdateSongsListPos();
|
||||||
break;
|
break;
|
||||||
case SelectDifficulty:
|
case SelectDifficulty:
|
||||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
|
||||||
vector <Steps *> MultiSteps;
|
|
||||||
MultiSteps = GAMESTATE->m_pCurSong->GetAllSteps( st );
|
|
||||||
if (MultiSteps.size() == 0)
|
|
||||||
m_DC[pn] = NUM_DIFFICULTIES;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
for ( i=0; i<(int)MultiSteps.size(); i++ )
|
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||||
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
vector <Steps *> MultiSteps;
|
||||||
break;
|
MultiSteps = GAMESTATE->m_pCurSong->GetAllSteps( st );
|
||||||
|
if (MultiSteps.size() == 0)
|
||||||
if ( i == (int)MultiSteps.size() )
|
m_DC[pn] = NUM_DIFFICULTIES;
|
||||||
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
|
||||||
else
|
else
|
||||||
if (i > 0) //If we are at the easiest difficulty, do nothign
|
{
|
||||||
|
for ( i=0; i<(int)MultiSteps.size(); i++ )
|
||||||
|
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ( i == (int)MultiSteps.size() )
|
||||||
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
||||||
|
else
|
||||||
|
if (i > 0) //If we are at the easiest difficulty, do nothign
|
||||||
|
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
||||||
|
}
|
||||||
|
UpdateDifficulties( pn );
|
||||||
|
GAMESTATE->m_PreferredDifficulty[pn] = m_DC[pn];
|
||||||
}
|
}
|
||||||
UpdateDifficulties( pn );
|
break;
|
||||||
GAMESTATE->m_PreferredDifficulty[pn] = m_DC[pn];
|
case SelectOptions:
|
||||||
|
//XXX: HACK: This will causes ScreenSelectOptions to go back here.
|
||||||
|
GAMESTATE->m_bEditing = true;
|
||||||
|
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromOpts );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,25 +472,33 @@ void ScreenNetSelectMusic::MenuRight( PlayerNumber pn, const InputEventType type
|
|||||||
UpdateSongsListPos();
|
UpdateSongsListPos();
|
||||||
break;
|
break;
|
||||||
case SelectDifficulty:
|
case SelectDifficulty:
|
||||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
|
||||||
vector <Steps *> MultiSteps;
|
|
||||||
MultiSteps = GAMESTATE->m_pCurSong->GetAllSteps( st );
|
|
||||||
if (MultiSteps.size() == 0)
|
|
||||||
m_DC[pn] = NUM_DIFFICULTIES;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
for ( i=0; i<(int)MultiSteps.size(); i++ )
|
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||||
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
vector <Steps *> MultiSteps;
|
||||||
break;
|
MultiSteps = GAMESTATE->m_pCurSong->GetAllSteps( st );
|
||||||
|
if (MultiSteps.size() == 0)
|
||||||
if ( i == (int)MultiSteps.size() )
|
m_DC[pn] = NUM_DIFFICULTIES;
|
||||||
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
|
||||||
else
|
else
|
||||||
if (i < (int)MultiSteps.size() - 1 ) //If we are at the hardest difficulty, do nothign
|
{
|
||||||
m_DC[pn] = MultiSteps[i+1]->GetDifficulty();
|
for ( i=0; i<(int)MultiSteps.size(); i++ )
|
||||||
|
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ( i == (int)MultiSteps.size() )
|
||||||
|
m_DC[pn] = MultiSteps[i-1]->GetDifficulty();
|
||||||
|
else
|
||||||
|
if (i < (int)MultiSteps.size() - 1 ) //If we are at the hardest difficulty, do nothign
|
||||||
|
m_DC[pn] = MultiSteps[i+1]->GetDifficulty();
|
||||||
|
}
|
||||||
|
UpdateDifficulties( pn );
|
||||||
|
GAMESTATE->m_PreferredDifficulty[pn] = m_DC[pn];
|
||||||
}
|
}
|
||||||
UpdateDifficulties( pn );
|
break;
|
||||||
GAMESTATE->m_PreferredDifficulty[pn] = m_DC[pn];
|
case SelectOptions:
|
||||||
|
//XXX: HACK: This will causes ScreenSelectOptions to go back here.
|
||||||
|
GAMESTATE->m_bEditing = true;
|
||||||
|
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromOpts );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,6 +561,8 @@ void ScreenNetSelectMusic::TweenOffScreen()
|
|||||||
OFF_COMMAND( m_rectExInfo );
|
OFF_COMMAND( m_rectExInfo );
|
||||||
OFF_COMMAND( m_rectDiff );
|
OFF_COMMAND( m_rectDiff );
|
||||||
|
|
||||||
|
OFF_COMMAND( m_sprSelOptions );
|
||||||
|
|
||||||
FOREACH_EnabledPlayer (pn)
|
FOREACH_EnabledPlayer (pn)
|
||||||
{
|
{
|
||||||
OFF_COMMAND( m_DifficultyMeters[pn] );
|
OFF_COMMAND( m_DifficultyMeters[pn] );
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ private:
|
|||||||
SelectGroup = 0,
|
SelectGroup = 0,
|
||||||
SelectSong,
|
SelectSong,
|
||||||
SelectDifficulty,
|
SelectDifficulty,
|
||||||
|
SelectOptions,
|
||||||
SelectModes,
|
SelectModes,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -93,6 +94,9 @@ private:
|
|||||||
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
||||||
Difficulty m_DC[NUM_PLAYERS];
|
Difficulty m_DC[NUM_PLAYERS];
|
||||||
|
|
||||||
|
//Select Options
|
||||||
|
Sprite m_sprSelOptions;
|
||||||
|
|
||||||
void UpdateDifficulties( PlayerNumber pn );
|
void UpdateDifficulties( PlayerNumber pn );
|
||||||
DifficultyMeter m_DifficultyMeters[NUM_PLAYERS];
|
DifficultyMeter m_DifficultyMeters[NUM_PLAYERS];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user