Subversion Repositories spk

Rev

Rev 1 | Rev 94 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 39
Line 72... Line 72...
72
				this->ComboCockpitStd->Items->Add(SystemStringFromCyString(str->data));
72
				this->ComboCockpitStd->Items->Add(SystemStringFromCyString(str->data));
73
		}
73
		}
74
 
74
 
75
		this->ComboCockpitCustom->Items->Clear();
75
		this->ComboCockpitCustom->Items->Clear();
76
		for ( SCockpit *c = m_pShipFile->GetCockpits()->First(); c; c = m_pShipFile->GetCockpits()->Next() )
76
		for ( SCockpit *c = m_pShipFile->GetCockpits()->First(); c; c = m_pShipFile->GetCockpits()->Next() )
77
			this->ComboCockpitCustom->Items->Add(SystemStringFromCyString(c->sCockpit.GetToken(";", 19, 19)));
77
			this->ComboCockpitCustom->Items->Add(_US(c->sCockpit.token(";", 19)));
78
	}
78
	}
79
 
79
 
80
	void CustomiseTurret::UpdateTurrets()
80
	void CustomiseTurret::UpdateTurrets()
81
	{
81
	{
82
		this->ListTurret->Items->Clear();
82
		this->ListTurret->Items->Clear();
Line 127... Line 127...
127
		}
127
		}
128
	}
128
	}
129
 
129
 
130
	void CustomiseTurret::UpdateCockpitDisplay2()
130
	void CustomiseTurret::UpdateCockpitDisplay2()
131
	{
131
	{
132
		m_pCurrentCockpit = m_pShipFile->FindCockpit(CyStringFromSystemString(ComboCockpitCustom->Text));
132
		m_pCurrentCockpit = m_pShipFile->FindCockpit(_S(ComboCockpitCustom->Text));
133
		if ( m_pCurrentCockpit )
133
		if ( m_pCurrentCockpit )
134
		{
134
		{
135
			this->TextCockpitScene->Text = SystemStringFromCyString(m_pCurrentCockpit->sCockpit.GetToken(";", 8, 8));
135
			this->TextCockpitScene->Text = SystemStringFromCyString(m_pCurrentCockpit->sCockpit.token(";", 8));
136
			this->UpdateCockpitWeaponsList();
136
			this->UpdateCockpitWeaponsList();
137
		}
137
		}
138
	}
138
	}
139
 
139
 
140
	void CustomiseTurret::UpdateCockpitWeaponsList()
140
	void CustomiseTurret::UpdateCockpitWeaponsList()
Line 166... Line 166...
166
			}
166
			}
167
			this->CheckWeaponDefaultCockpit->Checked = (mask == -1) ? true : false;
167
			this->CheckWeaponDefaultCockpit->Checked = (mask == -1) ? true : false;
168
		}
168
		}
169
		else
169
		else
170
		{
170
		{
171
			mask = m_pCurrentCockpit->sCockpit.GetToken(";", 9, 9).ToInt();
171
			mask = m_pCurrentCockpit->sCockpit.token(";", 9);
172
			this->CheckWeaponDefaultCockpit->Visible = false;
172
			this->CheckWeaponDefaultCockpit->Visible = false;
173
			this->CheckWeaponDefaultCockpit->Checked = false;
173
			this->CheckWeaponDefaultCockpit->Checked = false;
174
		}
174
		}
175
		if ( mask == -1 ) mask = 0;
175
		if ( mask == -1 ) mask = 0;
176
		if ( list )
176
		if ( list )
Line 268... Line 268...
268
			mask += (1 << Convert::ToInt32(item->Tag));
268
			mask += (1 << Convert::ToInt32(item->Tag));
269
		}
269
		}
270
 
270
 
271
		// edit the default lasers
271
		// edit the default lasers
272
		if ( !this->ComboGameCockpit->SelectedIndex )
272
		if ( !this->ComboGameCockpit->SelectedIndex )
273
			m_pCurrentCockpit->sCockpit = m_pCurrentCockpit->sCockpit.RepToken(";", 9, CyString::Number(mask));
273
			m_pCurrentCockpit->sCockpit = m_pCurrentCockpit->sCockpit.replaceToken(";", 9, (long)mask);
274
		// otherwise adjust for the game
274
		// otherwise adjust for the game
275
		else
275
		else
276
		{
276
		{
277
			bool found = false;
277
			bool found = false;
278
			for ( SWeaponMask *m = m_pCurrentCockpit->lWeaponMask.First(); m; m = m_pCurrentCockpit->lWeaponMask.Next() )
278
			for ( SWeaponMask *m = m_pCurrentCockpit->lWeaponMask.First(); m; m = m_pCurrentCockpit->lWeaponMask.Next() )