示例#1
0
void CUITalkWnd::SwitchToTrade()
{
	if(m_pOurInvOwner->IsTradeEnabled() && m_pOthersInvOwner->IsTradeEnabled() ){

		UITalkDialogWnd->Hide		();

		UITradeWnd->InitTrade		(m_pOurInvOwner, m_pOthersInvOwner);
		UITradeWnd->Show				();
		UITradeWnd->StartTrade		();
		UITradeWnd->BringAllToTop	();
		StopSnd						();
	}
}
示例#2
0
void CUITalkWnd::Hide()
{
	StopSnd						();
	UITalkDialogWnd->Hide		();

	inherited::Hide				();
	if(!m_pActor)				return;
	
	ToTopicMode					();

	if (m_pActor->IsTalking()) m_pActor->StopTalk();
	m_pActor = NULL;
}
示例#3
0
void CUITalkWnd::PlaySnd(LPCSTR text)
{
	if(xr_strlen(text) == 0) return;
	StopSnd						();
	
	string_path	fn;
	strconcat(sizeof(fn),fn, "characters_voice\\dialogs\\", text, ".ogg");
	if(FS.exist("$game_sounds$",fn)){
		VERIFY(m_pActor);
		if (!m_pActor->OnDialogSoundHandlerStart(m_pOthersInvOwner,fn)) {
			m_sound.create(fn,st_Effect,sg_SourceType);
			m_sound.play(0,sm_2D);
		}
	}
}
示例#4
0
void OnDestroy(AG_Event *event)
{
   // 20120610 GUI関連処理
   bEventRunFlag = FALSE; 
#ifdef _WITH_DEBUGGER
   Detach_DebugMenu();
#endif
   /*
    * サウンド停止
    */
   StopSnd();
   SaveCfg();
   AG_ConfigSave();
   /*
    * コンポーネント クリーンアップ
    */
#ifdef FDDSND
   CleanFDDSnd();
#endif				/*  */
   CleanSch();
   CleanKbd();
   CleanSnd();
   CleanDraw();
   DestroyStatus();

   /*
    * 仮想マシン クリーンアップ
    */
   system_cleanup();
   if(pCpuID != NULL) {
      detachCpuID(pCpuID);
      pCpuID = NULL;
   }


   AG_MutexDestroy(&VMMutex);
//   AG_Destroy();
#if 0 
   muntrace();
#endif
   DiscardTextures(1, &uVramTextureID);
   DiscardTextures(1, &uNullTextureID);
   uVramTextureID = 0;
   XM7_DebugLog(XM7_LOG_INFO, "All resources allocated by VM were freed.");
//   AG_Destroy();
}
示例#5
0
void CUITalkWnd::PlaySnd(LPCSTR text)
{
	u32 text_len = xr_strlen(text);
	if ( text_len == 0 )
	{
		return;
	}
	
	string_path	fn;
	
	LPCSTR path = "characters_voice\\dialogs\\";
	LPCSTR ext  = ".ogg";
	u32 tsize   = sizeof(fn) - xr_strlen(path) - xr_strlen(ext) - 1;
	if ( text_len > tsize )
	{
		text_len = tsize;
	}

	strncpy_s( fn, sizeof(fn), path, xr_strlen(path) );
	strncat_s( fn, sizeof(fn), text, text_len );
	strncat_s( fn, sizeof(fn), ext,  xr_strlen(ext) );

	//	strconcat( sizeof(fn), fn, "characters_voice\\dialogs\\", text2, ".ogg" );

	StopSnd();
	if ( FS.exist( "$game_sounds$", fn ) )
	{
		VERIFY( m_pActor );
		if ( !m_pActor->OnDialogSoundHandlerStart(m_pOthersInvOwner, fn) )
		{
			CGameObject* pOtherGO = smart_cast<CGameObject*>(m_pOthersInvOwner);
			Fvector P = pOtherGO->Position();
			P.y			+= 1.8f;
			m_sound.create( fn, st_Effect, sg_SourceType );
			m_sound.play_at_pos( 0, P );
		}
	}
}