Пример #1
0
void SinglePlayerTab::OnModSelect( wxCommandEvent& /*unused*/ )
{
    unsigned int index = (unsigned int)m_mod_pick->GetCurrentSelection();
    size_t num_bots = m_battle.GetNumBots();
    SetMod( index );
    if( num_bots != m_battle.GetNumBots() )
        customMessageBoxNoModal( SL_MAIN_ICON, _("Incompatible bots have been removed after game selection changed."), _("Bots removed") );
}
Пример #2
0
__INLINE__ __integer __INTERNAL_FUNC__ SetModrmSib(PASM_OBJ pAsmObj, PASMER_OPERAND pRO, PASMER_OPERAND pModRmSib) {
	SetMod(pAsmObj, pModRmSib);//设置MOD
	SetRO(pAsmObj, pRO->Base);//设置RO
	SetRM(pAsmObj, pModRmSib->Base);//设置RM
	// 确定是否有SIB位
	if (IsGotoSIB(pAsmObj)) {
		SetSS(pAsmObj, pModRmSib->Scale);//设置SS
		SetIndex(pAsmObj, pModRmSib->Index);//设置Index
		SetBase(pAsmObj, pModRmSib->Base);//设置Base
		return 2;
	}
	return 1;
}
Пример #3
0
void SinglePlayerTab::ReloadModlist()
{
	m_mod_pick->Clear();
	m_mod_pick->Append( LSL::Util::vectorToArrayString(LSL::usync().GetModList()));
	m_mod_pick->Insert( _("-- Select one --"), m_mod_pick->GetCount() );
	if (m_battle.GetHostModName().empty() ) {
		m_mod_pick->SetSelection( m_mod_pick->GetCount()-1 );
	} else {
		m_mod_pick->SetStringSelection( TowxString(m_battle.GetHostModName()));
		if ( m_mod_pick->GetStringSelection().empty() ) {
			SetMod( m_mod_pick->GetCount()-1 );
		}
	}
}