FS2_Open
Open source remastering of the Freespace 2 engine
shipeditordlg.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 #ifndef _SHIPEDITORDLG_H
13 #define _SHIPEDITORDLG_H
14 
15 #include "Sexp_tree.h"
16 #include "ShipGoalsDlg.h"
17 #include "Management.h"
18 
20 // CShipEditorDlg dialog
21 
22 #define WM_GOODBYE (WM_USER+5)
23 #define ID_ALWAYS_ON_TOP 0x0f00
24 
26 {
27  int value;
28  int unique;
29  int control_id;
30  CWnd *dlg;
31 
32 public:
33  void setup(int id, CWnd *wnd);
34  void blank() { unique = 0; }
35  void init(int n);
36  void set(int n);
37  void display();
38  void save(int *n);
39  void fix(int n);
40 };
41 
42 class CShipEditorDlg : public CDialog
43 {
44 private:
45  int make_ship_list(int *arr);
46  int update_ship(int ship);
47  int initialized;
48  int multi_edit;
49  int always_on_top;
50  int cue_height;
51  int mission_type; // indicates if single player(1) or multiplayer(0)
52  CView* m_pSEView;
53  CCriticalSection CS_update;
54 
55 // Construction
56 public:
58  int editing;
59  int modified;
63 
64  int enable; // used to enable(1)/disable(0) controls based on if any ship selected
65  int p_enable; // used to enable(1)/disable(0) controls based on if a player ship
66 
67  int tristate_set(int val, int cur_state);
68  void show_hide_sexp_help();
69  void calc_cue_height();
70  int verify();
71  void OnInitMenu(CMenu *m);
72  void OnOK();
73  int update_data(int redraw = 1);
74  void initialize_data(int full);
75  CShipEditorDlg(CWnd* pParent = NULL); // standard constructor
76  CShipEditorDlg(CView* pView);
77 
78  // alternate ship name stuff
79  void ship_alt_name_init(int base_ship);
80  void ship_alt_name_close(int base_ship);
81 
82  // callsign stuff
83  void ship_callsign_init(int base_ship);
84  void ship_callsign_close(int base_ship);
85 
86  BOOL Create();
87 
88 // Dialog Data
89  //{{AFX_DATA(CShipEditorDlg)
90  enum { IDD = IDD_SHIP_EDITOR };
93  CButton m_player_ship;
94  CSpinButtonCtrl m_destroy_spin;
95  CSpinButtonCtrl m_departure_delay_spin;
96  CSpinButtonCtrl m_arrival_delay_spin;
99  CString m_ship_name;
100  CString m_cargo1;
102  int m_team;
108  int m_hotkey;
118  int m_persona;
119  //}}AFX_DATA
120 
121 // Overrides
122  // ClassWizard generated virtual function overrides
123  //{{AFX_VIRTUAL(CShipEditorDlg)
124  public:
125  virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
126  protected:
127  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
128  virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
129  //}}AFX_VIRTUAL
130 
131 // Implementation
132 protected:
133 
134  // Generated message map functions
135  //{{AFX_MSG(CShipEditorDlg)
136  afx_msg void OnClose();
137  afx_msg void OnRclickArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
138  afx_msg void OnRclickDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
139  afx_msg void OnBeginlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
140  afx_msg void OnBeginlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
141  afx_msg void OnEndlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
142  afx_msg void OnEndlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
143  afx_msg void OnGoals();
144  afx_msg void OnSelchangeShipClass();
145  afx_msg void OnInitialStatus();
146  afx_msg void OnWeapons();
147  afx_msg void OnShipReset();
148  afx_msg void OnDeleteShip();
149  afx_msg void OnShipTbl();
150  afx_msg void OnNext();
151  afx_msg void OnSelchangedArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
152  afx_msg void OnSelchangedDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
153  afx_msg void OnHideCues();
154  afx_msg void OnPrev();
155  afx_msg void OnSelchangeArrivalLocation();
156  afx_msg void OnPlayerShip();
157  afx_msg void OnNoArrivalWarp();
158  afx_msg void OnNoDepartureWarp();
159  afx_msg void OnSelchangeDepartureLocation();
160  afx_msg void OnSelchangeHotkey();
161  afx_msg void OnFlags();
162  afx_msg void OnIgnoreOrders();
163  afx_msg void OnSpecialExp();
164  afx_msg void OnTextures();
165  afx_msg void OnSpecialHitpoints();
166  afx_msg void OnAltShipClass();
167  afx_msg void OnSetAsPlayerShip();
168  afx_msg void OnRestrictArrival();
169  afx_msg void OnRestrictDeparture();
170  //}}AFX_MSG
171  DECLARE_MESSAGE_MAP()
172 };
173 
174 #endif
void ship_callsign_init(int base_ship)
afx_msg void OnNext()
sexp_tree m_arrival_tree
Definition: shipeditordlg.h:98
afx_msg void OnRestrictArrival()
CSpinButtonCtrl m_arrival_delay_spin
Definition: shipeditordlg.h:96
CString m_ship_name
Definition: shipeditordlg.h:99
GLsizei const GLfloat * value
Definition: Glext.h:5646
afx_msg void OnSelchangeArrivalLocation()
afx_msg void OnShipReset()
afx_msg void OnNoArrivalWarp()
numeric_edit_control m_score
afx_msg void OnClose()
afx_msg void OnWeapons()
afx_msg void OnIgnoreOrders()
int update_data(int redraw=1)
afx_msg void OnRclickArrivalTree(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnSpecialHitpoints()
afx_msg void OnGoals()
UINT WPARAM wParam
Definition: msacm.h:1064
numeric_edit_control m_kdamage
afx_msg void OnEndlabeleditDepartureTree(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnEndlabeleditArrivalTree(NMHDR *pNMHDR, LRESULT *pResult)
UINT WPARAM LPARAM lParam
Definition: msacm.h:1064
sexp_tree m_departure_tree
Definition: shipeditordlg.h:97
unsigned int UINT
Definition: config.h:82
afx_msg void OnTextures()
afx_msg void OnBeginlabeleditArrivalTree(NMHDR *pNMHDR, LRESULT *pResult)
long LPARAM
Definition: config.h:101
afx_msg void OnPlayerShip()
CButton m_no_departure_warp
Definition: shipeditordlg.h:91
void ship_callsign_close(int base_ship)
afx_msg void OnInitialStatus()
void ship_alt_name_close(int base_ship)
afx_msg void OnShipTbl()
afx_msg void OnBeginlabeleditDepartureTree(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnSelchangeHotkey()
afx_msg void OnAltShipClass()
afx_msg void OnSpecialExp()
afx_msg void OnNoDepartureWarp()
Definition: ship.h:534
unsigned long DWORD
Definition: config.h:90
numeric_edit_control m_destroy_value
GLclampd n
Definition: Glext.h:7286
virtual void DoDataExchange(CDataExchange *pDX)
GLuint GLfloat * val
Definition: Glext.h:6741
numeric_edit_control m_arrival_delay
CShipEditorDlg(CWnd *pParent=NULL)
int BOOL
Definition: config.h:80
numeric_edit_control m_assist_score
CSpinButtonCtrl m_departure_delay_spin
Definition: shipeditordlg.h:95
void show_hide_sexp_help()
afx_msg void OnHideCues()
CSpinButtonCtrl m_destroy_spin
Definition: shipeditordlg.h:94
afx_msg void OnFlags()
long LRESULT
Definition: config.h:100
numeric_edit_control m_arrival_dist
numeric_edit_control m_departure_delay
CButton m_no_arrival_warp
Definition: shipeditordlg.h:92
afx_msg void OnSelchangedDepartureTree(NMHDR *pNMHDR, LRESULT *pResult)
const GLfloat * m
Definition: Glext.h:10319
afx_msg void OnSelchangedArrivalTree(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnDeleteShip()
int tristate_set(int val, int cur_state)
afx_msg void OnSetAsPlayerShip()
afx_msg void OnSelchangeShipClass()
CButton m_player_ship
Definition: shipeditordlg.h:93
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam)
void ship_alt_name_init(int base_ship)
afx_msg void OnRestrictDeparture()
afx_msg void OnPrev()
void OnInitMenu(CMenu *m)
void setup(int id, CWnd *wnd)
void initialize_data(int full)
#define IDD_SHIP_EDITOR
Definition: resource.h:34
afx_msg void OnSelchangeDepartureLocation()
afx_msg void OnRclickDepartureTree(NMHDR *pNMHDR, LRESULT *pResult)