Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow per-stage briefing grid colors #6448

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions code/mission/missionparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9063,3 +9063,15 @@ bool check_for_24_1_data()

return false;
}

bool check_for_25_0_data()
{
for (int i = 0; i < Num_teams; i++) {
for (int j = 0; j < Briefings[i].num_stages; i++) {
BMagnu marked this conversation as resolved.
Show resolved Hide resolved
if (!gr_compare_color_values(Briefings[i].stages[j].grid_color, Color_briefing_grid)) {
return true;
}
}
}
return false;
}
1 change: 1 addition & 0 deletions code/mission/missionparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern const gameversion::version LEGACY_MISSION_VERSION;
// a "soft version bump" rather than a hard bump because not all missions are affected.
extern bool check_for_23_3_data();
extern bool check_for_24_1_data();
extern bool check_for_25_0_data();

#define WING_PLAYER_BASE 0x80000 // used by Fred to tell ship_index in a wing points to a player

Expand Down
9 changes: 9 additions & 0 deletions fred2/missionsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,15 @@ void CFred_mission_save::save_mission_internal(const char *pathname)
// Additional incremental version update for some features
auto version_23_3 = gameversion::version(23, 3);
auto version_24_1 = gameversion::version(24, 1);
auto version_25_0 = gameversion::version(25, 0);
if (MISSION_VERSION >= version_25_0)
{
Warning(LOCATION, "Notify an SCP coder: now that the required mission version is at least 25.0, the check_for_25_0_data(), the check_for_24_1_data() and check_for_23_3_data() code can be removed");
}
else if (check_for_25_0_data())
BMagnu marked this conversation as resolved.
Show resolved Hide resolved
{
The_mission.required_fso_version = version_25_0;
}
if (MISSION_VERSION >= version_24_1)
BMagnu marked this conversation as resolved.
Show resolved Hide resolved
{
Warning(LOCATION, "Notify an SCP coder: now that the required mission version is at least 24.1, the check_for_24_1_data() and check_for_23_3_data() code can be removed");
Expand Down
9 changes: 9 additions & 0 deletions qtfred/src/mission/missionsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3067,6 +3067,15 @@ void CFred_mission_save::save_mission_internal(const char* pathname)
// Additional incremental version update for some features
auto version_23_3 = gameversion::version(23, 3);
auto version_24_1 = gameversion::version(24, 1);
auto version_25_0 = gameversion::version(25, 0);
if (MISSION_VERSION >= version_25_0)
{
Warning(LOCATION, "Notify an SCP coder: now that the required mission version is at least 25.0, the check_for_25_0_data(), the check_for_24_1_data() and check_for_23_3_data() code can be removed");
}
else if (check_for_25_0_data())
{
The_mission.required_fso_version = version_25_0;
}
if (MISSION_VERSION >= version_24_1)
BMagnu marked this conversation as resolved.
Show resolved Hide resolved
{
Warning(LOCATION, "Notify an SCP coder: now that the required mission version is at least 24.1, the check_for_24_1_data() and check_for_23_3_data() code can be removed");
Expand Down
Loading