Skip to content

Commit 36d05ba

Browse files
authored
Implement Photo Mode (scp-fs2open#7287)
* Implement Photo Mode * fix gr string errors * return raw char array * control conflict groups and better photo param defines * better param identification in real time * make photo mode hude dynamically sized * fix xstrs after all changes * missed a few * use modern loop
1 parent bbf527b commit 36d05ba

17 files changed

Lines changed: 814 additions & 27 deletions

File tree

code/camera/photomode.cpp

Lines changed: 609 additions & 0 deletions
Large diffs are not rendered by default.

code/camera/photomode.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma once
2+
3+
void photo_mode_set_active(bool active);
4+
void photo_mode_do_frame(float frame_time);
5+
void photo_mode_maybe_render_hud();
6+
void photo_mode_clear_screenshot_queued_flag();
7+
void photo_mode_set_screenshot_queued_flag();
8+
9+
// mission-level permission to allow/disallow Photo Mode
10+
void game_toggle_photo_mode();
11+
void game_set_photo_mode_allowed(bool allowed);
12+
bool game_get_photo_mode_allowed();
13+
bool game_is_photo_mode_active();
14+
void game_cycle_photo_mode_filter(int direction);
15+
void game_reset_photo_mode_filters();
16+
void game_adjust_photo_mode_filter_parameter(int delta);

code/controlconfig/controlsconfig.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212

13+
#include "camera/photomode.h"
1314
#include "cfile/cfile.h"
1415
#include "cmdline/cmdline.h"
1516
#include "controlconfig/controlsconfig.h"
@@ -620,6 +621,11 @@ void control_config_conflict_check()
620621
continue;
621622
}
622623

624+
// Skip conflict check between items in different conflict groups
625+
if ((item_i.conflict_groups & item_j.conflict_groups) == 0) {
626+
continue;
627+
}
628+
623629
if (item_i.disabled && (item_i.has_first_conflict(item_j) || item_i.has_second_conflict(item_j))) {
624630
// item_i conflicts with item_j and is disabled. Silently clear item_i
625631
item_i.clear();
@@ -2837,6 +2843,13 @@ int check_control_used(int id, int key)
28372843
if (item.disabled || item.locked)
28382844
return 0;
28392845

2846+
// Filter actions based on conflict groups and current mode
2847+
{
2848+
int active_group = game_is_photo_mode_active() ? CONFLICT_GROUP_PHOTO_MODE : CONFLICT_GROUP_DEFAULT;
2849+
if (!(item.conflict_groups & active_group))
2850+
return 0;
2851+
}
2852+
28402853
short z = item.get_btn(CID_KEYBOARD); // Get the key that's bound to this control
28412854

28422855
if (item.type == CC_TYPE_CONTINUOUS) {

code/controlconfig/controlsconfig.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,13 @@ enum IoActionId : int {
308308

309309
CYCLE_PRIMARY_WEAPON_PATTERN,
310310

311+
TOGGLE_PHOTO_MODE,
312+
PHOTO_MODE_FILTER_PREV,
313+
PHOTO_MODE_FILTER_NEXT,
314+
PHOTO_MODE_FILTER_RESET,
315+
PHOTO_MODE_PARAM_DECREASE,
316+
PHOTO_MODE_PARAM_INCREASE,
317+
311318
/*!
312319
* This must always be below the last defined item
313320
*/
@@ -585,6 +592,10 @@ class CC_preset {
585592
* Control configuration item type.
586593
* @detail Contains binding info, documentation, behavior, etc. for a single control
587594
*/
595+
// Conflict group bitmasks. Bindings only conflict if their groups overlap (bitwise AND != 0).
596+
static const int CONFLICT_GROUP_DEFAULT = (1 << 0); //!< Standard gameplay bindings
597+
static const int CONFLICT_GROUP_PHOTO_MODE = (1 << 1); //!< Bindings used within photo mode
598+
588599
class CCI : public CCB {
589600
public:
590601
// Inherited from CCB
@@ -593,6 +604,7 @@ class CCI : public CCB {
593604

594605
// Items Set in menu
595606
char tab; //!< what tab (category) it belongs in
607+
int conflict_groups = CONFLICT_GROUP_DEFAULT; //!< Bitmask of conflict groups. Bindings only conflict with others sharing at least one group.
596608
int indexXSTR; //!< what string index we should use to translate this with an XSTR 0 = None, 1= Use item index + CONTROL_CONFIG_XSTR, 2 <= use CCI::indexXSTR directly
597609
SCP_string text; //!< describes the action in the config screen
598610

@@ -665,7 +677,7 @@ class CCI_builder {
665677
* If the type is CC_TYPE_TRIGGER or CC_TYPE_CONTINOUS, the primary is assumed to be a key combo and secondary is assumed to be a joy button.
666678
* If the type is CC_TYPE_AXIS_ABS, CC_TYPE_AXIS_REL, CC_TYPE_AXIS_BTN_POS, or CC_TYPE_AXIS_BTN_NEG, the primary is a Joy0 axis and the secondary is a Mouse axis
667679
*/
668-
CCI_builder& operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, const char *text, CC_type type, bool disabled = false);
680+
CCI_builder& operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, const char *text, CC_type type, bool disabled = false, int conflict_groups = CONFLICT_GROUP_DEFAULT);
669681

670682
private:
671683
CCI_builder(); // Only one builder per Control Config, so a default constructor is useless

code/controlconfig/controlsconfigcommon.cpp

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ void control_config_common_init_bindings() {
138138
(TARGET_PREV_BOMB, KEY_SHIFTED | KEY_B, -1, TARGET_TAB, 1, "Target Previous Hostile Bomb or Bomber", CC_TYPE_TRIGGER)
139139

140140
// flight controls (Rotation)
141-
(BANK_LEFT, KEY_PAD7, -1, SHIP_TAB, 1, "Bank Left", CC_TYPE_CONTINUOUS)
142-
(BANK_RIGHT, KEY_PAD9, -1, SHIP_TAB, 1, "Bank Right", CC_TYPE_CONTINUOUS)
143-
(PITCH_FORWARD, KEY_PAD8, -1, SHIP_TAB, 1, "Pitch Forward", CC_TYPE_CONTINUOUS)
144-
(PITCH_BACK, KEY_PAD2, -1, SHIP_TAB, 1, "Pitch Backward", CC_TYPE_CONTINUOUS)
145-
(YAW_LEFT, KEY_PAD4, -1, SHIP_TAB, 1, "Yaw Left", CC_TYPE_CONTINUOUS)
146-
(YAW_RIGHT, KEY_PAD6, -1, SHIP_TAB, 1, "Yaw Right", CC_TYPE_CONTINUOUS)
141+
(BANK_LEFT, KEY_PAD7, -1, SHIP_TAB, 1, "Bank Left", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
142+
(BANK_RIGHT, KEY_PAD9, -1, SHIP_TAB, 1, "Bank Right", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
143+
(PITCH_FORWARD, KEY_PAD8, -1, SHIP_TAB, 1, "Pitch Forward", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
144+
(PITCH_BACK, KEY_PAD2, -1, SHIP_TAB, 1, "Pitch Backward", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
145+
(YAW_LEFT, KEY_PAD4, -1, SHIP_TAB, 1, "Yaw Left", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
146+
(YAW_RIGHT, KEY_PAD6, -1, SHIP_TAB, 1, "Yaw Right", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
147147

148148
// flight controls (Throttle)
149149
(ZERO_THROTTLE, KEY_BACKSP, -1, SHIP_TAB, 1, "Set Throttle to Zero", CC_TYPE_TRIGGER)
@@ -154,16 +154,16 @@ void control_config_common_init_bindings() {
154154
(MINUS_5_PERCENT_THROTTLE, KEY_MINUS, -1, SHIP_TAB, 1, "Decrease Throttle 5 Percent", CC_TYPE_TRIGGER)
155155

156156
// flight controls (Thrust)
157-
(FORWARD_THRUST, KEY_A, -1, SHIP_TAB, 1, "Forward Thrust", CC_TYPE_CONTINUOUS)
158-
(REVERSE_THRUST, KEY_Z, -1, SHIP_TAB, 1, "Reverse Thrust", CC_TYPE_CONTINUOUS)
159-
(RIGHT_SLIDE_THRUST, KEY_SHIFTED | KEY_3, -1, SHIP_TAB, 1, "Right Thrust", CC_TYPE_CONTINUOUS)
160-
(LEFT_SLIDE_THRUST, KEY_SHIFTED | KEY_1, -1, SHIP_TAB, 1, "Left Thrust", CC_TYPE_CONTINUOUS)
161-
(UP_SLIDE_THRUST, KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, 1, "Up Thrust", CC_TYPE_CONTINUOUS)
162-
(DOWN_SLIDE_THRUST, KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, 1, "Down Thrust", CC_TYPE_CONTINUOUS)
157+
(FORWARD_THRUST, KEY_A, -1, SHIP_TAB, 1, "Forward Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
158+
(REVERSE_THRUST, KEY_Z, -1, SHIP_TAB, 1, "Reverse Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
159+
(RIGHT_SLIDE_THRUST, KEY_SHIFTED | KEY_3, -1, SHIP_TAB, 1, "Right Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
160+
(LEFT_SLIDE_THRUST, KEY_SHIFTED | KEY_1, -1, SHIP_TAB, 1, "Left Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
161+
(UP_SLIDE_THRUST, KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, 1, "Up Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
162+
(DOWN_SLIDE_THRUST, KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, 1, "Down Thrust", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
163163

164164
// flight controls (flight modes)
165165
(BANK_WHEN_PRESSED, -1, -1, SHIP_TAB, 1, "Bank When Pressed", CC_TYPE_CONTINUOUS)
166-
(AFTERBURNER, KEY_TAB, 5, SHIP_TAB, 1, "Afterburner", CC_TYPE_CONTINUOUS)
166+
(AFTERBURNER, KEY_TAB, 5, SHIP_TAB, 1, "Afterburner", CC_TYPE_CONTINUOUS, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
167167
(GLIDE_WHEN_PRESSED, -1, -1, SHIP_TAB, 1774, "Glide When Pressed", CC_TYPE_CONTINUOUS)
168168
(TOGGLE_GLIDING, KEY_ALTED | KEY_G, -1, SHIP_TAB, 1775, "Toggle Gliding", CC_TYPE_TRIGGER)
169169

@@ -267,6 +267,12 @@ void control_config_common_init_bindings() {
267267
(TOGGLE_HUD_CONTRAST, KEY_L, -1, COMPUTER_TAB, 1, "Toggle High HUD Contrast", CC_TYPE_TRIGGER)
268268
(TOGGLE_HUD_SHADOWS, KEY_ALTED | KEY_L, -1, COMPUTER_TAB, 1781, "Toggle HUD Drop Shadows", CC_TYPE_TRIGGER)
269269
(HUD_TARGETBOX_TOGGLE_WIREFRAME, KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, 1, "Toggle HUD Wireframe Target View", CC_TYPE_TRIGGER)
270+
(TOGGLE_PHOTO_MODE, KEY_ALTED | KEY_1, -1, COMPUTER_TAB, 1908, "Toggle Photo Mode", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_DEFAULT | CONFLICT_GROUP_PHOTO_MODE)
271+
(PHOTO_MODE_FILTER_PREV, KEY_UP, -1, COMPUTER_TAB, 1909, "Photo Mode Previous Parameter", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_PHOTO_MODE)
272+
(PHOTO_MODE_FILTER_NEXT, KEY_DOWN, -1, COMPUTER_TAB, 1910, "Photo Mode Next Parameter", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_PHOTO_MODE)
273+
(PHOTO_MODE_FILTER_RESET, KEY_ALTED | KEY_2, -1, COMPUTER_TAB, 1911, "Photo Mode Reset Parameters", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_PHOTO_MODE)
274+
(PHOTO_MODE_PARAM_DECREASE, KEY_LEFT, -1, COMPUTER_TAB, 1912, "Photo Mode Decrease Selected Parameter", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_PHOTO_MODE)
275+
(PHOTO_MODE_PARAM_INCREASE, KEY_RIGHT, -1, COMPUTER_TAB, 1913, "Photo Mode Increase Selected Parameter", CC_TYPE_TRIGGER, false, CONFLICT_GROUP_PHOTO_MODE)
270276

271277
// Custom Controls
272278
(CUSTOM_CONTROL_1, KEY_ALTED | KEY_SHIFTED | KEY_1, -1, COMPUTER_TAB, 1784, "Custom Control 1", CC_TYPE_TRIGGER, true)
@@ -434,6 +440,12 @@ SCP_unordered_map<SCP_string, IoActionId> old_text = {
434440
{"Up Thrust", UP_SLIDE_THRUST},
435441
{"Down Thrust", DOWN_SLIDE_THRUST},
436442
{"Toggle HUD Wireframe Target View", HUD_TARGETBOX_TOGGLE_WIREFRAME},
443+
{"Toggle Photo Mode", TOGGLE_PHOTO_MODE},
444+
{"Photo Mode Previous Parameter", PHOTO_MODE_FILTER_PREV},
445+
{"Photo Mode Next Parameter", PHOTO_MODE_FILTER_NEXT},
446+
{"Photo Mode Reset Parameters", PHOTO_MODE_FILTER_RESET},
447+
{"Photo Mode Decrease Selected Parameter", PHOTO_MODE_PARAM_DECREASE},
448+
{"Photo Mode Increase Selected Parameter", PHOTO_MODE_PARAM_INCREASE},
437449
{"Top-Down View", VIEW_TOPDOWN},
438450
{"Target Padlock View", VIEW_TRACK_TARGET},
439451

@@ -1153,6 +1165,12 @@ void LoadEnumsIntoActionMap() {
11531165
ADD_ENUM_TO_ACTION_MAP(UP_SLIDE_THRUST)
11541166
ADD_ENUM_TO_ACTION_MAP(DOWN_SLIDE_THRUST)
11551167
ADD_ENUM_TO_ACTION_MAP(HUD_TARGETBOX_TOGGLE_WIREFRAME)
1168+
ADD_ENUM_TO_ACTION_MAP(TOGGLE_PHOTO_MODE)
1169+
ADD_ENUM_TO_ACTION_MAP(PHOTO_MODE_FILTER_PREV)
1170+
ADD_ENUM_TO_ACTION_MAP(PHOTO_MODE_FILTER_NEXT)
1171+
ADD_ENUM_TO_ACTION_MAP(PHOTO_MODE_FILTER_RESET)
1172+
ADD_ENUM_TO_ACTION_MAP(PHOTO_MODE_PARAM_DECREASE)
1173+
ADD_ENUM_TO_ACTION_MAP(PHOTO_MODE_PARAM_INCREASE)
11561174
ADD_ENUM_TO_ACTION_MAP(VIEW_TOPDOWN)
11571175
ADD_ENUM_TO_ACTION_MAP(VIEW_TRACK_TARGET)
11581176

@@ -2820,6 +2838,7 @@ CCI& CCI::operator=(const CCI& A) {
28202838
locked = A.locked;
28212839
scriptEnabledByDefault = A.scriptEnabledByDefault;
28222840
continuous_ongoing = A.continuous_ongoing;
2841+
conflict_groups = A.conflict_groups;
28232842

28242843
return *this;
28252844
};
@@ -2902,7 +2921,7 @@ CCI_builder& CCI_builder::start() {
29022921

29032922
void CCI_builder::end() {};
29042923

2905-
CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, const char *text, CC_type type, bool disabled) {
2924+
CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, const char *text, CC_type type, bool disabled, int conflict_groups) {
29062925
Assert(action_id < CCFG_MAX);
29072926
CCI& item = ControlConfig[action_id];
29082927

@@ -2940,6 +2959,9 @@ CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short
29402959
item.disabled = false;
29412960
}
29422961

2962+
// Assign the conflict group
2963+
item.conflict_groups = conflict_groups;
2964+
29432965
return *this;
29442966
}
29452967

code/graphics/2d.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2976,6 +2976,11 @@ void gr_request_screenshot(const char* filename)
29762976
}
29772977
}
29782978

2979+
bool gr_is_screenshot_requested()
2980+
{
2981+
return !Pending_screenshot_filename.empty();
2982+
}
2983+
29792984
void gr_print_timestamp(int x, int y, fix timestamp, int resize_mode)
29802985
{
29812986
int seconds = f2i(timestamp);

code/graphics/2d.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ extern void gr_activate(int active);
10741074
#define gr_dump_envmap GR_CALL(gr_screen.gf_dump_envmap)
10751075

10761076
void gr_request_screenshot(const char* filename);
1077+
bool gr_is_screenshot_requested();
10771078

10781079
//#define gr_flip GR_CALL(gr_screen.gf_flip)
10791080
void gr_flip(bool execute_scripting = true);

code/io/keycontrol.cpp

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "globalincs/pstypes.h"
1414
#include "globalincs/globals.h"
1515
#include "globalincs/linklist.h"
16+
#include "camera/photomode.h"
1617
#include "io/key.h"
1718
#include "io/joy.h"
1819
#include "io/timer.h"
@@ -328,6 +329,12 @@ int Normal_key_set[] = {
328329
MULTI_SELF_DESTRUCT,
329330

330331
TOGGLE_HUD,
332+
TOGGLE_PHOTO_MODE,
333+
PHOTO_MODE_FILTER_PREV,
334+
PHOTO_MODE_FILTER_NEXT,
335+
PHOTO_MODE_FILTER_RESET,
336+
PHOTO_MODE_PARAM_DECREASE,
337+
PHOTO_MODE_PARAM_INCREASE,
331338

332339
HUD_TARGETBOX_TOGGLE_WIREFRAME,
333340
AUTO_PILOT_TOGGLE,
@@ -475,6 +482,12 @@ int Non_critical_key_set[] = {
475482
MULTI_SELF_DESTRUCT,
476483

477484
TOGGLE_HUD,
485+
TOGGLE_PHOTO_MODE,
486+
PHOTO_MODE_FILTER_PREV,
487+
PHOTO_MODE_FILTER_NEXT,
488+
PHOTO_MODE_FILTER_RESET,
489+
PHOTO_MODE_PARAM_DECREASE,
490+
PHOTO_MODE_PARAM_INCREASE,
478491

479492
HUD_TARGETBOX_TOGGLE_WIREFRAME,
480493
AUTO_PILOT_TOGGLE,
@@ -1536,9 +1549,13 @@ void game_do_end_mission_popup()
15361549
if (Game_subspace_effect) {
15371550
game_start_subspace_ambient_sound();
15381551
}
1539-
audiostream_unpause_all();
1552+
1553+
if (!game_is_photo_mode_active()) {
1554+
audiostream_unpause_all();
1555+
message_resume_all();
1556+
}
1557+
15401558
weapon_unpause_sounds();
1541-
message_resume_all();
15421559
break;
15431560
}
15441561

@@ -2230,10 +2247,12 @@ int button_function_demo_valid(int n)
22302247

22312248
case TIME_SLOW_DOWN:
22322249
ret = 1;
2233-
if ( Game_mode & GM_NORMAL && !Time_compression_locked ) {
2250+
if (Game_mode & GM_NORMAL && (!Time_compression_locked || game_is_photo_mode_active())) {
2251+
const auto min_compression = game_is_photo_mode_active() ? fl2f(0.01f) : (F1_0 / (Cmdline_retail_time_compression_range ? MAX_TIME_DIVIDER_RETAIL : MAX_TIME_DIVIDER));
2252+
22342253
// Goober5000 - time dilation only available in cheat mode (see above);
22352254
// now you can do it with or without pressing the tilde, per Kazan's request
2236-
if ((Game_time_compression > F1_0) || (Cheats_enabled && (Game_time_compression > (F1_0 / (Cmdline_retail_time_compression_range ? MAX_TIME_DIVIDER_RETAIL : MAX_TIME_DIVIDER))))) {
2255+
if ((Game_time_compression > F1_0) || (Game_time_compression > min_compression && (Cheats_enabled || game_is_photo_mode_active()))) {
22372256
change_time_compression(0.5f);
22382257
break;
22392258
}
@@ -2243,7 +2262,7 @@ int button_function_demo_valid(int n)
22432262

22442263
case TIME_SPEED_UP:
22452264
ret = 1;
2246-
if ( Game_mode & GM_NORMAL && !Time_compression_locked ) {
2265+
if (Game_mode & GM_NORMAL && (!Time_compression_locked || game_is_photo_mode_active())) {
22472266
if (Game_time_compression < (F1_0 * (Cmdline_retail_time_compression_range ? MAX_TIME_MULTIPLIER_RETAIL : MAX_TIME_MULTIPLIER))) {
22482267
change_time_compression(2.0f);
22492268
break;
@@ -2582,6 +2601,30 @@ int button_function(int n)
25822601
hud_toggle_draw();
25832602
break;
25842603

2604+
case TOGGLE_PHOTO_MODE:
2605+
game_toggle_photo_mode();
2606+
break;
2607+
2608+
case PHOTO_MODE_FILTER_PREV:
2609+
game_cycle_photo_mode_filter(-1);
2610+
break;
2611+
2612+
case PHOTO_MODE_FILTER_NEXT:
2613+
game_cycle_photo_mode_filter(1);
2614+
break;
2615+
2616+
case PHOTO_MODE_FILTER_RESET:
2617+
game_reset_photo_mode_filters();
2618+
break;
2619+
2620+
case PHOTO_MODE_PARAM_DECREASE:
2621+
game_adjust_photo_mode_filter_parameter(-1);
2622+
break;
2623+
2624+
case PHOTO_MODE_PARAM_INCREASE:
2625+
game_adjust_photo_mode_filter_parameter(1);
2626+
break;
2627+
25852628
case HUD_TARGETBOX_TOGGLE_WIREFRAME:
25862629
if (!Lock_targetbox_mode) {
25872630
gamesnd_play_iface(InterfaceSounds::USER_SELECT);

code/localization/localize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bool *Lcl_unexpected_tstring_check = nullptr;
6464
// NOTE: with map storage of XSTR strings, the indexes no longer need to be contiguous,
6565
// but internal strings should still increment XSTR_SIZE to avoid collisions.
6666
// retail XSTR_SIZE = 1570
67-
// #define XSTR_SIZE 1892 // This is the next available ID
67+
// #define XSTR_SIZE 1915 // This is the next available ID
6868

6969
// struct to allow for strings.tbl-determined x offset
7070
// offset is 0 for english, by default

code/missionui/missionpause.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "controlconfig/controlsconfig.h"
1414
#include "freespace.h"
15+
#include "camera/photomode.h"
1516
#include "gamesequence/gamesequence.h"
1617
#include "globalincs/alphacolors.h"
1718
#include "graphics/font.h"
@@ -254,8 +255,10 @@ void pause_close()
254255
// unpause all weapon sounds
255256
weapon_unpause_sounds();
256257

257-
// unpause voices
258-
message_resume_all();
258+
// unpause voices unless Photo Mode is keeping playback paused
259+
if (!game_is_photo_mode_active()) {
260+
message_resume_all();
261+
}
259262

260263
// deinit stuff
261264
if(Pause_saved_screen != -1) {
@@ -273,8 +276,10 @@ void pause_close()
273276

274277
io::mouse::CursorManager::get()->popStatus();
275278

276-
// unpause all the music
277-
audiostream_unpause_all();
279+
// unpause all the music unless Photo Mode is keeping playback paused
280+
if (!game_is_photo_mode_active()) {
281+
audiostream_unpause_all();
282+
}
278283

279284
Paused = false;
280285
}

0 commit comments

Comments
 (0)