diff --git a/GNUmakefile b/GNUmakefile index 1f23c68c..95b4b28e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -109,8 +109,8 @@ ifeq ($(DEPLOYMENT_RELEASE_CONFIGURATION),yes) ADDITIONAL_OBJCFLAGS += -DOO_LOCALIZATION_TOOLS=0 ADDITIONAL_CFLAGS += -DDEBUG_GRAPHVIZ=0 ADDITIONAL_OBJCFLAGS += -DDEBUG_GRAPHVIZ=0 - ADDITIONAL_CFLAGS += -DOO_FOV_BY_KEY_ENABLED=0 - ADDITIONAL_OBJCFLAGS += -DOO_FOV_BY_KEY_ENABLED=0 + ADDITIONAL_CFLAGS += -DOO_FOV_INFLIGHT_CONTROL_ENABLED=0 + ADDITIONAL_OBJCFLAGS += -DOO_FOV_INFLIGHT_CONTROL_ENABLEDD=0 else ifeq ($(BUILD_WITH_DEBUG_FUNCTIONALITY),no) ADDITIONAL_CFLAGS += -DNDEBUG @@ -136,9 +136,9 @@ else ADDITIONAL_CFLAGS += -DDEBUG_GRAPHVIZ=1 ADDITIONAL_OBJCFLAGS += -DDEBUG_GRAPHVIZ=1 endif - ifeq ($(OO_FOV_BY_KEY_ENABLED),yes) - ADDITIONAL_CFLAGS += -DOO_FOV_BY_KEY_ENABLED=1 - ADDITIONAL_OBJCFLAGS += -DOO_FOV_BY_KEY_ENABLED=1 + ifeq ($(OO_FOV_INFLIGHT_CONTROL_ENABLED),yes) + ADDITIONAL_CFLAGS += -DOO_FOV_INFLIGHT_CONTROL_ENABLED=1 + ADDITIONAL_OBJCFLAGS += -DOO_FOV_INFLIGHT_CONTROL_ENABLED=1 endif endif diff --git a/config.make b/config.make index d8940dfb..06830128 100644 --- a/config.make +++ b/config.make @@ -21,4 +21,4 @@ OO_OXP_VERIFIER_ENABLED = yes OO_LOCALIZATION_TOOLS = yes DEBUG_GRAPHVIZ = yes OO_JAVASCRIPT_TRACE = yes -OO_FOV_BY_KEY_ENABLED = yes +OO_FOV_INFLIGHT_CONTROL_ENABLED = yes diff --git a/src/Core/Entities/PlayerEntityControls.m b/src/Core/Entities/PlayerEntityControls.m index 9af11c48..d70146e8 100644 --- a/src/Core/Entities/PlayerEntityControls.m +++ b/src/Core/Entities/PlayerEntityControls.m @@ -1403,7 +1403,7 @@ static NSTimeInterval time_last_frame; } -#if OO_FOV_BY_KEY_ENABLED +#if OO_FOV_INFLIGHT_CONTROL_ENABLED // Field of view controls if (![UNIVERSE displayGUI]) { diff --git a/src/Core/Entities/PlayerEntityStickMapper.m b/src/Core/Entities/PlayerEntityStickMapper.m index 5e128b94..5c103b89 100644 --- a/src/Core/Entities/PlayerEntityStickMapper.m +++ b/src/Core/Entities/PlayerEntityStickMapper.m @@ -197,11 +197,13 @@ MA 02110-1301, USA. [stickHandler unsetButtonFunction:BUTTON_INCTHRUST]; [stickHandler unsetButtonFunction:BUTTON_DECTHRUST]; } +#if OO_FOV_INFLIGHT_CONTROL_ENABLED if (function == AXIS_FIELD_OF_VIEW) { [stickHandler unsetButtonFunction:BUTTON_INC_FIELD_OF_VIEW]; [stickHandler unsetButtonFunction:BUTTON_DEC_FIELD_OF_VIEW]; } +#endif if (function == AXIS_VIEWX) { [stickHandler unsetButtonFunction:BUTTON_VIEWPORT]; @@ -220,10 +222,12 @@ MA 02110-1301, USA. { [stickHandler unsetAxisFunction:AXIS_THRUST]; } +#if OO_FOV_INFLIGHT_CONTROL_ENABLED if (function == BUTTON_INC_FIELD_OF_VIEW || function == BUTTON_DEC_FIELD_OF_VIEW) { [stickHandler unsetAxisFunction:AXIS_FIELD_OF_VIEW]; } +#endif if (function == BUTTON_VIEWPORT || function == BUTTON_VIEWSTARBOARD) { [stickHandler unsetAxisFunction:AXIS_VIEWX]; @@ -617,6 +621,7 @@ MA 02110-1301, USA. allowable:HW_AXIS|HW_BUTTON axisfn:AXIS_VIEWX butfn:BUTTON_VIEWSTARBOARD]]; +#if OO_FOV_INFLIGHT_CONTROL_ENABLED [funcList addObject: [self makeStickGuiDict:DESC(@"stickmapper-increase-field-of-view") allowable:HW_AXIS|HW_BUTTON @@ -627,6 +632,7 @@ MA 02110-1301, USA. allowable:HW_AXIS|HW_BUTTON axisfn:AXIS_FIELD_OF_VIEW butfn:BUTTON_DEC_FIELD_OF_VIEW]]; +#endif return funcList; } diff --git a/src/Core/OOJoystickManager.h b/src/Core/OOJoystickManager.h index 60e5bc41..530783ed 100644 --- a/src/Core/OOJoystickManager.h +++ b/src/Core/OOJoystickManager.h @@ -48,9 +48,11 @@ enum { AXIS_YAW, AXIS_PRECISION, AXIS_THRUST, - AXIS_FIELD_OF_VIEW, AXIS_VIEWX, AXIS_VIEWY, +#if OO_FOV_INFLIGHT_CONTROL_ENABLED + AXIS_FIELD_OF_VIEW, +#endif AXIS_end }; @@ -58,8 +60,6 @@ enum { enum { BUTTON_INCTHRUST, BUTTON_DECTHRUST, - BUTTON_INC_FIELD_OF_VIEW, - BUTTON_DEC_FIELD_OF_VIEW, BUTTON_SCANNERZOOM, BUTTON_SCANNERUNZOOM, BUTTON_JETTISON, @@ -94,6 +94,10 @@ enum { BUTTON_PREVTARGET, BUTTON_NEXTTARGET, BUTTON_MODEEQUIPMENT, +#if OO_FOV_INFLIGHT_CONTROL_ENABLED + BUTTON_INC_FIELD_OF_VIEW, + BUTTON_DEC_FIELD_OF_VIEW, +#endif BUTTON_end };