si->bd_scroll_delay = TRUE;
si->bd_show_invisible_outbox = FALSE;
si->bd_smooth_movements = MODE_AUTO;
- si->bd_pushing_graphics = TRUE;
- si->bd_up_down_graphics = TRUE;
+ si->bd_pushing_graphics = MODE_TRUE;
+ si->bd_up_down_graphics = MODE_TRUE;
si->bd_skip_falling_sounds = MODE_AUTO;
si->bd_palette_c64 = GD_DEFAULT_PALETTE_C64;
si->bd_palette_c64dtv = GD_DEFAULT_PALETTE_C64DTV;
si->sounds_set = getStringCopy(SND_CLASSIC_SUBDIR);
si->music_set = getStringCopy(MUS_CLASSIC_SUBDIR);
- si->override_level_graphics = FALSE;
- si->override_level_sounds = FALSE;
- si->override_level_music = FALSE;
+ si->override_level_graphics = MODE_FALSE;
+ si->override_level_sounds = MODE_FALSE;
+ si->override_level_music = MODE_FALSE;
si->volume_simple = 100; // percent
si->volume_loops = 100; // percent
// check if smooth game element movements selected in setup menu
boolean use_bd_smooth_movements(void)
{
- return ((setup.bd_smooth_movements == TRUE) ||
+ return ((setup.bd_smooth_movements == MODE_TRUE) ||
(setup.bd_smooth_movements == MODE_AUTO && !use_native_bd_graphics_engine()));
}
// check if player pushing graphics selected in setup menu
boolean use_bd_pushing_graphics(void)
{
- return ((setup.bd_pushing_graphics == TRUE) ||
+ return ((setup.bd_pushing_graphics == MODE_TRUE) ||
(setup.bd_pushing_graphics == MODE_AUTO && !use_native_bd_graphics_engine()));
}
// check if player up/down graphics selected in setup menu
boolean use_bd_up_down_graphics(void)
{
- return ((setup.bd_up_down_graphics == TRUE) ||
+ return ((setup.bd_up_down_graphics == MODE_TRUE) ||
(setup.bd_up_down_graphics == MODE_AUTO && !use_native_bd_graphics_engine()));
}
// check if skipping falling sounds selected in setup menu
boolean skip_bd_falling_sounds(void)
{
- return ((setup.bd_skip_falling_sounds == TRUE) ||
+ return ((setup.bd_skip_falling_sounds == MODE_TRUE) ||
(setup.bd_skip_falling_sounds == MODE_AUTO && !game.use_native_bd_sound_engine));
}
case TYPE_SWITCH_3_STATES:
strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
*(int *)value == MODE_ASK ? "ask" :
- *(int *)value == FALSE ? "off" : "on"));
+ *(int *)value == MODE_FALSE ? "off" : "on"));
break;
case TYPE_YES_NO:
case TYPE_YES_NO_AUTO:
strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
- *(int *)value == FALSE ? "no" : "yes"));
+ *(int *)value == MODE_FALSE ? "no" : "yes"));
break;
case TYPE_YES_NO_ASK:
- strcpy(value_string, (*(int *)value == MODE_ASK ? "ask" :
- *(int *)value == FALSE ? "no" : "yes"));
+ strcpy(value_string, (*(int *)value == MODE_ASK ? "ask" :
+ *(int *)value == MODE_FALSE ? "no" : "yes"));
break;
case TYPE_ECS_AGA:
#undef MODE_ASK
#endif
+// values for boolean data type
#define TRUE 1
#define FALSE 0
+// values for 3-state data type (for "yes/no/auto" or "yes/no/ask")
+#define MODE_TRUE 1
+#define MODE_FALSE 0
#define MODE_AUTO -1
#define MODE_ASK -1
SetAnimationFirstLevel(leveldir_current->first_level);
// level_nr may have been set to value over handicap with level editor
- if (setup.allow_skipping_levels != TRUE && level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != MODE_TRUE && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
LoadLevel(level_nr);
if (new_level_nr > leveldir_current->last_level)
new_level_nr = leveldir_current->last_level;
- if (setup.allow_skipping_levels != TRUE && new_level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != MODE_TRUE && new_level_nr > leveldir_current->handicap_level)
{
// skipping levels is only allowed when trying to skip single level
// (also, skipping BD style intermission levels is always possible)
if (new_level_nr > leveldir_current->last_level)
new_level_nr = leveldir_current->last_level;
- if (setup.allow_skipping_levels != TRUE && new_level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != MODE_TRUE && new_level_nr > leveldir_current->handicap_level)
new_level_nr = leveldir_current->handicap_level;
if (new_level_nr != old_level_nr)
return (*(boolean *)value ? FONT_OPTION_ON : FONT_OPTION_OFF);
else if (type & TYPE_YES_NO_AUTO)
return (*(int *)value == MODE_AUTO ? FONT_OPTION_ON :
- *(int *)value == FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
+ *(int *)value == MODE_FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
else if (type & TYPE_YES_NO_ASK)
- return (*(int *)value == MODE_ASK ? FONT_OPTION_ON :
- *(int *)value == FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
+ return (*(int *)value == MODE_ASK ? FONT_OPTION_ON :
+ *(int *)value == MODE_FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
else if (type & TYPE_PLAYER)
return FONT_VALUE_1;
else
{
*(int *)si->value =
(dx == -1 ?
- (*(int *)si->value == MODE_AUTO ? TRUE :
- *(int *)si->value == TRUE ? FALSE : MODE_AUTO) :
- (*(int *)si->value == TRUE ? MODE_AUTO :
- *(int *)si->value == MODE_AUTO ? FALSE : TRUE));
+ (*(int *)si->value == MODE_AUTO ? MODE_TRUE :
+ *(int *)si->value == MODE_TRUE ? MODE_FALSE : MODE_AUTO) :
+ (*(int *)si->value == MODE_TRUE ? MODE_AUTO :
+ *(int *)si->value == MODE_AUTO ? MODE_FALSE : MODE_TRUE));
}
else if (si->type & TYPE_YES_NO_ASK)
{
*(int *)si->value =
(dx == -1 ?
- (*(int *)si->value == MODE_ASK ? TRUE :
- *(int *)si->value == TRUE ? FALSE : MODE_ASK) :
- (*(int *)si->value == TRUE ? MODE_ASK :
- *(int *)si->value == MODE_ASK ? FALSE : TRUE));
+ (*(int *)si->value == MODE_ASK ? MODE_TRUE :
+ *(int *)si->value == MODE_TRUE ? MODE_FALSE : MODE_ASK) :
+ (*(int *)si->value == MODE_TRUE ? MODE_ASK :
+ *(int *)si->value == MODE_ASK ? MODE_FALSE : MODE_TRUE));
}
else if (si->type & TYPE_KEY)
{