FS2_Open
Open source remastering of the Freespace 2 engine
weaponeditordlg.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #include "stdafx.h"
13 #include "FRED.h"
14 #include "WeaponEditorDlg.h"
15 #include "globalincs/linklist.h"
16 #include "Management.h"
17 #include "weapon/weapon.h"
18 #include "ship/ship.h"
19 
20 #define BLANK_FIELD -99
21 
22 #ifdef _DEBUG
23 #undef THIS_FILE
24 static char THIS_FILE[] = __FILE__;
25 #endif
26 
28 // WeaponEditorDlg dialog
29 
30 WeaponEditorDlg::WeaponEditorDlg(CWnd* pParent /*=NULL*/)
31  : CDialog(WeaponEditorDlg::IDD, pParent)
32 {
33  //{{AFX_DATA_INIT(WeaponEditorDlg)
34  m_ai_class = -1;
35  m_ammo1 = 0;
36  m_ammo2 = 0;
37  m_ammo3 = 0;
38  m_ammo4 = 0;
39  m_gun1 = -1;
40  m_gun2 = -1;
41  m_gun3 = -1;
42  m_missile1 = -1;
43  m_missile2 = -1;
44  m_missile3 = -1;
45  m_missile4 = -1;
46  m_cur_item = -1;
47  //}}AFX_DATA_INIT
48  m_last_item = -1;
49  m_multi_edit = 0;
50 }
51 
52 int save_number(char *str, int *val)
53 {
54  char buf[40];
55  int num;
56 
57  num = atoi(str);
58  sprintf(buf, "%d", num);
59  if (strncmp(str, buf, strlen(buf)))
60  return 0;
61 
62  *val = num;
63  return 1;
64 }
65 
66 void WeaponEditorDlg::DoDataExchange(CDataExchange* pDX)
67 {
68  CString str;
69 
70  CDialog::DoDataExchange(pDX);
71  //{{AFX_DATA_MAP(WeaponEditorDlg)
72  DDX_Control(pDX, IDC_SPIN4, m_spin4);
73  DDX_Control(pDX, IDC_SPIN3, m_spin3);
74  DDX_Control(pDX, IDC_SPIN2, m_spin2);
75  DDX_Control(pDX, IDC_SPIN1, m_spin1);
76  DDX_CBIndex(pDX, IDC_AI_CLASS, m_ai_class);
77  DDX_CBIndex(pDX, IDC_GUN1, m_gun1);
78  DDX_CBIndex(pDX, IDC_GUN2, m_gun2);
79  DDX_CBIndex(pDX, IDC_GUN3, m_gun3);
80  DDX_CBIndex(pDX, IDC_MISSILE1, m_missile1);
81  DDX_CBIndex(pDX, IDC_MISSILE2, m_missile2);
82  DDX_CBIndex(pDX, IDC_MISSILE3, m_missile3);
83  DDX_CBIndex(pDX, IDC_MISSILE4, m_missile4);
84  DDX_LBIndex(pDX, IDC_LIST, m_cur_item);
85  //}}AFX_DATA_MAP
86 
87  if (pDX->m_bSaveAndValidate) {
88  GetDlgItem(IDC_AMMO1)->GetWindowText(str);
89  if (save_number((char *) (LPCSTR) str, &m_ammo1)) {
90  if (m_missile1 <= 0) {
91  m_ammo_max1 = 0;
92  } else {
94  }
95  if (m_ammo1 < 0)
96  m_ammo1 = 0;
97  if (m_ammo1 > m_ammo_max1)
99  }
100 
101  GetDlgItem(IDC_AMMO2)->GetWindowText(str);
102  if (save_number((char *) (LPCSTR) str, &m_ammo2)) {
103  if (m_missile2 <= 0) {
104  m_ammo_max2 = 0;
105  } else {
107  }
108  if (m_ammo2 < 0)
109  m_ammo2 = 0;
110  if (m_ammo2 > m_ammo_max2)
112  }
113 
114  GetDlgItem(IDC_AMMO3)->GetWindowText(str);
115  if (save_number((char *) (LPCSTR) str, &m_ammo3)) {
116  if (m_missile3 <= 0) {
117  m_ammo_max3 = 0;
118  } else {
120  }
121  if (m_ammo3 < 0)
122  m_ammo3 = 0;
123  if (m_ammo3 > m_ammo_max3)
125  }
126 
127  GetDlgItem(IDC_AMMO4)->GetWindowText(str);
128  if (save_number((char *) (LPCSTR) str, &m_ammo4)) {
129  if (m_missile4 <= 0) {
130  m_ammo_max4 = 0;
131  } else {
133  }
134  if (m_ammo4 < 0)
135  m_ammo4 = 0;
136  if (m_ammo4 > m_ammo_max4)
138  }
139 
140  m_spin1.SetRange(0, (short) m_ammo_max1);
141  m_spin2.SetRange(0, (short) m_ammo_max2);
142  m_spin3.SetRange(0, (short) m_ammo_max3);
143  m_spin4.SetRange(0, (short) m_ammo_max4);
144 
145  } else {
146  if (m_ammo1 != BLANK_FIELD)
147  DDX_Text(pDX, IDC_AMMO1, m_ammo1);
148  else
149  GetDlgItem(IDC_AMMO1)->SetWindowText("");
150 
151  if (m_ammo2 != BLANK_FIELD)
152  DDX_Text(pDX, IDC_AMMO2, m_ammo2);
153  else
154  GetDlgItem(IDC_AMMO2)->SetWindowText("");
155 
156  if (m_ammo3 != BLANK_FIELD)
157  DDX_Text(pDX, IDC_AMMO3, m_ammo3);
158  else
159  GetDlgItem(IDC_AMMO3)->SetWindowText("");
160 
161  if (m_ammo4 != BLANK_FIELD)
162  DDX_Text(pDX, IDC_AMMO4, m_ammo4);
163  else
164  GetDlgItem(IDC_AMMO4)->SetWindowText("");
165  }
166 }
167 
168 BEGIN_MESSAGE_MAP(WeaponEditorDlg, CDialog)
169  //{{AFX_MSG_MAP(WeaponEditorDlg)
170  ON_LBN_SELCHANGE(IDC_LIST, OnSelchangeList)
171  ON_WM_CLOSE()
172  ON_CBN_SELCHANGE(IDC_MISSILE1, OnSelchangeMissile1)
173  ON_CBN_SELCHANGE(IDC_MISSILE2, OnSelchangeMissile2)
174  ON_CBN_SELCHANGE(IDC_MISSILE3, OnSelchangeMissile3)
175  ON_CBN_SELCHANGE(IDC_MISSILE4, OnSelchangeMissile4)
176  //}}AFX_MSG_MAP
177 END_MESSAGE_MAP()
178 
180 // WeaponEditorDlg message handlers
181 
182 BOOL WeaponEditorDlg::OnInitDialog()
183 {
184  int i, z, big = 1, end1, end2, inst, flag = 0;
185  object *ptr;
186  model_subsystem *psub;
187  ship_subsys *ssl, *pss;
188  CComboBox *box;
189  CListBox *list;
190 
191  CDialog::OnInitDialog();
192  m_ship = cur_ship;
193  if (m_ship == -1)
195 
196  end1 = First_secondary_index;
197  end2 = Num_weapon_types;
198 
199  list = (CListBox *) GetDlgItem(IDC_LIST);
200 
201  z = list->AddString("Pilot");
202  if (m_multi_edit) {
203  list->SetItemDataPtr(z, &pilot);
204  ptr = GET_FIRST(&obj_used_list);
205  while (ptr != END_OF_LIST(&obj_used_list)) {
206  if (((ptr->type == OBJ_SHIP) || (ptr->type == OBJ_START)) && (ptr->flags & OF_MARKED)) {
207  inst = ptr->instance;
208  if (!(ship_get_SIF(inst) & (SIF_BIG_SHIP | SIF_HUGE_SHIP)))
209  big = 0;
210 
211  if (!flag) {
212  pilot = Ships[inst].weapons;
213  m_ship_class = Ships[inst].ship_info_index;
214  flag = 1;
215 
216  } else {
217  Assert(Ships[inst].ship_info_index == m_ship_class);
218  if (pilot.ai_class != Ships[inst].weapons.ai_class)
219  pilot.ai_class = BLANK_FIELD;
220 
221  for (i=0; i<MAX_SHIP_PRIMARY_BANKS; i++)
222  if (pilot.primary_bank_weapons[i] != Ships[inst].weapons.primary_bank_weapons[i])
223  pilot.primary_bank_weapons[i] = BLANK_FIELD;
224 
225  for (i=0; i<MAX_SHIP_SECONDARY_BANKS; i++) {
226  if (pilot.secondary_bank_weapons[i] != Ships[inst].weapons.secondary_bank_weapons[i])
227  pilot.secondary_bank_weapons[i] = BLANK_FIELD;
228  if (pilot.secondary_bank_ammo[i] != Ships[inst].weapons.secondary_bank_ammo[i])
229  pilot.secondary_bank_ammo[i] = BLANK_FIELD;
230  }
231  }
232  }
233 
234  ptr = GET_NEXT(ptr);
235  }
236 
237  } else {
238  if (!(ship_get_SIF(m_ship) & (SIF_BIG_SHIP | SIF_HUGE_SHIP)))
239  big = 0;
240 
241  m_ship_class = Ships[m_ship].ship_info_index;
242  list->SetItemDataPtr(z, &Ships[m_ship].weapons);
243  ssl = &Ships[m_ship].subsys_list;
244  for (pss = GET_FIRST(ssl); pss != END_OF_LIST(ssl); pss = GET_NEXT(pss)) {
245  psub = pss->system_info;
246  if (psub->type == SUBSYSTEM_TURRET) {
247  z = list->AddString(psub->subobj_name);
248  list->SetItemDataPtr(z, &pss->weapons);
249  }
250  }
251  }
252 
253  box = (CComboBox *) GetDlgItem(IDC_AI_CLASS);
254  for (i=0; i<Num_ai_classes; i++){
255  box->AddString(Ai_class_names[i]);
256  }
257 
258  for (i=0; i<end1; i++){
259  if ((Weapon_info[i].wi_flags & WIF_CHILD) || (!big && (Weapon_info[i].wi_flags & WIF_BIG_ONLY))){
260  end1 = i;
261  }
262  }
263 
264  box = (CComboBox *) GetDlgItem(IDC_GUN1);
265  box->AddString("None");
266  for (i=0; i<end1; i++){
267  box->AddString(Weapon_info[i].name);
268  }
269 
270  box = (CComboBox *) GetDlgItem(IDC_GUN2);
271  box->AddString("None");
272  for (i=0; i<end1; i++){
273  box->AddString(Weapon_info[i].name);
274  }
275 
276  box = (CComboBox *) GetDlgItem(IDC_GUN3);
277  box->AddString("None");
278  for (i=0; i<end1; i++){
279  box->AddString(Weapon_info[i].name);
280  }
281 
282  for (i=First_secondary_index; i<end2; i++){
283  if ((Weapon_info[i].wi_flags & WIF_CHILD) || (!big && (Weapon_info[i].wi_flags & WIF_BIG_ONLY))){
284  end2 = i;
285  }
286  }
287 
288  box = (CComboBox *) GetDlgItem(IDC_MISSILE1);
289  box->AddString("None");
290  for (i=First_secondary_index; i<end2; i++){
291  box->AddString(Weapon_info[i].name);
292  }
293 
294  box = (CComboBox *) GetDlgItem(IDC_MISSILE2);
295  box->AddString("None");
296  for (i=First_secondary_index; i<end2; i++){
297  box->AddString(Weapon_info[i].name);
298  }
299 
300  box = (CComboBox *) GetDlgItem(IDC_MISSILE3);
301  box->AddString("None");
302  for (i=First_secondary_index; i<end2; i++){
303  box->AddString(Weapon_info[i].name);
304  }
305 
306  box = (CComboBox *) GetDlgItem(IDC_MISSILE4);
307  box->AddString("None");
308  for (i=First_secondary_index; i<end2; i++){
309  box->AddString(Weapon_info[i].name);
310  }
311 
312  m_cur_item = 0;
313  UpdateData(FALSE);
314  change_selection();
315  UpdateData(TRUE);
316  return TRUE;
317 }
318 
320 {
321  UpdateData(TRUE);
322  UpdateData(TRUE);
324 }
325 
327 {
328  CString a1, a2, a3, a4;
329 
330  GetDlgItem(IDC_AMMO1)->GetWindowText(a1);
331  GetDlgItem(IDC_AMMO2)->GetWindowText(a2);
332  GetDlgItem(IDC_AMMO3)->GetWindowText(a3);
333  GetDlgItem(IDC_AMMO4)->GetWindowText(a4);
334 
335  if (m_last_item >= 0) {
340  if (m_missile1 > 0)
342 
344  if (m_missile2 > 0)
346 
348  if (m_missile3 > 0)
350 
352  if (m_missile4 > 0)
354 
360  if (m_multi_edit) {
361  if (!strlen(a1))
363  if (!strlen(a2))
365  if (!strlen(a3))
367  if (!strlen(a4))
369  }
370  }
371 
375  if (m_cur_item < 0) {
377  GetDlgItem(IDC_GUN1)->EnableWindow(FALSE);
378  GetDlgItem(IDC_GUN2)->EnableWindow(FALSE);
379  GetDlgItem(IDC_GUN3)->EnableWindow(FALSE);
380  GetDlgItem(IDC_MISSILE1)->EnableWindow(FALSE);
381  GetDlgItem(IDC_MISSILE2)->EnableWindow(FALSE);
382  GetDlgItem(IDC_MISSILE3)->EnableWindow(FALSE);
383  GetDlgItem(IDC_MISSILE4)->EnableWindow(FALSE);
384  GetDlgItem(IDC_AMMO1)->EnableWindow(FALSE);
385  GetDlgItem(IDC_AMMO2)->EnableWindow(FALSE);
386  GetDlgItem(IDC_AMMO3)->EnableWindow(FALSE);
387  GetDlgItem(IDC_AMMO4)->EnableWindow(FALSE);
388  GetDlgItem(IDC_SPIN1)->EnableWindow(FALSE);
389  GetDlgItem(IDC_SPIN2)->EnableWindow(FALSE);
390  GetDlgItem(IDC_SPIN3)->EnableWindow(FALSE);
391  GetDlgItem(IDC_SPIN4)->EnableWindow(FALSE);
392  GetDlgItem(IDC_AI_CLASS)->EnableWindow(FALSE);
393  UpdateData(FALSE);
394  return;
395  }
396 
397  cur_weapon = (ship_weapon *) ((CListBox *) GetDlgItem(IDC_LIST))->GetItemDataPtr(m_cur_item);
398  GetDlgItem(IDC_AI_CLASS)->EnableWindow(TRUE);
400 
401  if (cur_weapon->num_primary_banks > 0) {
403  GetDlgItem(IDC_GUN1)->EnableWindow(TRUE);
404  } else
405  GetDlgItem(IDC_GUN1)->EnableWindow(FALSE);
406 
407  if (cur_weapon->num_primary_banks > 1) {
409  GetDlgItem(IDC_GUN2)->EnableWindow(TRUE);
410  } else
411  GetDlgItem(IDC_GUN2)->EnableWindow(FALSE);
412 
413  if (cur_weapon->num_primary_banks > 2) {
415  GetDlgItem(IDC_GUN3)->EnableWindow(TRUE);
416  } else
417  GetDlgItem(IDC_GUN3)->EnableWindow(FALSE);
418 
419  if (cur_weapon->num_secondary_banks > 0) {
421  if (m_missile1 > 0) {
422  if (m_cur_item == 0) {
424  } else {
426  }
430  }
431 
432  GetDlgItem(IDC_MISSILE1)->EnableWindow(TRUE);
433  GetDlgItem(IDC_AMMO1)->EnableWindow(TRUE);
434  GetDlgItem(IDC_SPIN1)->EnableWindow(TRUE);
435 
436  } else {
437  GetDlgItem(IDC_MISSILE1)->EnableWindow(FALSE);
438  GetDlgItem(IDC_AMMO1)->EnableWindow(FALSE);
439  GetDlgItem(IDC_SPIN1)->EnableWindow(FALSE);
440  }
441 
442  if (cur_weapon->num_secondary_banks > 1) {
444  if (m_missile2 > 0) {
445  if (m_cur_item == 0) {
447  } else {
449  }
453  }
454 
455  GetDlgItem(IDC_MISSILE2)->EnableWindow(TRUE);
456  GetDlgItem(IDC_AMMO2)->EnableWindow(TRUE);
457  GetDlgItem(IDC_SPIN2)->EnableWindow(TRUE);
458 
459  } else {
460  GetDlgItem(IDC_MISSILE2)->EnableWindow(FALSE);
461  GetDlgItem(IDC_AMMO2)->EnableWindow(FALSE);
462  GetDlgItem(IDC_SPIN2)->EnableWindow(FALSE);
463  }
464 
465  if (cur_weapon->num_secondary_banks > 2) {
467  if (m_missile3 > 0) {
468  if (m_cur_item == 0) {
470  } else {
472  }
476  }
477 
478  GetDlgItem(IDC_MISSILE3)->EnableWindow(TRUE);
479  GetDlgItem(IDC_AMMO3)->EnableWindow(TRUE);
480  GetDlgItem(IDC_SPIN3)->EnableWindow(TRUE);
481 
482  } else {
483  GetDlgItem(IDC_MISSILE3)->EnableWindow(FALSE);
484  GetDlgItem(IDC_AMMO3)->EnableWindow(FALSE);
485  GetDlgItem(IDC_SPIN3)->EnableWindow(FALSE);
486  }
487 
488  if (cur_weapon->num_secondary_banks > 3) {
490  if (m_missile4 > 0) {
491  if (m_cur_item == 0) {
493  } else {
495  }
499  }
500 
501  GetDlgItem(IDC_MISSILE4)->EnableWindow(TRUE);
502  GetDlgItem(IDC_AMMO4)->EnableWindow(TRUE);
503  GetDlgItem(IDC_SPIN4)->EnableWindow(TRUE);
504 
505  } else {
506  GetDlgItem(IDC_MISSILE4)->EnableWindow(FALSE);
507  GetDlgItem(IDC_AMMO4)->EnableWindow(FALSE);
508  GetDlgItem(IDC_SPIN4)->EnableWindow(FALSE);
509  }
510 
512  UpdateData(FALSE);
513  if (m_multi_edit) {
514  if (m_ammo1 == BLANK_FIELD)
515  GetDlgItem(IDC_AMMO1)->SetWindowText("");
516  if (m_ammo2 == BLANK_FIELD)
517  GetDlgItem(IDC_AMMO2)->SetWindowText("");
518  if (m_ammo3 == BLANK_FIELD)
519  GetDlgItem(IDC_AMMO3)->SetWindowText("");
520  if (m_ammo4 == BLANK_FIELD)
521  GetDlgItem(IDC_AMMO4)->SetWindowText("");
522  }
523 }
524 
526 {
527  UpdateData(TRUE);
528  UpdateData(TRUE);
530  update_pilot();
531  CDialog::OnOK();
532 }
533 
535 {
536  UpdateData(TRUE);
537  UpdateData(TRUE);
539  update_pilot();
540  CDialog::OnCancel();
541 }
542 
544 {
545  UpdateData(TRUE);
546  UpdateData(TRUE);
548  update_pilot();
549  CDialog::OnClose();
550 }
551 
553 {
554  int i;
555  object *ptr;
557 
558  if (m_multi_edit) {
559  ptr = GET_FIRST(&obj_used_list);
560  while (ptr != END_OF_LIST(&obj_used_list)) {
561  if (((ptr->type == OBJ_SHIP) || (ptr->type == OBJ_START)) && (ptr->flags & OF_MARKED)) {
562  weapon = &Ships[ptr->instance].weapons;
563 
564  if (pilot.ai_class >= 0)
565  weapon->ai_class = pilot.ai_class;
566 
567  for (i=0; i<MAX_SHIP_PRIMARY_BANKS; i++)
568  if (pilot.primary_bank_weapons[i] != -2)
570 
571  for (i=0; i<MAX_SHIP_SECONDARY_BANKS; i++) {
572  if (pilot.secondary_bank_weapons[i] != -2)
574  if (pilot.secondary_bank_ammo[i] >= 0)
576  }
577  }
578 
579  ptr = GET_NEXT(ptr);
580  }
581  }
582 }
583 
585 {
586  UpdateData(TRUE);
587  UpdateData(TRUE);
588  if (m_cur_item == 0) {
590  } else {
592  }
593  m_ammo1 = m_ammo_max1 ? (m_ammo_max1) : 0;
595 }
596 
598 {
599  UpdateData(TRUE);
600  UpdateData(TRUE);
601  if (m_cur_item == 0) {
603  } else {
605  }
606  m_ammo2 = m_ammo_max2 ? (m_ammo_max2) : 0;
608 }
609 
611 {
612  UpdateData(TRUE);
613  UpdateData(TRUE);
614  if (m_cur_item == 0) {
616  } else {
618  }
619  m_ammo3 = m_ammo_max3 ? (m_ammo_max3) : 0;
621 }
622 
624 {
625  UpdateData(TRUE);
626  UpdateData(TRUE);
627  if (m_cur_item == 0) {
629  } else {
631  }
632  m_ammo4 = m_ammo_max4 ? (m_ammo_max4) : 0;
634 }
#define IDC_MISSILE1
Definition: resource.h:655
int i
Definition: multi_pxo.cpp:466
model_subsystem * system_info
Definition: ship.h:314
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
Definition: ship.h:103
#define MAX_SHIP_PRIMARY_BANKS
Definition: globals.h:62
int ai_class
Definition: ship.h:148
#define IDC_GUN2
Definition: resource.h:586
int num_primary_banks
Definition: ship.h:99
weapon_info Weapon_info[MAX_WEAPON_TYPES]
Definition: weapons.cpp:79
ship_weapon weapons
Definition: ship.h:658
#define IDC_AMMO3
Definition: resource.h:785
#define IDC_GUN1
Definition: resource.h:582
int First_secondary_index
Definition: weapons.cpp:116
char ** Ai_class_names
Definition: aicode.cpp:268
#define WIF_BIG_ONLY
Definition: weapon.h:61
afx_msg void OnSelchangeMissile3()
afx_msg void OnClose()
Assert(pm!=NULL)
afx_msg void OnSelchangeMissile2()
ship_weapon weapons
Definition: ship.h:362
#define TRUE
Definition: pstypes.h:399
afx_msg void OnSelchangeMissile4()
object obj_used_list
Definition: object.cpp:53
struct weapon weapon
CSpinButtonCtrl m_spin1
afx_msg void OnSelchangeMissile1()
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: Glext.h:7308
#define IDC_LIST
Definition: resource.h:725
#define IDC_GUN3
Definition: resource.h:641
ship_subsys subsys_list
Definition: ship.h:630
#define WIF_CHILD
Definition: weapon.h:62
#define MAX_SHIP_SECONDARY_BANKS
Definition: globals.h:63
int instance
Definition: object.h:150
afx_msg void OnSelchangeList()
#define IDC_SPIN1
Definition: resource.h:404
#define OBJ_START
Definition: object.h:35
#define SIF_BIG_SHIP
Definition: ship.h:944
#define IDC_AMMO2
Definition: resource.h:770
int get_max_ammo_count_for_bank(int ship_class, int bank, int ammo_type)
Definition: ship.cpp:16279
int num_secondary_banks
Definition: ship.h:100
int ship_get_SIF(ship *shipp)
Definition: ship.cpp:16096
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
GLdouble GLdouble z
Definition: Glext.h:5451
#define IDC_AMMO1
Definition: resource.h:764
#define SUBSYSTEM_TURRET
Definition: model.h:54
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:104
int Num_ai_classes
Definition: aicode.cpp:195
WeaponEditorDlg(CWnd *pParent=NULL)
CSpinButtonCtrl m_spin2
#define IDC_SPIN3
Definition: resource.h:297
#define IDC_AI_CLASS
Definition: resource.h:551
int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]
Definition: ship.h:134
int save_number(char *str, int *val)
object Objects[MAX_OBJECTS]
Definition: object.cpp:62
#define OF_MARKED
Definition: object.h:125
CSpinButtonCtrl m_spin3
#define OBJ_SHIP
Definition: object.h:32
int Num_weapon_types
Definition: weapons.cpp:105
#define SIF_HUGE_SHIP
Definition: ship.h:945
#define IDC_SPIN2
Definition: resource.h:270
#define IDC_MISSILE4
Definition: resource.h:666
GLuint const GLchar * name
Definition: Glext.h:5608
GLuint GLfloat * val
Definition: Glext.h:6741
int BOOL
Definition: config.h:80
ship Ships[MAX_SHIPS]
Definition: ship.cpp:122
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
ship_weapon * cur_weapon
GLuint GLuint num
Definition: Glext.h:9089
#define BLANK_FIELD
#define IDC_MISSILE2
Definition: resource.h:660
virtual void DoDataExchange(CDataExchange *pDX)
int cur_ship
Definition: management.cpp:80
char subobj_name[MAX_NAME_LEN]
Definition: model.h:172
ship_weapon pilot
int ship_info_index
Definition: ship.h:539
int cur_object_index
Definition: management.cpp:79
uint flags
Definition: object.h:151
char type
Definition: object.h:146
#define FALSE
Definition: pstypes.h:400
#define IDC_SPIN4
Definition: resource.h:317
int get_max_ammo_count_for_turret_bank(ship_weapon *swp, int bank, int ammo_type)
Definition: ship.cpp:16299
CSpinButtonCtrl m_spin4
#define IDC_AMMO4
Definition: resource.h:799
#define IDC_MISSILE3
Definition: resource.h:663