You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: code/controlconfig/controlsconfig.h
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -308,6 +308,13 @@ enum IoActionId : int {
308
308
309
309
CYCLE_PRIMARY_WEAPON_PATTERN,
310
310
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
+
311
318
/*!
312
319
* This must always be below the last defined item
313
320
*/
@@ -585,6 +592,10 @@ class CC_preset {
585
592
* Control configuration item type.
586
593
* @detail Contains binding info, documentation, behavior, etc. for a single control
587
594
*/
595
+
// Conflict group bitmasks. Bindings only conflict if their groups overlap (bitwise AND != 0).
596
+
staticconstintCONFLICT_GROUP_DEFAULT = (1 << 0); //!< Standard gameplay bindings
597
+
staticconstintCONFLICT_GROUP_PHOTO_MODE = (1 << 1); //!< Bindings used within photo mode
598
+
588
599
classCCI : publicCCB {
589
600
public:
590
601
// Inherited from CCB
@@ -593,6 +604,7 @@ class CCI : public CCB {
593
604
594
605
// Items Set in menu
595
606
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.
596
608
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
597
609
SCP_string text; //!< describes the action in the config screen
598
610
@@ -665,7 +677,7 @@ class CCI_builder {
665
677
* 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.
666
678
* 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
667
679
*/
668
-
CCI_builder& operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, constchar *text, CC_type type, bool disabled = false);
680
+
CCI_builder& operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, constchar *text, CC_type type, bool disabled = false, int conflict_groups = CONFLICT_GROUP_DEFAULT);
669
681
670
682
private:
671
683
CCI_builder(); // Only one builder per Control Config, so a default constructor is useless
CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, constchar *text, CC_type type, bool disabled) {
2924
+
CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short secondary, char tab, int indexXSTR, constchar *text, CC_type type, bool disabled, int conflict_groups) {
2906
2925
Assert(action_id < CCFG_MAX);
2907
2926
CCI& item = ControlConfig[action_id];
2908
2927
@@ -2940,6 +2959,9 @@ CCI_builder& CCI_builder::operator()(IoActionId action_id, short primary, short
0 commit comments