cleanup
This commit is contained in:
@@ -315,61 +315,6 @@ void NetworkSyncManager::SendSongs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//I am adding this for Network support
|
|
||||||
//Feel free to change the way --course is used
|
|
||||||
//I am not building any part of SMOnline specific to this yet.
|
|
||||||
|
|
||||||
void ArgStartCourse(CString CourseName)
|
|
||||||
{
|
|
||||||
Course * desCourse = SONGMAN->GetCourseFromName(CourseName);
|
|
||||||
LOG->Info ("Course Desied: %s",CourseName.c_str());
|
|
||||||
if (desCourse == 0)
|
|
||||||
{
|
|
||||||
LOG->Info ("Desired Course not found!");
|
|
||||||
SCREENMAN->SystemMessage("Failed to find course");
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
--PLAYERS=
|
|
||||||
1 -> STYLE_DANCE_SINGLE, (Default)
|
|
||||||
2 -> STYLE_DANCE_SINGLE,
|
|
||||||
VERSUS -> STYLE_DANCE_VERSUS,
|
|
||||||
DOUBLE -> STYLE_DANCE_DOUBLE,
|
|
||||||
COUPLE -> STYLE_DANCE_COUPLE,
|
|
||||||
*/
|
|
||||||
if ((!GAMESTATE->m_bSideIsJoined[PLAYER_1]) && (!GAMESTATE->m_bSideIsJoined[PLAYER_2]))
|
|
||||||
{
|
|
||||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true; //Default
|
|
||||||
//Also take Default Fail Type
|
|
||||||
}
|
|
||||||
|
|
||||||
GAMESTATE->m_pCurCourse = desCourse;
|
|
||||||
|
|
||||||
GAMESTATE->m_PlayMode = desCourse->GetPlayMode();
|
|
||||||
if (desCourse->IsOni())
|
|
||||||
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
|
|
||||||
else
|
|
||||||
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BAR;
|
|
||||||
|
|
||||||
GAMESTATE->m_SongOptions.m_iBatteryLives = desCourse->m_iLives;
|
|
||||||
|
|
||||||
GAMESTATE->PlayersFinalized();
|
|
||||||
|
|
||||||
//Go to Gameplay Screen
|
|
||||||
SCREENMAN->SetNewScreen(NEXT_SCREEN);
|
|
||||||
|
|
||||||
//Not sure if this is correct, it may make more sense
|
|
||||||
//to have a metric to allow/disallow user options at this point.
|
|
||||||
|
|
||||||
GAMESTATE->BeginGame();
|
|
||||||
GAMESTATE->BeginStage();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void NetworkSyncManager::DisplayStartupStatus()
|
void NetworkSyncManager::DisplayStartupStatus()
|
||||||
{
|
{
|
||||||
CString sMessage("");
|
CString sMessage("");
|
||||||
|
|||||||
@@ -916,24 +916,8 @@ static void ProcessArgsSecond()
|
|||||||
if( GetCommandlineArgument( "test2" ) )
|
if( GetCommandlineArgument( "test2" ) )
|
||||||
LOG->Info ("Test2");
|
LOG->Info ("Test2");
|
||||||
|
|
||||||
|
|
||||||
//--Course=[coursename]
|
|
||||||
|
|
||||||
//Will start the given course when StepMania
|
|
||||||
//starts, disallows player options.
|
|
||||||
|
|
||||||
//"ArgStartCourse", is in the NSManager
|
|
||||||
//bacause Networked StepMania will
|
|
||||||
//use it a lot.
|
|
||||||
|
|
||||||
if( GetCommandlineArgument( "netip" ) )
|
if( GetCommandlineArgument( "netip" ) )
|
||||||
NSMAN->DisplayStartupStatus(); //If we're using networking show what happend
|
NSMAN->DisplayStartupStatus(); //If we're using networking show what happend
|
||||||
|
|
||||||
if( GetCommandlineArgument( "course", & Argument ) )
|
|
||||||
ArgStartCourse(Argument);
|
|
||||||
|
|
||||||
if( GetCommandlineArgument( "jumpscreen", & Argument ) )
|
|
||||||
SCREENMAN->SetNewScreen(Argument);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
|||||||
Reference in New Issue
Block a user