예제 #1
0
BOOL CWndGuideSystem::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
	CWndBase* pWndBase = (CWndBase*) pLResult;
	
	if( pWndBase->m_pParentWnd == &m_wndMenuPlace )
	{
		int nState = !m_wndMenuPlace.GetMenuState( nID, 0 );
		m_wndMenuPlace.CheckMenuItem( nID, nState );
		m_wndMenuPlace.CheckMenuItem( 0, FALSE );
		m_wndMenuPlace.CheckMenuItem( 1, FALSE );
		
		SetFocus();
		switch( nID )
		{
		case 0:
			{
				if(g_pPlayer)
					SetAni( g_pPlayer->GetJob(), ANI_BYTE );

				if( m_wndGuideText->m_VecGuideText.size() )
					m_wndGuideText->m_bVisible = FALSE;
				
			}
			break;
		case 1:
			if( m_wndGuideText->m_VecGuideText.size() )
				m_wndGuideText->m_bVisible = !m_wndGuideText->m_bVisible;
			break;
		}
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
예제 #2
0
void CWndGuideSystem::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

	m_bIsLoad = FALSE;

	this->DelWndStyle(WBS_CAPTION);
	this->AddWndStyle(WBS_TOPMOST);

	SAFE_DELETE(m_pModel);

	if( g_pPlayer )
	{
		ChangeModel( g_pPlayer->GetJob() );
		SetAni( g_pPlayer->GetJob(), ANI_INTRO );
	}
	else
		Error( "CWndGuideSystem::OnInitialUpdate() -> g_pPlayer == NULL " );

	m_wndTitleBar.SetVisible( FALSE );

	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rect = GetWindowRect();
	int nWidth  = rect.Width(); 
	int nHeight = rect.Height(); 
	int x = rectRoot.right - rect.Width();
	int y = rectRoot.bottom - nHeight;	
	CPoint point( x, y );
	Move( point );

	m_listGuide.clear();
	m_listGuideMsg.clear();
	m_listGuideChart.clear();

	LoadGuide( MakePath( DIR_CLIENT, "Guide.inc" ) );
	//*
	//텍스트 창 출력
	SAFE_DELETE(m_wndGuideText);
	m_wndGuideText = new CWndGuideTextMgr;
#ifdef __FIX_WND_1109
	m_wndGuideText->Initialize( this );
#else	// __FIX_WND_1109
	m_wndGuideText->Initialize();
#endif	// __FIX_WND_1109
	/**/

	m_bIsGuideChart[0] = FALSE;
	m_bIsGuideChart[1] = FALSE;
	
	m_dwTime = g_tmCurrent;

	m_wndMenuPlace.CreateMenu( this );	
	m_wndMenuPlace.AppendMenu( 0, 0 , prj.GetText(TID_GAME_GUIDE_HIDE) );
	m_wndMenuPlace.AppendMenu( 0, 1 , prj.GetText(TID_GAME_GUIDE_OPEN) );
	m_wndMenuPlace.CheckMenuItem( 0, FALSE );
	m_wndMenuPlace.CheckMenuItem( 1, m_wndGuideText->m_bVisible );
	
	m_dwGuideLevel = 1;
}
예제 #3
0
BOOL CWndGuideSystem::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
	CWndBase* pWndBase = (CWndBase*) pLResult;
	
	if( pWndBase->m_pParentWnd == &m_wndMenuPlace )
	{
		int nState = !m_wndMenuPlace.GetMenuState( nID, 0 );
		m_wndMenuPlace.CheckMenuItem( nID, nState );
		m_wndMenuPlace.CheckMenuItem( 0, FALSE );
		m_wndMenuPlace.CheckMenuItem( 1, FALSE );
		m_wndMenuPlace.CheckMenuItem( 2, FALSE );
		SetFocus();
		switch( nID )
		{
		case 0: // 숨기기 
			{
				if(g_pPlayer)
					SetAni( g_pPlayer->GetJob(), ANI_BYTE );
				//Destroy();
				
				if( m_wndGuideText->m_VecGuideText.size() )
					m_wndGuideText->m_bVisible = FALSE;

				m_pWndTutorialView->SetVisible(FALSE);
				
			}
			break;
		case 1: // 보기
			if( m_wndGuideText->m_VecGuideText.size() )
				m_wndGuideText->m_bVisible = !m_wndGuideText->m_bVisible;

			if(m_wndGuideText->m_bVisible) 
			{
				if(m_CurrentGuide.m_nEventMsg != 0) m_wndGuideText->AddGuideText(m_CurrentGuide);
			}
			break;
		case 2:
			{
				SAFE_DELETE(m_pWndTutorialView);
				m_pWndTutorialView = new CWndTutorial;
				m_pWndTutorialView->Initialize(this);
				//m_bIsViewVisible = !m_bIsViewVisible;
				//m_pWndTutorialView->m_bVisible = m_bIsViewVisible;
			}
			break;
		}
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
예제 #4
0
void CAnimatorBody::Twitch()
{
	SetAni(m_eAniTwitch, m_eAniTrackerTwitch);
}
예제 #5
0
BOOL CWndGuideSystem::Process()
{
//	return 1;
	if( !(g_tmCurrent > m_dwTime+SEC(2.5)) )
		return TRUE;

	if( m_pModel == NULL )
		return FALSE;
	
	m_pModel->FrameMove();
	
	if( m_pModel->IsEndFrame() )
	{
		if( m_bAniState == ANI_INTRO )
		{
			if( g_pPlayer )
				SetAni( g_pPlayer->GetJob(), ANI_IDLE );
		}
		else
		if( m_bAniState == ANI_BYTE )
		{
			m_bVisible     = FALSE;
			m_bAniState    = ANI_IDLE;
		}
	}
	
	int nMsg;

	if( m_bIsGuideChart[0] )
	{	
		GUIDE_STRUCT* guidestruct;

		if( m_listGuideMsg.size() )
		{
			nMsg = m_listGuideMsg.front();

			if( m_listGuideChart.size() )
			{
				guidestruct = m_listGuideChart.front();

				if( guidestruct->m_nEventMsg == nMsg )
				{
					m_listGuideChart.pop_front();
					m_listGuideMsg.pop_front();

					// 새로운 가이드 추가
					if( m_listGuideChart.size() )
					{
						guidestruct = m_listGuideChart.front();
						m_wndGuideText->AddGuideText( *guidestruct );
					}
					else
					{
						m_wndGuideText->m_bVisible = FALSE;
						m_bIsGuideChart[0] = FALSE;
						m_bIsGuideChart[1] = TRUE;
					}
				}
				else
					m_listGuideMsg.pop_front();
			}
		}
	}
	else
	if( m_bIsGuideChart[1] )
	{
		if( m_listGuideMsg.size() )
		{
			nMsg = m_listGuideMsg.front();

			for( list<GUIDE_STRUCT>::iterator i = m_listGuide.begin(); i != m_listGuide.end(); ++i )
			{
				GUIDE_STRUCT guidestruct;

				guidestruct = (*i);

				if( (*i).m_nEventMsg == nMsg && (*i).m_bBeginner == FALSE  )
				{
					if( g_pPlayer && g_pPlayer->GetLevel() == (*i).m_nShowLevel )
					{
						(*i).m_bFlag = !(*i).m_bFlag;

						m_listGuideMsg.pop_front();
						m_wndGuideText->AddGuideText( (*i) );
					}
				}
			}

			if( m_listGuideMsg.size() )
				m_listGuideMsg.pop_front();
		}
		
	}

	return TRUE;
}
예제 #6
0
BOOL CWndGuideSystem::Process()
{

	if( !(g_tmCurrent > m_dwTime+SEC(2.5)) )
		return TRUE;

	if( m_pModel == NULL )
		return FALSE;
	
	// 여기부턴 인포팡 모델 처리
	m_pModel->FrameMove();
	
	if( m_pModel->IsEndFrame() )
	{
		if( m_bAniState == ANI_INTRO )
		{
			if( g_pPlayer )
				SetAni( g_pPlayer->GetJob(), ANI_IDLE );
		}
		else
		if( m_bAniState == ANI_BYTE )
		{
			m_bVisible     = FALSE;
			m_bAniState    = ANI_IDLE;
		}
	}

	// 여기부터 가이드 스크립트 처리
	if(m_CurrentGuide.m_nVicCondition)
	{
		// 대상 가이드가 있으면 가이드의 완료 조건을 체크한다
		if(CheckCompletion(m_CurrentGuide))
		{
			if(m_CurrentIter == m_mapGuide.end())
			{
				// 마지막가이드이면 종료처리한다
				m_wndGuideText->SetVisible(FALSE);
				g_Option.m_nTutorialLv = m_CurrentGuide.m_nLevel;
				g_DPlay.SendTutorialState(g_Option.m_nTutorialLv);
				if(g_Option.m_nTutorialLv > 0)
					m_pWndTutorialView->AddToList(g_Option.m_nTutorialLv - 1);
				m_CurrentGuide.init();
				m_CurrentIter = NULL;
			}
			else if(m_CurrentIter == NULL)
			{
				// 이벤트성(일회성) 이벤트일 경우는 다음이 없다
				m_wndGuideText->SetVisible(FALSE);
				if(m_CurrentGuide.m_nLevel > g_Option.m_nTutorialLv)
				{
					g_Option.m_nTutorialLv = m_CurrentGuide.m_nLevel;
					//if(g_Option.m_nTutorialLv > 0)
					//	m_pWndTutorialView->AddToList(g_Option.m_nTutorialLv - 1);
				}
				m_CurrentGuide.init();
			}
			else
			{
				// 마지막이 아니면 다음 가이드로
				++m_CurrentIter;
				if(m_CurrentIter != m_mapGuide.end()) 
				{
					m_CurrentGuide = m_CurrentIter->second;
					m_wndGuideText->AddGuideText(m_CurrentGuide);
					if(m_CurrentGuide.m_nLevel > g_Option.m_nTutorialLv + 1)
					{
						g_Option.m_nTutorialLv = m_CurrentGuide.m_nLevel - 1;
						g_DPlay.SendTutorialState(g_Option.m_nTutorialLv);
						if(g_Option.m_nTutorialLv > 0)
							m_pWndTutorialView->AddToList(g_Option.m_nTutorialLv - 1);
					}
				}
				else
				{
					
					m_wndGuideText->SetVisible(FALSE);
					g_Option.m_nTutorialLv = m_CurrentGuide.m_nLevel;
					g_DPlay.SendTutorialState(g_Option.m_nTutorialLv);
					if(g_Option.m_nTutorialLv > 0)
						m_pWndTutorialView->AddToList(g_Option.m_nTutorialLv - 1);
					m_CurrentIter = NULL;
					m_CurrentGuide.init();
				}
			}
		}
	}

	m_Condition.Init();

	return TRUE;

}
void CAnimatorPlayer::Update()
{
	CAnimator::Update();

	_ASSERT(m_eAniTrackerUpper != eAniTrackerInvalid);
	_ASSERT(m_eAniTrackerLower != eAniTrackerInvalid);

	// Set the upper/lower or fully body anis

	if ( m_eMain != eInvalid && m_eLastMain == eInvalid )
	{
		DisableAniTracker(m_eAniTrackerUpper);
		DisableAniTracker(m_eAniTrackerLower);

		if ( !IsAniTrackerLooping(m_eAniTrackerUpper) )
		{
            LoopAniTracker(m_eAniTrackerUpper, LTTRUE);
		}
		if ( !IsAniTrackerLooping(m_eAniTrackerLower) )
		{
            LoopAniTracker(m_eAniTrackerLower, LTTRUE);
		}

		SetAni(m_AniUpperBase.eAni, m_eAniTrackerUpper);
		SetAni(m_AniLowerBase.eAni, m_eAniTrackerLower);
	}

	if ( m_eMain == eInvalid && m_eLastMain != eInvalid )
	{
		EnableAniTracker(m_eAniTrackerUpper);
		EnableAniTracker(m_eAniTrackerLower);

		if ( !IsAniTrackerLooping(eAniTrackerMain) )
		{
            LoopAniTracker(eAniTrackerMain, LTTRUE);
		}

		SetAni(m_AniMainBase.eAni, eAniTrackerMain);
	}

	if ( m_eMain != eInvalid )
	{
		AniPlayerMain* pAniPlayerMain = m_apAniPlayerMains[m_eMain];

		if ( !pAniPlayerMain )
		{
            g_pLTServer->CPrint("missing ani %d", m_eMain);
			return;
		}

		if ( pAniPlayerMain->bLoops && !IsAniTrackerLooping(eAniTrackerMain) )
		{
            LoopAniTracker(eAniTrackerMain, LTTRUE);
		}
		else if ( !pAniPlayerMain->bLoops && IsAniTrackerLooping(eAniTrackerMain) )
		{
            LoopAniTracker(eAniTrackerMain, LTFALSE);
		}

		SetAni(pAniPlayerMain->eAni, eAniTrackerMain);
	}
	else
	{
		AniPlayerUpper* pAniPlayerUpper = m_aapAniPlayerUppers[m_eWeapon][m_ePosture];
		AniPlayerLower* pAniPlayerLower = m_aapAniPlayerLowers[m_eMovement][m_eDirection];

		if ( !pAniPlayerUpper || !pAniPlayerLower )
		{
            g_pLTServer->CPrint("missing ani %d/%d  %d/%d", m_eWeapon, m_ePosture, m_eMovement, m_eDirection);
			return;
		}

		Ani eAniUpper = pAniPlayerUpper->eAni;
		Ani eAniLower = pAniPlayerLower->eAni;

		if ( pAniPlayerLower->IsStrafe() )
		{
			if ( pAniPlayerLower->IsCrouch() )
			{
				if ( pAniPlayerUpper->eAniStrafeCrouch != eAniInvalid )
				{
					eAniUpper = pAniPlayerUpper->eAniStrafeCrouch;
				}
			}
			else
			{
				if ( pAniPlayerUpper->eAniStrafe != eAniInvalid )
				{
					eAniUpper = pAniPlayerUpper->eAniStrafe;
				}
			}
		}
		else if ( pAniPlayerLower->IsCrouch() )
		{
			if ( pAniPlayerUpper->eAniCrouch != eAniInvalid )
			{
				eAniUpper = pAniPlayerUpper->eAniCrouch;
			}
		}
		else if ( pAniPlayerLower->IsSwim() )
		{
			if ( pAniPlayerUpper->eAniSwim != eAniInvalid )
			{
				eAniUpper = pAniPlayerUpper->eAniSwim;
			}
		}

		if ( pAniPlayerUpper->bLoops && !IsAniTrackerLooping(m_eAniTrackerUpper) )
		{
            LoopAniTracker(m_eAniTrackerUpper, LTTRUE);
		}
		else if ( !pAniPlayerUpper->bLoops && IsAniTrackerLooping(m_eAniTrackerUpper) )
		{
            LoopAniTracker(m_eAniTrackerUpper, LTFALSE);
		}

		if ( pAniPlayerLower->bLoops && !IsAniTrackerLooping(m_eAniTrackerLower) )
		{
            LoopAniTracker(m_eAniTrackerLower, LTTRUE);
		}
		else if ( !pAniPlayerLower->bLoops && IsAniTrackerLooping(m_eAniTrackerLower) )
		{
            LoopAniTracker(m_eAniTrackerLower, LTFALSE);
		}

		SetAni(eAniUpper, m_eAniTrackerUpper);
		SetAni(eAniLower, m_eAniTrackerLower);
	}

	// Record the state etc

	m_eLastMain = m_eMain;
	m_eLastWeapon = m_eWeapon;
	m_eLastPosture = m_ePosture;
	m_eLastMovement	= m_eMovement;
	m_eLastDirection = m_eDirection;

	// Reset all vars

	m_eMain	= eInvalid;
	m_eWeapon = eRifle;
	m_ePosture = eUnalert;
	m_eMovement = eWalking;
	m_eDirection = eNone;
}