Skip to content

Commit 5bd9f70

Browse files
authored
Merge pull request #6618 from Goober5000/fred_fixes
a few minor fixes
2 parents 32befb8 + 25aa3d7 commit 5bd9f70

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

code/nebula/neb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const float UPKEEP_DIST_MULT = 1.2f;
6868
const float PROBABLY_TOO_MANY_POOFS = 100000.0f;
6969

7070
// bit array of neb2 poofs
71-
std::unique_ptr<ubyte> Neb2_poof_flags;
71+
std::unique_ptr<ubyte[]> Neb2_poof_flags;
7272

7373
// array of neb2 bitmaps
7474
SCP_vector<SCP_string> Neb2_bitmap_filenames;
@@ -359,7 +359,7 @@ void neb2_init()
359359
Poof_accum.resize(Poof_info.size());
360360

361361
// set up bit string
362-
Neb2_poof_flags.reset(new ubyte[calculate_num_bytes(Poof_info.size())]);
362+
Neb2_poof_flags = std::make_unique<ubyte[]>(calculate_num_bytes(Poof_info.size()));
363363
clear_all_bits(Neb2_poof_flags.get(), Poof_info.size());
364364
}
365365

code/nebula/neb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extern float Neb2_fog_visibility_shockwave;
5555
extern float Neb2_fog_visibility_fireball_const;
5656
extern float Neb2_fog_visibility_fireball_scaled_factor;
5757

58-
extern std::unique_ptr<ubyte> Neb2_poof_flags;
58+
extern std::unique_ptr<ubyte[]> Neb2_poof_flags;
5959

6060
// pof texture filenames
6161
extern SCP_vector<SCP_string> Neb2_bitmap_filenames;

qtfred/src/mission/missionsave.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,6 +2409,19 @@ int CFred_mission_save::save_campaign_file(const char *pathname)
24092409
fout(" %d", flags_to_save | ((! cm.main_hall.empty()) ? CMISSION_FLAG_BASTION : 0));
24102410
}
24112411

2412+
if (!cm.substitute_main_hall.empty()) {
2413+
fso_comment_push(";;FSO 3.7.2;;");
2414+
if (optional_string_fred("+Substitute Main Hall:")) {
2415+
parse_comments(1);
2416+
fout(" %s", cm.substitute_main_hall.c_str());
2417+
} else {
2418+
fout_version("\n+Substitute Main Hall: %s", cm.substitute_main_hall.c_str());
2419+
}
2420+
fso_comment_pop();
2421+
} else {
2422+
bypass_comment(";;FSO 3.7.2;; +Substitute Main Hall:");
2423+
}
2424+
24122425
if (cm.debrief_persona_index > 0) {
24132426
fso_comment_push(";;FSO 3.6.8;;");
24142427
if (optional_string_fred("+Debriefing Persona Index:")) {

0 commit comments

Comments
 (0)