2 * $Logfile: /Freespace2/code/FRED2/MissionSave.h $
7 * Mission saving in Fred.
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 4 1/19/99 3:57p Andsager
15 * Round 2 of variables
17 * 3 10/29/98 6:49p Dave
18 * Finished up Fred support for externalizing mission and campaign files.
20 * 2 10/07/98 6:28p Dave
21 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
22 * Fred. Globalized mission and campaign file extensions. Removed Silent
23 * Threat specific code.
25 * 1 10/07/98 3:00p Dave
27 * 21 9/10/98 1:17p Dave
28 * Put in code to flag missions and campaigns as being MD or not in Fred
29 * and Freespace. Put in multiplayer support for filtering out MD
30 * missions. Put in multiplayer popups for warning of non-valid missions.
32 * 20 4/14/98 11:55a Allender
33 * add end-of-campaign sexpression to allow for mission replay at the end
36 * 19 3/05/98 3:59p Hoffoss
37 * Added a bunch of new command brief stuff, and asteroid initialization
40 * 18 9/30/97 5:56p Hoffoss
41 * Added music selection combo boxes to Fred.
43 * 17 8/25/97 5:56p Hoffoss
44 * Added multiple asteroid field support, loading and saving of asteroid
45 * fields, and ship score field to Fred.
47 * 16 8/17/97 10:22p Hoffoss
48 * Fixed several bugs in Fred with Undo feature. In the process, recoded
51 * 15 6/17/97 3:01p Lawrance
52 * allow FRED to save new briefing format
54 * 14 6/09/97 4:57p Hoffoss
55 * Added autosave and undo to Fred.
57 * 13 6/05/97 6:10p Hoffoss
58 * Added features: Autosaving, object hiding. Also fixed some minor bugs.
60 * 12 5/13/97 10:52a Hoffoss
61 * Added campaign saving code.
63 * 11 4/21/97 5:02p Hoffoss
64 * Player/player status editing supported, and both saved and loaded from
67 * 10 4/16/97 2:05p Hoffoss
68 * Mission saving and loading of turret info now implemented.
70 * 9 3/10/97 6:43p Hoffoss
71 * Standardized docking goal usage by fred to use names instead of
74 * 8 2/05/97 2:57p Hoffoss
75 * Added support for wing goals (initial orders) in Fred.
77 * 7 1/30/97 2:24p Hoffoss
78 * Added remaining mission file structures and implemented load/save of
84 #ifndef __MISSION_SAVE_CPP__
85 #define __MISSION_SAVE_CPP__
88 #include "missionparse.h"
93 #define BACKUP_DEPTH 9
95 class CFred_mission_save {
101 int save_mission_info();
102 int save_plot_info();
103 int save_variables();
104 // int save_briefing_info();
105 int save_cmd_brief();
106 int save_cmd_briefs();
108 int save_debriefing();
111 int save_common_object_data(object *objp, ship *shipp);
114 int save_waypoints();
115 int save_waypoint_list(waypoint_list &w);
116 int save_vector(vector &v);
117 int save_matrix(matrix &m);
120 int save_asteroid_fields();
122 void save_campaign_sexp(int node, int link);
125 void save_turret_info(ship_subsys *ptr, int ship);
127 int save_reinforcements();
128 void save_ai_goals(ai_goals *goalp, int ship);
129 int fout(char *format, ...);
130 int fout_ext(char *format, ...);
131 void parse_comments(int = 1);
132 CFred_mission_save() : err(0), raw_ptr(Mission_text_raw) { }
133 int save_mission_file(char *pathname);
134 int autosave_mission_file(char *pathname);
135 int save_campaign_file(char *pathname);