remove ControllerStateDisplay
This commit is contained in:
+37
-30
@@ -89,12 +89,6 @@ Player::Player( bool bShowNoteField, bool bShowJudgment )
|
|||||||
this->AddChild( m_pJudgment );
|
this->AddChild( m_pJudgment );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pControllerStateDisplay = NULL;
|
|
||||||
if( bShowJudgment )
|
|
||||||
{
|
|
||||||
m_pControllerStateDisplay = new ControllerStateDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_pCombo = NULL;
|
m_pCombo = NULL;
|
||||||
if( bShowNoteField )
|
if( bShowNoteField )
|
||||||
{
|
{
|
||||||
@@ -121,7 +115,6 @@ Player::Player( bool bShowNoteField, bool bShowJudgment )
|
|||||||
Player::~Player()
|
Player::~Player()
|
||||||
{
|
{
|
||||||
SAFE_DELETE( m_pJudgment );
|
SAFE_DELETE( m_pJudgment );
|
||||||
SAFE_DELETE( m_pControllerStateDisplay );
|
|
||||||
SAFE_DELETE( m_pCombo );
|
SAFE_DELETE( m_pCombo );
|
||||||
SAFE_DELETE( m_pAttackDisplay );
|
SAFE_DELETE( m_pAttackDisplay );
|
||||||
SAFE_DELETE( m_pNoteField );
|
SAFE_DELETE( m_pNoteField );
|
||||||
@@ -227,25 +220,37 @@ void Player::Init(
|
|||||||
GameCommand gc;
|
GameCommand gc;
|
||||||
ASSERT( pPlayerState->m_mp != MultiPlayer_INVALID );
|
ASSERT( pPlayerState->m_mp != MultiPlayer_INVALID );
|
||||||
gc.m_MultiPlayer = pPlayerState->m_mp;
|
gc.m_MultiPlayer = pPlayerState->m_mp;
|
||||||
|
|
||||||
|
{
|
||||||
Lua *L = LUA->Get();
|
Lua *L = LUA->Get();
|
||||||
gc.PushSelf( L );
|
gc.PushSelf( L );
|
||||||
lua_setglobal( L, "ThisGameCommand" );
|
lua_setglobal( L, "ThisGameCommand" );
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
|
}
|
||||||
|
|
||||||
m_sprJudgmentFrame.Load( THEME->GetPathG(sType,"JudgmentFrame") );
|
m_sprJudgmentFrame.Load( THEME->GetPathG(sType,"JudgmentFrame") );
|
||||||
|
|
||||||
|
{
|
||||||
|
Lua *L = LUA->Get();
|
||||||
|
expr.PushSelf( L );
|
||||||
|
ASSERT( !lua_isnil(L, -1) );
|
||||||
|
m_sprJudgmentFrame->PushSelf( L );
|
||||||
|
LuaHelpers::Push( pPlayerState->m_PlayerNumber, L );
|
||||||
|
LuaHelpers::Push( pPlayerState->m_mp, L );
|
||||||
|
LuaHelpers::Push( iEnabledPlayerIndex, L );
|
||||||
|
LuaHelpers::Push( iNumEnabledPlayers, L );
|
||||||
|
LuaHelpers::Push( bPlayerUsingBothSides, L );
|
||||||
|
LuaHelpers::Push( false, L );
|
||||||
|
LuaHelpers::Push( false, L );
|
||||||
|
lua_call( L, 8, 0 ); // 8 args, 0 results
|
||||||
|
LUA->Release( L );
|
||||||
|
}
|
||||||
|
|
||||||
LUA->UnsetGlobal( "ThisGameCommand" );
|
LUA->UnsetGlobal( "ThisGameCommand" );
|
||||||
this->AddChild( m_sprJudgmentFrame );
|
this->AddChild( m_sprJudgmentFrame );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load CSD
|
|
||||||
if( GAMESTATE->m_bMultiplayer && m_pControllerStateDisplay && !m_pControllerStateDisplay->IsLoaded() ) // only load the first time
|
|
||||||
{
|
|
||||||
m_pControllerStateDisplay->LoadMultiPlayer( pPlayerState->m_mp );
|
|
||||||
this->AddChild( m_pControllerStateDisplay );
|
|
||||||
}
|
|
||||||
|
|
||||||
this->SortByDrawOrder();
|
this->SortByDrawOrder();
|
||||||
|
|
||||||
m_pPlayerState = pPlayerState;
|
m_pPlayerState = pPlayerState;
|
||||||
@@ -299,7 +304,7 @@ void Player::Init(
|
|||||||
if( m_pJudgment )
|
if( m_pJudgment )
|
||||||
{
|
{
|
||||||
m_pJudgment->SetName( "Judgment" );
|
m_pJudgment->SetName( "Judgment" );
|
||||||
m_pJudgment->Load( IsPlayingBeginner() );
|
m_pJudgment->LoadNormal( IsPlayingBeginner() );
|
||||||
ActorUtil::OnCommand( m_pJudgment, sType );
|
ActorUtil::OnCommand( m_pJudgment, sType );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,13 +511,6 @@ void Player::Update( float fDeltaTime )
|
|||||||
Actor::TweenState::MakeWeightedAverage( m_pJudgment->DestTweenState(), ts1, ts2, fPercentCentered );
|
Actor::TweenState::MakeWeightedAverage( m_pJudgment->DestTweenState(), ts1, ts2, fPercentCentered );
|
||||||
if( m_sprJudgmentFrame.IsLoaded() )
|
if( m_sprJudgmentFrame.IsLoaded() )
|
||||||
Actor::TweenState::MakeWeightedAverage( m_sprJudgmentFrame->DestTweenState(), ts1, ts2, fPercentCentered );
|
Actor::TweenState::MakeWeightedAverage( m_sprJudgmentFrame->DestTweenState(), ts1, ts2, fPercentCentered );
|
||||||
if( m_pControllerStateDisplay->IsLoaded() )
|
|
||||||
{
|
|
||||||
Actor::TweenState::MakeWeightedAverage( m_pControllerStateDisplay->DestTweenState(), ts1, ts2, fPercentCentered );
|
|
||||||
|
|
||||||
// temp hack
|
|
||||||
m_pControllerStateDisplay->DestTweenState().pos.x *= 1.35f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -695,6 +693,11 @@ void Player::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
/* this note has been judged */
|
/* this note has been judged */
|
||||||
HandleHoldScore( hns, tns );
|
HandleHoldScore( hns, tns );
|
||||||
|
|
||||||
|
m_pPlayerStageStats->hnsLast = hns;
|
||||||
|
if( m_pPlayerState->m_mp != MultiPlayer_INVALID )
|
||||||
|
MESSAGEMAN->Broadcast( enum_add2(Message_ShowHoldJudgmentMuliPlayerP1,m_pPlayerState->m_mp) );
|
||||||
|
|
||||||
m_vHoldJudgment[iTrack]->SetHoldJudgment( hns );
|
m_vHoldJudgment[iTrack]->SetHoldJudgment( hns );
|
||||||
|
|
||||||
int ms_error = (hns == HNS_Held)? 0:MAX_PRO_TIMING_ERROR;
|
int ms_error = (hns == HNS_Held)? 0:MAX_PRO_TIMING_ERROR;
|
||||||
@@ -858,8 +861,6 @@ void Player::DrawTapJudgments()
|
|||||||
|
|
||||||
if( m_sprJudgmentFrame.IsLoaded() )
|
if( m_sprJudgmentFrame.IsLoaded() )
|
||||||
m_sprJudgmentFrame->Draw();
|
m_sprJudgmentFrame->Draw();
|
||||||
if( m_pControllerStateDisplay )
|
|
||||||
m_pControllerStateDisplay->Draw();
|
|
||||||
if( m_pJudgment )
|
if( m_pJudgment )
|
||||||
m_pJudgment->Draw();
|
m_pJudgment->Draw();
|
||||||
}
|
}
|
||||||
@@ -1389,8 +1390,7 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
|||||||
DisplayJudgedRow( iIndexThatWasSteppedOn, score, c );
|
DisplayJudgedRow( iIndexThatWasSteppedOn, score, c );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_pJudgment )
|
SetJudgment( score, tnr.fTapNoteOffset < 0 );
|
||||||
m_pJudgment->SetJudgment( score, tnr.fTapNoteOffset < 0 );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1405,8 +1405,7 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
|||||||
|
|
||||||
DisplayJudgedRow( iIndexThatWasSteppedOn, score, c );
|
DisplayJudgedRow( iIndexThatWasSteppedOn, score, c );
|
||||||
|
|
||||||
if( m_pJudgment )
|
SetJudgment( score, tnr.fTapNoteOffset < 0 );
|
||||||
m_pJudgment->SetJudgment( score, tnr.fTapNoteOffset < 0 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1485,8 +1484,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
|||||||
|
|
||||||
if( iNumMissesFound > 0 )
|
if( iNumMissesFound > 0 )
|
||||||
{
|
{
|
||||||
if( m_pJudgment )
|
SetJudgment( TNS_Miss, false );
|
||||||
m_pJudgment->SetJudgment( TNS_Miss, false );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1803,6 +1801,15 @@ bool Player::IsPlayingBeginner() const
|
|||||||
return pSteps && pSteps->GetDifficulty() == DIFFICULTY_BEGINNER;
|
return pSteps && pSteps->GetDifficulty() == DIFFICULTY_BEGINNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::SetJudgment( TapNoteScore tns, bool bEarly )
|
||||||
|
{
|
||||||
|
m_pPlayerStageStats->tnsLast = tns;
|
||||||
|
if( m_pPlayerState->m_mp != MultiPlayer_INVALID )
|
||||||
|
MESSAGEMAN->Broadcast( enum_add2(Message_ShowJudgmentMuliPlayerP1,m_pPlayerState->m_mp) );
|
||||||
|
|
||||||
|
if( m_pJudgment )
|
||||||
|
m_pJudgment->SetJudgment( tns, bEarly );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
#include "AttackDisplay.h"
|
#include "AttackDisplay.h"
|
||||||
#include "NoteData.h"
|
#include "NoteData.h"
|
||||||
#include "ControllerStateDisplay.h"
|
|
||||||
#include "ScreenMessage.h"
|
#include "ScreenMessage.h"
|
||||||
|
|
||||||
class ScoreDisplay;
|
class ScoreDisplay;
|
||||||
@@ -85,6 +84,8 @@ protected:
|
|||||||
void DrawTapJudgments();
|
void DrawTapJudgments();
|
||||||
void DrawHoldJudgments();
|
void DrawHoldJudgments();
|
||||||
|
|
||||||
|
void SetJudgment( TapNoteScore tns, bool bEarly );
|
||||||
|
|
||||||
int GetClosestNoteDirectional( int col, int iStartRow, int iMaxRowsAhead, bool bAllowGraded, bool bForward ) const;
|
int GetClosestNoteDirectional( int col, int iStartRow, int iMaxRowsAhead, bool bAllowGraded, bool bForward ) const;
|
||||||
int GetClosestNote( int col, int iNoteRow, int iMaxRowsAhead, int iMaxRowsBehind, bool bAllowGraded ) const;
|
int GetClosestNote( int col, int iNoteRow, int iMaxRowsAhead, int iMaxRowsBehind, bool bAllowGraded ) const;
|
||||||
|
|
||||||
@@ -105,8 +106,6 @@ protected:
|
|||||||
Judgment *m_pJudgment;
|
Judgment *m_pJudgment;
|
||||||
AutoActor m_sprJudgmentFrame;
|
AutoActor m_sprJudgmentFrame;
|
||||||
|
|
||||||
ControllerStateDisplay *m_pControllerStateDisplay;
|
|
||||||
|
|
||||||
Combo *m_pCombo;
|
Combo *m_pCombo;
|
||||||
|
|
||||||
AttackDisplay *m_pAttackDisplay;
|
AttackDisplay *m_pAttackDisplay;
|
||||||
|
|||||||
Reference in New Issue
Block a user