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 __BRIEFINGEDITORDLG_H__ 13 #define __BRIEFINGEDITORDLG_H__ 14 15 #include "sexp_tree.h" 16 17 #include "parse/sexp.h" 18 #include "mission/missionbriefcommon.h" 19 20 ///////////////////////////////////////////////////////////////////////////// 21 // briefing_editor_dlg dialog 22 23 class briefing_editor_dlg : public CDialog 24 { 25 // Construction 26 public: 27 void focus_sexp(int select_sexp_node); 28 int calc_num_lines_for_icons(int num); 29 void batch_render(); 30 void save_editor_state(); 31 void restore_editor_state(); 32 void reset_icon_loop(int stage); 33 int get_next_icon(int id); 34 void OnOK(); 35 void OnCancel(); 36 int find_icon(int id, int stage); 37 void propagate_icon(int num); 38 void reset_editor(); 39 int check_mouse_hit(int x, int y); 40 void delete_icon(int num); 41 void update_positions(); 42 void icon_select(int num); 43 void draw_icon(object *objp); 44 void create(); 45 void update_data(int update = 1); 46 briefing_editor_dlg(CWnd* pParent = NULL); // standard constructor 47 48 // Dialog Data 49 //{{AFX_DATA(briefing_editor_dlg) 50 enum { IDD = IDD_BRIEFING_EDITOR }; 51 sexp_tree m_tree; 52 CButton m_lines; 53 BOOL m_hilight; 54 int m_icon_image; 55 CString m_icon_label; 56 CString m_stage_title; 57 CString m_text; 58 CString m_time; 59 CString m_voice; 60 CString m_icon_text; 61 int m_icon_team; 62 int m_ship_type; 63 BOOL m_change_local; 64 int m_id; 65 int m_briefing_music; 66 CString m_substitute_briefing_music; 67 BOOL m_cut_next; 68 BOOL m_cut_prev; 69 int m_current_briefing; 70 BOOL m_flipicon; 71 BOOL m_use_wing; 72 BOOL m_use_cargo; 73 //}}AFX_DATA 74 75 CBitmap m_play_bm; 76 77 // copy view variables 78 int m_copy_view_set; 79 vec3d m_copy_view_pos; 80 matrix m_copy_view_orient; 81 82 // Overrides 83 // ClassWizard generated virtual function overrides 84 //{{AFX_VIRTUAL(briefing_editor_dlg) 85 public: 86 virtual BOOL DestroyWindow(); 87 protected: 88 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 89 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 90 //}}AFX_VIRTUAL 91 92 // Implementation 93 protected: 94 brief_icon *iconp; 95 briefing *save_briefing; 96 int icon_loop, stage_loop; 97 int m_cur_stage; 98 int m_last_stage; 99 int m_cur_icon; 100 int m_last_icon; 101 int m_voice_id; 102 int stage_saved; 103 int icon_saved; 104 int modified; 105 // int point_obj; 106 int icon_obj[MAX_STAGE_ICONS]; 107 int icon_marked[MAX_STAGE_ICONS]; 108 int line_marked[MAX_BRIEF_STAGE_LINES]; 109 110 void copy_stage(int from, int to); 111 112 // Generated message map functions 113 //{{AFX_MSG(briefing_editor_dlg) 114 afx_msg void OnClose(); 115 afx_msg void OnNext(); 116 afx_msg void OnPrev(); 117 afx_msg void OnBrowse(); 118 afx_msg void OnAddStage(); 119 afx_msg void OnDeleteStage(); 120 afx_msg void OnInsertStage(); 121 afx_msg void OnMakeIcon(); 122 afx_msg void OnDeleteIcon(); 123 afx_msg void OnGotoView(); 124 afx_msg void OnSaveView(); 125 afx_msg void OnSelchangeIconImage(); 126 afx_msg void OnSelchangeTeam(); 127 afx_msg void OnSelchangeShipType(); 128 afx_msg void OnPropagateIcons(); 129 afx_msg void OnInitMenu(CMenu* pMenu); 130 afx_msg void OnLines(); 131 afx_msg void OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult); 132 afx_msg void OnBeginlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult); 133 afx_msg void OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult); 134 afx_msg void OnPlay(); 135 afx_msg void OnCopyView(); 136 afx_msg void OnPasteView(); 137 afx_msg void OnFlipIcon(); 138 afx_msg void OnWingIcon(); 139 afx_msg void OnCargoIcon(); 140 //}}AFX_MSG 141 DECLARE_MESSAGE_MAP() 142 private: 143 }; 144 145 #endif 146