14 #include "WeaponEditorDlg.h"
16 #include "Management.h"
20 #define BLANK_FIELD -99
24 static char THIS_FILE[] = __FILE__;
59 if (strncmp(str, buf, strlen(buf)))
70 CDialog::DoDataExchange(pDX);
87 if (pDX->m_bSaveAndValidate) {
88 GetDlgItem(
IDC_AMMO1)->GetWindowText(str);
101 GetDlgItem(
IDC_AMMO2)->GetWindowText(str);
114 GetDlgItem(
IDC_AMMO3)->GetWindowText(str);
127 GetDlgItem(
IDC_AMMO4)->GetWindowText(str);
149 GetDlgItem(
IDC_AMMO1)->SetWindowText(
"");
154 GetDlgItem(
IDC_AMMO2)->SetWindowText(
"");
159 GetDlgItem(
IDC_AMMO3)->SetWindowText(
"");
164 GetDlgItem(
IDC_AMMO4)->SetWindowText(
"");
170 ON_LBN_SELCHANGE(
IDC_LIST, OnSelchangeList)
184 int i,
z, big = 1, end1, end2, inst, flag = 0;
191 CDialog::OnInitDialog();
199 list = (CListBox *) GetDlgItem(IDC_LIST);
201 z = list->AddString(
"Pilot");
203 list->SetItemDataPtr(z, &pilot);
217 Assert(
Ships[inst].ship_info_index == m_ship_class);
242 list->SetItemDataPtr(z, &
Ships[m_ship].weapons);
248 list->SetItemDataPtr(z, &pss->
weapons);
258 for (i=0; i<end1; i++){
264 box = (CComboBox *) GetDlgItem(
IDC_GUN1);
265 box->AddString(
"None");
266 for (i=0; i<end1; i++){
270 box = (CComboBox *) GetDlgItem(
IDC_GUN2);
271 box->AddString(
"None");
272 for (i=0; i<end1; i++){
276 box = (CComboBox *) GetDlgItem(
IDC_GUN3);
277 box->AddString(
"None");
278 for (i=0; i<end1; i++){
288 box = (CComboBox *) GetDlgItem(IDC_MISSILE1);
289 box->AddString(
"None");
294 box = (CComboBox *) GetDlgItem(IDC_MISSILE2);
295 box->AddString(
"None");
300 box = (CComboBox *) GetDlgItem(IDC_MISSILE3);
301 box->AddString(
"None");
306 box = (CComboBox *) GetDlgItem(IDC_MISSILE4);
307 box->AddString(
"None");
328 CString a1, a2, a3, a4;
330 GetDlgItem(
IDC_AMMO1)->GetWindowText(a1);
331 GetDlgItem(
IDC_AMMO2)->GetWindowText(a2);
332 GetDlgItem(
IDC_AMMO3)->GetWindowText(a3);
333 GetDlgItem(
IDC_AMMO4)->GetWindowText(a4);
515 GetDlgItem(
IDC_AMMO1)->SetWindowText(
"");
517 GetDlgItem(
IDC_AMMO2)->SetWindowText(
"");
519 GetDlgItem(
IDC_AMMO3)->SetWindowText(
"");
521 GetDlgItem(
IDC_AMMO4)->SetWindowText(
"");
model_subsystem * system_info
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
#define MAX_SHIP_PRIMARY_BANKS
weapon_info Weapon_info[MAX_WEAPON_TYPES]
int First_secondary_index
afx_msg void OnSelchangeMissile3()
afx_msg void OnSelchangeMissile2()
afx_msg void OnSelchangeMissile4()
#define END_OF_LIST(head)
afx_msg void OnSelchangeMissile1()
GLenum GLuint GLenum GLsizei const GLchar * buf
#define MAX_SHIP_SECONDARY_BANKS
afx_msg void OnSelchangeList()
int get_max_ammo_count_for_bank(int ship_class, int bank, int ammo_type)
int ship_get_SIF(ship *shipp)
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
WeaponEditorDlg(CWnd *pParent=NULL)
int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]
int save_number(char *str, int *val)
object Objects[MAX_OBJECTS]
GLuint const GLchar * name
virtual void DoDataExchange(CDataExchange *pDX)
char subobj_name[MAX_NAME_LEN]
int get_max_ammo_count_for_turret_bank(ship_weapon *swp, int bank, int ammo_type)