FS2_Open
Open source remastering of the Freespace 2 engine
playerstarteditor.h
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 "ShipCheckListBox.h"
13 
15 // player_start_editor dialog
16 
17 class player_start_editor : public CDialog
18 {
19 // Construction
20 public:
21  player_start_editor(CWnd* pParent = NULL); // standard constructor
22 
23 // Dialog Data
24  //{{AFX_DATA(player_start_editor)
25  enum { IDD = IDD_LOADOUT_EDITOR };
26  CSpinButtonCtrl m_pool_spin;
27  CSpinButtonCtrl m_delay_spin;
28  CSpinButtonCtrl m_spin1;
29  CCheckListBox m_ship_list;
30  CCheckListBox m_weapon_list;
31  CCheckListBox m_ship_variable_list;
32  CCheckListBox m_weapon_variable_list;
33  int m_delay;
40  //}}AFX_DATA
41 
42 
43 // Overrides
44  // ClassWizard generated virtual function overrides
45  //{{AFX_VIRTUAL(player_start_editor)
46  protected:
47  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
48  virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
49  //}}AFX_VIRTUAL
50 
51 // Implementation
52 protected:
53 
54  // Generated message map functions
55  //{{AFX_MSG(player_start_editor)
56  virtual BOOL OnInitDialog();
57  afx_msg void OnInitMenu(CMenu* pMenu);
58  afx_msg void OnSelchangeShipList();
59  afx_msg void OnSelchangeWeaponList();
60  afx_msg void OnUpdateShipPool();
61  afx_msg void OnUpdateWeaponPool();
62  void OnCancel();
63  void OnOK();
64  afx_msg void OnSelchangeShipVariablesList();
65  afx_msg void OnSelchangeWeaponVariablesList();
66  afx_msg void OnSelchangeShipVariablesCombo();
67  afx_msg void OnSelchangeWeaponVariablesCombo();
68  //}}AFX_MSG
69  DECLARE_MESSAGE_MAP()
70 
71 private:
72  // if we've finished initializing the dialog
73  int dlg_inited;
74 
75  // team we're currently working with
76  int selected_team;
77  int previous_team; // The last team we worked with
78 
79  bool autobalance;
80 
81  // ship pool info
82  int static_ship_pool[MAX_TVT_TEAMS][MAX_SHIP_CLASSES]; // Holds the number of ships of a class that was set by the team loadout
83  int dynamic_ship_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES];
84  int static_ship_variable_pool[MAX_TVT_TEAMS][MAX_SHIP_CLASSES];
85  int dynamic_ship_variable_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES];
86 
87  // weapon pool info
88  int static_weapon_pool[MAX_TVT_TEAMS][MAX_WEAPON_TYPES];
89  int dynamic_weapon_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES];
90  int static_weapon_variable_pool[MAX_TVT_TEAMS][MAX_WEAPON_TYPES];
91  int dynamic_weapon_variable_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES];
92 
93  // ship and weapon usage pools
94  int ship_usage[MAX_TVT_TEAMS][MAX_SHIP_CLASSES];
95  int weapon_usage[MAX_TVT_TEAMS][MAX_WEAPON_TYPES];
96 
97  // regenerate all controls
98  void reset_controls();
99  int GetSelectedShipListIndex();
100  int GetSelectedShipVariableListIndex();
101  int GetSelectedWeaponListIndex();
102  int GetSelectedWeaponVariableListIndex();
103 
104  void UpdateQuantityVariable(CComboBox *variable_list, int pool_value);
105 
106 };
CCheckListBox m_ship_list
afx_msg void OnInitMenu(CMenu *pMenu)
CSpinButtonCtrl m_pool_spin
afx_msg void OnSelchangeWeaponList()
UINT WPARAM wParam
Definition: msacm.h:1064
UINT WPARAM LPARAM lParam
Definition: msacm.h:1064
afx_msg void OnSelchangeShipList()
#define IDD_LOADOUT_EDITOR
Definition: resource.h:54
player_start_editor(CWnd *pParent=NULL)
long LPARAM
Definition: config.h:101
#define MAX_SHIP_CLASSES
Definition: globals.h:48
#define MAX_WEAPON_TYPES
Definition: globals.h:73
afx_msg void OnUpdateWeaponPool()
CComboBox m_ship_quantity_variable
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam)
CCheckListBox m_ship_variable_list
CCheckListBox m_weapon_list
afx_msg void OnSelchangeShipVariablesCombo()
afx_msg void OnSelchangeWeaponVariablesList()
virtual void DoDataExchange(CDataExchange *pDX)
int BOOL
Definition: config.h:80
afx_msg void OnSelchangeShipVariablesList()
CSpinButtonCtrl m_delay_spin
virtual BOOL OnInitDialog()
CCheckListBox m_weapon_variable_list
#define MAX_TVT_TEAMS
Definition: globals.h:57
afx_msg void OnSelchangeWeaponVariablesCombo()
CComboBox m_weapon_quantity_variable
afx_msg void OnUpdateShipPool()
CSpinButtonCtrl m_spin1
#define MAX_SEXP_VARIABLES
Definition: sexp.h:23