Renamed macro OO_FOV_BY_KEY_ENABLED to OO_FOV_INFLIGHT_CONTROL_ENABLED and extended this compile-time switc functionality also to joystick control.

This commit is contained in:
AnotherCommander 2015-04-03 17:15:32 +02:00
parent 1db36e947f
commit e532352167
5 changed files with 20 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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])
{

View File

@ -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;
}

View File

@ -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
};