@@ -1824,11 +1824,9 @@ int Fred_mission_save::save_cutscenes()
18241824 required_string_fred (" #end" );
18251825 parse_comments ();
18261826 } else {
1827- MessageBox (nullptr ,
1828- " Warning: This mission contains cutscene data, but you are saving in the retail mission format. This "
1829- " information will be lost." ,
1830- " Incompatibility with retail mission format" ,
1831- MB_OK);
1827+ SCP_string msg = " Warning: This mission contains cutscene data, but you are saving in the retail mission "
1828+ " format. This information will be lost." ;
1829+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
18321830 }
18331831 }
18341832
@@ -2203,10 +2201,9 @@ int Fred_mission_save::save_fiction()
22032201 optional_string_fred (" $Formula:" );
22042202 }
22052203 } else {
2206- MessageBox (nullptr ,
2207- " Warning: This mission contains fiction viewer data, but you are saving in the retail mission format." ,
2208- " Incompatibility with retail mission format" ,
2209- MB_OK);
2204+ SCP_string msg = " Warning: This mission contains fiction viewer data, but you are saving in the retail "
2205+ " mission format. This information will be lost." ;
2206+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
22102207 }
22112208 }
22122209
@@ -2414,11 +2411,9 @@ int Fred_mission_save::save_mission_file(const char* pathname)
24142411 if (save_config.save_format != MissionFormat::STANDARD && !Displayed_retail_background_warning) {
24152412 for (const auto & bg : Backgrounds) {
24162413 if (bg.flags [Starfield::Background_Flags::Corrected_angles_in_mission_file]) {
2417- MessageBox (nullptr ,
2418- " Warning: Background flags (including the fixed-angles-in-mission-file flag) are not supported in "
2419- " retail. The sun and bitmap angles will be loaded differently by previous versions." ,
2420- " Incompatibility with retail mission format" ,
2421- MB_OK);
2414+ SCP_string msg = " Background flags (including the fixed-angles-in-mission-file flag) are not supported in retail. "
2415+ " The sun and bitmap angles will be loaded differently by previous versions." ;
2416+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
24222417 Displayed_retail_background_warning = true ;
24232418 break ;
24242419 }
@@ -3899,12 +3894,12 @@ int Fred_mission_save::save_objects()
38993894 fout (" \n +Special Exp index:" );
39003895 fout (" %d" , special_exp_index);
39013896 } else {
3902- SCP_string text = " You are saving in the retail mission format, but " ;
3903- text += " the mission has too many special explosions defined. \" " ;
3904- text += shipp->ship_name ;
3905- text += " \" has therefore lost any special explosion data that was defined for it. " ;
3906- text += " \" Either remove special explosions or SEXP variables if you need it to have one " ;
3907- Warning (LOCATION, text .c_str ());
3897+ SCP_string msg = " You are saving in the retail mission format, but the mission has too many "
3898+ " special explosions defined." ;
3899+ msg += shipp->ship_name ;
3900+ msg += " has therefore lost any special explosion data that was defined for it. Either remove "
3901+ " special explosions or SEXP variables if you need it to have one. " ;
3902+ Message (os::dialogs::MESSAGEBOX_ERROR, msg .c_str ());
39083903 }
39093904 }
39103905 }
@@ -3968,11 +3963,11 @@ int Fred_mission_save::save_objects()
39683963 if (save_config.save_format == MissionFormat::RETAIL && !dock_check_docked_one_on_one (&Objects[shipp->objnum ])) {
39693964 static bool warned = false ;
39703965 if (!warned) {
3971- SCP_string text = " You are saving in the retail mission format, but \" " ;
3972- text += shipp->ship_name ;
3973- text += " \" is docked to more than one ship. If you wish to run this mission in retail, " ;
3974- text += " you should remove the additional ships and save the mission again." ;
3975- Warning (LOCATION, text .c_str ());
3966+ SCP_string msg = " You are saving in the retail mission format, but \" " ;
3967+ msg += shipp->ship_name ;
3968+ msg += " \" is docked to more than one ship. If you wish to run this mission in retail, you should "
3969+ " remove the additional ships and save the mission again." ;
3970+ Message (os::dialogs::MESSAGEBOX_ERROR, msg .c_str ());
39763971
39773972 warned = true ; // to avoid zillions of boxes
39783973 }
@@ -4293,11 +4288,11 @@ int Fred_mission_save::save_players()
42934288 for (int numErrors = 0 ; numErrors < (int )dogfight_ships.size (); numErrors++) {
42944289 mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , dogfight_ships[numErrors].c_str ()));
42954290 }
4296- MessageBox ( nullptr ,
4297- " Warning: This mission is a dogfight mission but no dogfight weapons are available for at least one "
4298- " ship in the loadout! In Debug mode a list of ships will be printed to the log." ,
4299- " No dogfight weapons " ,
4300- MB_OK );
4291+ SCP_string msg =
4292+ " This mission is a dogfight mission but no dogfight weapons are available for at least one ship in the "
4293+ " loadout!\n\n A list of ships has been printed to the log. Please fix this problem before "
4294+ " distributing the mission. " ;
4295+ Message (os::dialogs::MESSAGEBOX_ERROR, msg. c_str () );
43014296 }
43024297
43034298 if (optional_string_fred (" +Weaponry Pool:" , " $Starting Shipname:" )) {
@@ -4354,11 +4349,9 @@ int Fred_mission_save::save_players()
43544349 // sanity check
43554350 if (save_config.save_format == MissionFormat::RETAIL && wrote_fso_data) {
43564351 // this is such an unlikely (and hard-to-fix) case that a warning should be sufficient
4357- MessageBox (nullptr ,
4358- " Warning: This mission contains variable-based team loadout information, but you are saving in the "
4359- " retail mission format. Retail FRED and FS2 will not be able to read this information." ,
4360- " Incompatibility with retail mission format" ,
4361- MB_OK);
4352+ SCP_string msg = " This mission contains variable-based team loadout information, but you are saving in the "
4353+ " retail mission format. Retail FRED and FS2 will not be able to read this information." ;
4354+ Message (os::dialogs::MESSAGEBOX_ERROR, msg.c_str ());
43624355 }
43634356
43644357 // Goober5000 - mjn.mixael's required weapon feature
0 commit comments