FS2_Open
Open source remastering of the Freespace 2 engine
eventeditor.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 _EVENTEDITOR_H
13 #define _EVENTEDITOR_H
14 
15 #include "Sexp_tree.h"
16 #include "mission/missiongoals.h"
17 #include "mission/missionmessage.h"
18 
19 #define MAX_SEARCH_MESSAGE_DEPTH 5 // maximum search number of event nodes with message text
20 
21 class event_sexp_tree : public sexp_tree
22 {
23 };
24 
26 // event_editor dialog
27 
28 class event_editor : public CDialog
29 {
30 // Construction
31 public:
32  void update_persona();
33  void save();
34  char *current_message_name(int index);
35  char *get_message_list_item(int i);
36  int save_message(int num);
37  void update_cur_message();
38  HTREEITEM get_event_handle(int num);
39  void reset_event(int num, HTREEITEM after);
40  void save_event(int e);
41  void swap_handler(int node1, int node2);
42  void insert_handler(int old, int node);
43  int query_modified();
44  void OnOK();
45  void OnCancel();
46  int handler(int code, int node, char *str = NULL);
47  void create_tree();
48  void load_tree();
49  int modified;
51  event_editor(CWnd* pParent = NULL); // standard constructor
52 
53 // Dialog Data
54  //{{AFX_DATA(event_editor)
55  enum { IDD = IDD_EVENT_EDITOR };
63  CString m_obj_text;
64  CString m_obj_key_text;
65  CString m_avi_filename;
66  CString m_message_name;
67  CString m_message_text;
68  int m_persona;
69  CString m_wave_filename;
70  int m_cur_msg;
71  int m_team;
82  //}}AFX_DATA
83 
84  CBitmap m_play_bm;
85 
86 // Overrides
87  // ClassWizard generated virtual function overrides
88  //{{AFX_VIRTUAL(event_editor)
89  public:
90  virtual BOOL DestroyWindow();
91  protected:
92  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
93  //}}AFX_VIRTUAL
94 
95 // Implementation
96 protected:
97 
98  // Generated message map functions
99  //{{AFX_MSG(event_editor)
100  virtual BOOL OnInitDialog();
101  afx_msg void OnRclickEventTree(NMHDR* pNMHDR, LRESULT* pResult);
102  afx_msg void OnBeginlabeleditEventTree(NMHDR* pNMHDR, LRESULT* pResult);
103  afx_msg void OnEndlabeleditEventTree(NMHDR* pNMHDR, LRESULT* pResult);
104  afx_msg void OnButtonNewEvent();
105  afx_msg void OnDelete();
106  afx_msg void OnOk();
107  afx_msg void OnClose();
108  afx_msg void OnSelchangedEventTree(NMHDR* pNMHDR, LRESULT* pResult);
109  afx_msg void OnUpdateRepeatCount();
110  afx_msg void OnUpdateTriggerCount();
111  afx_msg void OnChained();
112  afx_msg void OnInsert();
113  afx_msg void OnSelchangeMessageList();
114  afx_msg void OnNewMsg();
115  afx_msg void OnDeleteMsg();
116  afx_msg void OnBrowseAvi();
117  afx_msg void OnBrowseWave();
118  afx_msg void OnSelchangeWaveFilename();
119  afx_msg void OnPlay();
120  afx_msg void OnUpdate();
121  afx_msg void On_Cancel();
122  afx_msg void OnSelchangeTeam();
123  afx_msg void OnSelchangeMessageTeam();
124  afx_msg void OnDblclkMessageList();
125  //}}AFX_MSG
126  DECLARE_MESSAGE_MAP()
127 
128 private:
129  int cur_event;
130  void update_cur_event();
131  int m_num_events;
132  int m_sig[MAX_MISSION_EVENTS];
133  mission_event m_events[MAX_MISSION_EVENTS];
134  int m_num_messages;
135  SCP_vector<MMessage> m_messages;
136  int m_wave_id;
137 };
138 
139 extern event_editor *Event_editor_dlg; // global reference needed by event tree class
140 
141 #endif
int i
Definition: multi_pxo.cpp:466
int save_message(int num)
afx_msg void OnBrowseAvi()
CString m_message_name
Definition: eventeditor.h:66
afx_msg void OnDblclkMessageList()
afx_msg void OnDeleteMsg()
GLuint index
Definition: Glext.h:5608
afx_msg void OnUpdateRepeatCount()
void update_persona()
void create_tree()
void swap_handler(int node1, int node2)
int m_chain_delay
Definition: eventeditor.h:61
afx_msg void OnBrowseWave()
CString m_avi_filename
Definition: eventeditor.h:65
afx_msg void OnPlay()
int m_log_last_repeat
Definition: eventeditor.h:78
unsigned int UINT
Definition: config.h:82
event_editor * Event_editor_dlg
Definition: eventeditor.cpp:30
HWND DWORD code
Definition: vddraw.h:425
afx_msg void OnSelchangeTeam()
void load_tree()
#define IDD_EVENT_EDITOR
Definition: resource.h:57
afx_msg void On_Cancel()
HTREEITEM get_event_handle(int num)
UINT m_trigger_count
Definition: eventeditor.h:58
afx_msg void OnUpdateTriggerCount()
int m_log_1st_trigger
Definition: eventeditor.h:79
afx_msg void OnDelete()
char * current_message_name(int index)
afx_msg void OnSelchangeWaveFilename()
afx_msg void OnNewMsg()
afx_msg void OnSelchangeMessageList()
void update_cur_message()
virtual void DoDataExchange(CDataExchange *pDX)
Definition: eventeditor.cpp:73
void save_event(int e)
virtual BOOL OnInitDialog()
afx_msg void OnSelchangeMessageTeam()
void reset_event(int num, HTREEITEM after)
afx_msg void OnBeginlabeleditEventTree(NMHDR *pNMHDR, LRESULT *pResult)
void insert_handler(int old, int node)
afx_msg void OnUpdate()
CBitmap m_play_bm
Definition: eventeditor.h:84
afx_msg void OnButtonNewEvent()
int m_event_score
Definition: eventeditor.h:60
int BOOL
Definition: config.h:80
virtual BOOL DestroyWindow()
int m_log_1st_repeat
Definition: eventeditor.h:77
GLuint GLuint num
Definition: Glext.h:9089
CString m_message_text
Definition: eventeditor.h:67
int m_message_team
Definition: eventeditor.h:72
afx_msg void OnChained()
int m_log_state_change
Definition: eventeditor.h:81
afx_msg void OnClose()
int m_log_last_trigger
Definition: eventeditor.h:80
long LRESULT
Definition: config.h:100
CString m_obj_key_text
Definition: eventeditor.h:64
BOOL m_chained
Definition: eventeditor.h:62
afx_msg void OnOk()
#define MAX_MISSION_EVENTS
Definition: missiongoals.h:71
char * get_message_list_item(int i)
afx_msg void OnInsert()
UINT m_interval
Definition: eventeditor.h:59
int handler(int code, int node, char *str=NULL)
afx_msg void OnEndlabeleditEventTree(NMHDR *pNMHDR, LRESULT *pResult)
CString m_obj_text
Definition: eventeditor.h:63
int select_sexp_node
Definition: eventeditor.h:50
CString m_wave_filename
Definition: eventeditor.h:69
afx_msg void OnRclickEventTree(NMHDR *pNMHDR, LRESULT *pResult)
event_editor(CWnd *pParent=NULL)
Definition: eventeditor.cpp:35
int query_modified()
UINT m_repeat_count
Definition: eventeditor.h:57
afx_msg void OnSelchangedEventTree(NMHDR *pNMHDR, LRESULT *pResult)
event_sexp_tree m_event_tree
Definition: eventeditor.h:56
int m_log_always_false
Definition: eventeditor.h:76
int m_last_message_node
Definition: eventeditor.h:73