@@ -1828,11 +1828,9 @@ int Fred_mission_save::save_cutscenes()
18281828 required_string_fred (" #end" );
18291829 parse_comments ();
18301830 } else {
1831- MessageBox (nullptr ,
1832- " Warning: This mission contains cutscene data, but you are saving in the retail mission format. This "
1833- " information will be lost." ,
1834- " Incompatibility with retail mission format" ,
1835- MB_OK);
1831+ SCP_string msg = " Warning: This mission contains cutscene data, but you are saving in the retail mission "
1832+ " format. This information will be lost." ;
1833+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
18361834 }
18371835 }
18381836
@@ -2207,10 +2205,9 @@ int Fred_mission_save::save_fiction()
22072205 optional_string_fred (" $Formula:" );
22082206 }
22092207 } else {
2210- MessageBox (nullptr ,
2211- " Warning: This mission contains fiction viewer data, but you are saving in the retail mission format." ,
2212- " Incompatibility with retail mission format" ,
2213- MB_OK);
2208+ SCP_string msg = " Warning: This mission contains fiction viewer data, but you are saving in the retail "
2209+ " mission format. This information will be lost." ;
2210+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
22142211 }
22152212 }
22162213
@@ -2418,11 +2415,9 @@ int Fred_mission_save::save_mission_file(const char* pathname)
24182415 if (save_config.save_format != MissionFormat::STANDARD && !Displayed_retail_background_warning) {
24192416 for (const auto & bg : Backgrounds) {
24202417 if (bg.flags [Starfield::Background_Flags::Corrected_angles_in_mission_file]) {
2421- MessageBox (nullptr ,
2422- " Warning: Background flags (including the fixed-angles-in-mission-file flag) are not supported in "
2423- " retail. The sun and bitmap angles will be loaded differently by previous versions." ,
2424- " Incompatibility with retail mission format" ,
2425- MB_OK);
2418+ SCP_string msg = " Background flags (including the fixed-angles-in-mission-file flag) are not supported in retail. "
2419+ " The sun and bitmap angles will be loaded differently by previous versions." ;
2420+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
24262421 Displayed_retail_background_warning = true ;
24272422 break ;
24282423 }
@@ -3903,12 +3898,12 @@ int Fred_mission_save::save_objects()
39033898 fout (" \n +Special Exp index:" );
39043899 fout (" %d" , special_exp_index);
39053900 } else {
3906- SCP_string text = " You are saving in the retail mission format, but " ;
3907- text += " the mission has too many special explosions defined. \" " ;
3908- text += shipp->ship_name ;
3909- text += " \" has therefore lost any special explosion data that was defined for it. " ;
3910- text += " \" Either remove special explosions or SEXP variables if you need it to have one " ;
3911- Warning (LOCATION, text .c_str ());
3901+ SCP_string msg = " You are saving in the retail mission format, but the mission has too many "
3902+ " special explosions defined." ;
3903+ msg += shipp->ship_name ;
3904+ msg += " has therefore lost any special explosion data that was defined for it. Either remove "
3905+ " special explosions or SEXP variables if you need it to have one. " ;
3906+ Message (os::dialogs::MESSAGEBOX_ERROR, msg .c_str ());
39123907 }
39133908 }
39143909 }
@@ -3972,11 +3967,11 @@ int Fred_mission_save::save_objects()
39723967 if (save_config.save_format == MissionFormat::RETAIL && !dock_check_docked_one_on_one (&Objects[shipp->objnum ])) {
39733968 static bool warned = false ;
39743969 if (!warned) {
3975- SCP_string text = " You are saving in the retail mission format, but \" " ;
3976- text += shipp->ship_name ;
3977- text += " \" is docked to more than one ship. If you wish to run this mission in retail, " ;
3978- text += " you should remove the additional ships and save the mission again." ;
3979- Warning (LOCATION, text .c_str ());
3970+ SCP_string msg = " You are saving in the retail mission format, but \" " ;
3971+ msg += shipp->ship_name ;
3972+ msg += " \" is docked to more than one ship. If you wish to run this mission in retail, you should "
3973+ " remove the additional ships and save the mission again." ;
3974+ Message (os::dialogs::MESSAGEBOX_ERROR, msg .c_str ());
39803975
39813976 warned = true ; // to avoid zillions of boxes
39823977 }
@@ -4297,11 +4292,11 @@ int Fred_mission_save::save_players()
42974292 for (int numErrors = 0 ; numErrors < (int )dogfight_ships.size (); numErrors++) {
42984293 mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , dogfight_ships[numErrors].c_str ()));
42994294 }
4300- MessageBox ( nullptr ,
4301- " Warning: This mission is a dogfight mission but no dogfight weapons are available for at least one "
4302- " ship in the loadout! In Debug mode a list of ships will be printed to the log." ,
4303- " No dogfight weapons " ,
4304- MB_OK );
4295+ SCP_string msg =
4296+ " This mission is a dogfight mission but no dogfight weapons are available for at least one ship in the "
4297+ " loadout!\n\n A list of ships has been printed to the log. Please fix this problem before "
4298+ " distributing the mission. " ;
4299+ Message (os::dialogs::MESSAGEBOX_ERROR, msg. c_str () );
43054300 }
43064301
43074302 if (optional_string_fred (" +Weaponry Pool:" , " $Starting Shipname:" )) {
@@ -4358,11 +4353,9 @@ int Fred_mission_save::save_players()
43584353 // sanity check
43594354 if (save_config.save_format == MissionFormat::RETAIL && wrote_fso_data) {
43604355 // this is such an unlikely (and hard-to-fix) case that a warning should be sufficient
4361- MessageBox (nullptr ,
4362- " Warning: This mission contains variable-based team loadout information, but you are saving in the "
4363- " retail mission format. Retail FRED and FS2 will not be able to read this information." ,
4364- " Incompatibility with retail mission format" ,
4365- MB_OK);
4356+ SCP_string msg = " This mission contains variable-based team loadout information, but you are saving in the "
4357+ " retail mission format. Retail FRED and FS2 will not be able to read this information." ;
4358+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
43664359 }
43674360
43684361 // Goober5000 - mjn.mixael's required weapon feature
0 commit comments