Menus: Disable compilation of all code pertaining to MenuRangeDouble_t, since we're not using any.

git-svn-id: https://svn.eduke32.com/eduke32@6403 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-07-29 20:39:57 +00:00
parent 88d5da2859
commit d414d15b52
2 changed files with 14 additions and 0 deletions

View file

@ -3057,11 +3057,13 @@ static int32_t Menu_EntryRangeFloatDidModify(MenuEntry_t *entry)
return 0; return 0;
} }
#ifdef MENU_ENABLE_RANGEDOUBLE
static int32_t Menu_EntryRangeDoubleModify(void /*MenuEntry_t *entry, double newValue*/) static int32_t Menu_EntryRangeDoubleModify(void /*MenuEntry_t *entry, double newValue*/)
{ {
return 0; return 0;
} }
#endif
static uint32_t save_xxh = 0; static uint32_t save_xxh = 0;
@ -4044,9 +4046,11 @@ static void Menu_RunInput_EntryRangeInt32_Movement(MenuEntry_t *entry, MenuRange
static void Menu_RunInput_EntryRangeFloat_MovementVerify(MenuEntry_t *entry, MenuRangeFloat_t *object, float newValue); static void Menu_RunInput_EntryRangeFloat_MovementVerify(MenuEntry_t *entry, MenuRangeFloat_t *object, float newValue);
static void Menu_RunInput_EntryRangeFloat_MovementArbitrary(MenuEntry_t *entry, MenuRangeFloat_t *object, float newValue); static void Menu_RunInput_EntryRangeFloat_MovementArbitrary(MenuEntry_t *entry, MenuRangeFloat_t *object, float newValue);
static void Menu_RunInput_EntryRangeFloat_Movement(MenuEntry_t *entry, MenuRangeFloat_t *object, MenuMovement_t direction); static void Menu_RunInput_EntryRangeFloat_Movement(MenuEntry_t *entry, MenuRangeFloat_t *object, MenuMovement_t direction);
#ifdef MENU_ENABLE_RANGEDOUBLE
static void Menu_RunInput_EntryRangeDouble_MovementVerify(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue); static void Menu_RunInput_EntryRangeDouble_MovementVerify(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue);
static void Menu_RunInput_EntryRangeDouble_MovementArbitrary(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue); static void Menu_RunInput_EntryRangeDouble_MovementArbitrary(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue);
static void Menu_RunInput_EntryRangeDouble_Movement(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, MenuMovement_t direction); static void Menu_RunInput_EntryRangeDouble_Movement(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, MenuMovement_t direction);
#endif
static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry); static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry);
static void Menu_RunInput_EntryString_Submit(MenuEntry_t *entry, MenuString_t *object); static void Menu_RunInput_EntryString_Submit(MenuEntry_t *entry, MenuString_t *object);
static void Menu_RunInput_EntryString_Cancel(/*MenuEntry_t *entry, */MenuString_t *object); static void Menu_RunInput_EntryString_Cancel(/*MenuEntry_t *entry, */MenuString_t *object);
@ -4513,6 +4517,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
break; break;
} }
#ifdef MENU_ENABLE_RANGEDOUBLE
case RangeDouble: case RangeDouble:
{ {
MenuRangeDouble_t *object = (MenuRangeDouble_t*)entry->entry; MenuRangeDouble_t *object = (MenuRangeDouble_t*)entry->entry;
@ -4605,6 +4610,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
break; break;
} }
#endif
case String: case String:
{ {
MenuString_t *object = (MenuString_t*)entry->entry; MenuString_t *object = (MenuString_t*)entry->entry;
@ -5455,6 +5461,7 @@ static void Menu_RunInput_EntryRangeFloat_Movement(MenuEntry_t *entry, MenuRange
Menu_RunInput_EntryRangeFloat_MovementVerify(entry, object, newValue); Menu_RunInput_EntryRangeFloat_MovementVerify(entry, object, newValue);
} }
#ifdef MENU_ENABLE_RANGEDOUBLE
static void Menu_RunInput_EntryRangeDouble_MovementVerify(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue) static void Menu_RunInput_EntryRangeDouble_MovementVerify(/*MenuEntry_t *entry, */MenuRangeDouble_t *object, double newValue)
{ {
if (!Menu_EntryRangeDoubleModify(/*entry, newValue*/)) if (!Menu_EntryRangeDoubleModify(/*entry, newValue*/))
@ -5511,6 +5518,7 @@ static void Menu_RunInput_EntryRangeDouble_Movement(/*MenuEntry_t *entry, */Menu
double const newValue = newValueIndex * range / maxInterval + object->min; double const newValue = newValueIndex * range / maxInterval + object->min;
Menu_RunInput_EntryRangeDouble_MovementVerify(/*entry, */object, newValue); Menu_RunInput_EntryRangeDouble_MovementVerify(/*entry, */object, newValue);
} }
#endif
static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry) static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry)
{ {
@ -6023,6 +6031,7 @@ static void Menu_RunInput(Menu_t *cm)
} }
break; break;
} }
#ifdef MENU_ENABLE_RANGEDOUBLE
case RangeDouble: case RangeDouble:
{ {
MenuRangeDouble_t *object = (MenuRangeDouble_t*)currentry->entry; MenuRangeDouble_t *object = (MenuRangeDouble_t*)currentry->entry;
@ -6048,6 +6057,7 @@ static void Menu_RunInput(Menu_t *cm)
} }
break; break;
} }
#endif
case String: case String:
{ {

View file

@ -140,7 +140,9 @@ typedef enum MenuEntryType_t
Custom2Col, Custom2Col,
RangeInt32, RangeInt32,
RangeFloat, RangeFloat,
#ifdef MENU_ENABLE_RANGEDOUBLE
RangeDouble, RangeDouble,
#endif
String, String,
Spacer, Spacer,
} MenuEntryType_t; } MenuEntryType_t;
@ -263,6 +265,7 @@ typedef struct MenuRangeFloat_t
uint8_t flags; uint8_t flags;
} MenuRangeFloat_t; } MenuRangeFloat_t;
#ifdef MENU_ENABLE_RANGEDOUBLE
typedef struct MenuRangeDouble_t typedef struct MenuRangeDouble_t
{ {
// effect // effect
@ -279,6 +282,7 @@ typedef struct MenuRangeDouble_t
uint8_t flags; uint8_t flags;
} MenuRangeDouble_t; } MenuRangeDouble_t;
#endif
typedef struct MenuString_t typedef struct MenuString_t
{ {
// state // state