si->team_mode = FALSE;
si->handicap = TRUE;
si->skip_levels = TRUE;
- si->allow_skipping_levels = MODE_ASK;
+ si->allow_skipping_levels = STATE_ASK;
si->increment_levels = TRUE;
si->auto_play_next_level = TRUE;
si->count_score_after_game = TRUE;
si->bd_skip_hatching = FALSE;
si->bd_scroll_delay = TRUE;
si->bd_show_invisible_outbox = FALSE;
- si->bd_smooth_movements = MODE_AUTO;
- si->bd_pushing_graphics = MODE_TRUE;
- si->bd_up_down_graphics = MODE_TRUE;
- si->bd_skip_falling_sounds = MODE_AUTO;
+ si->bd_smooth_movements = STATE_AUTO;
+ si->bd_pushing_graphics = STATE_TRUE;
+ si->bd_up_down_graphics = STATE_TRUE;
+ si->bd_skip_falling_sounds = STATE_AUTO;
si->bd_palette_c64 = GD_DEFAULT_PALETTE_C64;
si->bd_palette_c64dtv = GD_DEFAULT_PALETTE_C64DTV;
si->bd_palette_atari = GD_DEFAULT_PALETTE_ATARI;
si->sounds_set = getStringCopy(SND_CLASSIC_SUBDIR);
si->music_set = getStringCopy(MUS_CLASSIC_SUBDIR);
- si->override_level_graphics = MODE_FALSE;
- si->override_level_sounds = MODE_FALSE;
- si->override_level_music = MODE_FALSE;
+ si->override_level_graphics = STATE_FALSE;
+ si->override_level_sounds = STATE_FALSE;
+ si->override_level_music = STATE_FALSE;
si->volume_simple = 100; // percent
si->volume_loops = 100; // percent
si->debug.show_frames_per_second = FALSE;
- si->debug.xsn_mode = MODE_AUTO;
+ si->debug.xsn_mode = STATE_AUTO;
si->debug.xsn_percent = 0;
si->options.verbose = FALSE;
fprintf(file, "\n");
for (i = 0; i < ARRAY_SIZE(debug_setup_tokens); i++)
if (!strPrefix(debug_setup_tokens[i].text, "debug.xsn_") ||
- setup.debug.xsn_mode != MODE_AUTO)
+ setup.debug.xsn_mode != STATE_AUTO)
fprintf(file, "%s\n", getSetupLine(debug_setup_tokens, "", i));
fprintf(file, "\n");
// check if smooth game element movements selected in setup menu
boolean use_bd_smooth_movements(void)
{
- return ((setup.bd_smooth_movements == MODE_TRUE) ||
- (setup.bd_smooth_movements == MODE_AUTO && !use_native_bd_graphics_engine()));
+ return ((setup.bd_smooth_movements == STATE_TRUE) ||
+ (setup.bd_smooth_movements == STATE_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 == MODE_TRUE) ||
- (setup.bd_pushing_graphics == MODE_AUTO && !use_native_bd_graphics_engine()));
+ return ((setup.bd_pushing_graphics == STATE_TRUE) ||
+ (setup.bd_pushing_graphics == STATE_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 == MODE_TRUE) ||
- (setup.bd_up_down_graphics == MODE_AUTO && !use_native_bd_graphics_engine()));
+ return ((setup.bd_up_down_graphics == STATE_TRUE) ||
+ (setup.bd_up_down_graphics == STATE_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 == MODE_TRUE) ||
- (setup.bd_skip_falling_sounds == MODE_AUTO && !game.use_native_bd_sound_engine));
+ return ((setup.bd_skip_falling_sounds == STATE_TRUE) ||
+ (setup.bd_skip_falling_sounds == STATE_AUTO && !game.use_native_bd_sound_engine));
}
Bitmap **GetTitleScreenBitmaps_BD(void)
if (debug)
setup.debug.xsn_percent = percent;
- if (setup.debug.xsn_mode != MODE_AUTO)
+ if (setup.debug.xsn_mode != STATE_AUTO)
percent = setup.debug.xsn_percent;
setup.debug.xsn_percent = percent;
active = (percent > 0);
- if ((active && !active_last) || setup.debug.xsn_mode != MODE_AUTO)
+ if ((active && !active_last) || setup.debug.xsn_mode != STATE_AUTO)
removeHideSetupEntry(&setup.debug.xsn_mode);
else if (!active && active_last)
setHideSetupEntry(&setup.debug.xsn_mode);
gfx.override_level_music = FALSE;
// now check if this level set has definitions for custom elements
- if (setup.override_level_graphics == MODE_AUTO ||
- setup.override_level_sounds == MODE_AUTO ||
- setup.override_level_music == MODE_AUTO)
+ if (setup.override_level_graphics == STATE_AUTO ||
+ setup.override_level_sounds == STATE_AUTO ||
+ setup.override_level_music == STATE_AUTO)
redefined_ce_found =
(CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_GRAPHICS) |
CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_SOUNDS) |
get_integer_from_string(s) == 1)
result = TRUE;
else if (strEqual(s_lower, "auto"))
- result = MODE_AUTO;
+ result = STATE_AUTO;
free(s_lower);
break;
case TYPE_SWITCH_3_STATES:
- strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
- *(int *)value == MODE_ASK ? "ask" :
- *(int *)value == MODE_FALSE ? "off" : "on"));
+ strcpy(value_string, (*(int *)value == STATE_AUTO ? "auto" :
+ *(int *)value == STATE_ASK ? "ask" :
+ *(int *)value == STATE_FALSE ? "off" : "on"));
break;
case TYPE_YES_NO:
break;
case TYPE_YES_NO_AUTO:
- strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
- *(int *)value == MODE_FALSE ? "no" : "yes"));
+ strcpy(value_string, (*(int *)value == STATE_AUTO ? "auto" :
+ *(int *)value == STATE_FALSE ? "no" : "yes"));
break;
case TYPE_YES_NO_ASK:
- strcpy(value_string, (*(int *)value == MODE_ASK ? "ask" :
- *(int *)value == MODE_FALSE ? "no" : "yes"));
+ strcpy(value_string, (*(int *)value == STATE_ASK ? "ask" :
+ *(int *)value == STATE_FALSE ? "no" : "yes"));
break;
case TYPE_ECS_AGA:
#undef FALSE
#endif
-#ifdef MODE_AUTO
-#undef MODE_AUTO
+#ifdef STATE_AUTO
+#undef STATE_AUTO
#endif
-#ifdef MODE_ASK
-#undef MODE_ASK
+#ifdef STATE_ASK
+#undef STATE_ASK
#endif
// values for boolean data type
#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
+#define STATE_TRUE 1
+#define STATE_FALSE 0
+#define STATE_AUTO -1
+#define STATE_ASK -1
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
SetAnimationFirstLevel(leveldir_current->first_level);
// level_nr may have been set to value over handicap with level editor
- if (setup.allow_skipping_levels != MODE_TRUE && level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != STATE_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 != MODE_TRUE && new_level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != STATE_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 == old_level_nr + 1 &&
(level.bd_intermission ||
- (setup.allow_skipping_levels == MODE_ASK &&
+ (setup.allow_skipping_levels == STATE_ASK &&
Request("Level still unsolved! Skip it anyway?", REQ_ASK))))
{
leveldir_current->handicap_level++;
if (new_level_nr > leveldir_current->last_level)
new_level_nr = leveldir_current->last_level;
- if (setup.allow_skipping_levels != MODE_TRUE && new_level_nr > leveldir_current->handicap_level)
+ if (setup.allow_skipping_levels != STATE_TRUE && new_level_nr > leveldir_current->handicap_level)
new_level_nr = leveldir_current->handicap_level;
if (new_level_nr != old_level_nr)
else if (type & TYPE_BOOLEAN_STYLE)
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 == MODE_FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
+ return (*(int *)value == STATE_AUTO ? FONT_OPTION_ON :
+ *(int *)value == STATE_FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
else if (type & TYPE_YES_NO_ASK)
- return (*(int *)value == MODE_ASK ? FONT_OPTION_ON :
- *(int *)value == MODE_FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
+ return (*(int *)value == STATE_ASK ? FONT_OPTION_ON :
+ *(int *)value == STATE_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 ? 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));
+ (*(int *)si->value == STATE_AUTO ? STATE_TRUE :
+ *(int *)si->value == STATE_TRUE ? STATE_FALSE : STATE_AUTO) :
+ (*(int *)si->value == STATE_TRUE ? STATE_AUTO :
+ *(int *)si->value == STATE_AUTO ? STATE_FALSE : STATE_TRUE));
}
else if (si->type & TYPE_YES_NO_ASK)
{
*(int *)si->value =
(dx == -1 ?
- (*(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));
+ (*(int *)si->value == STATE_ASK ? STATE_TRUE :
+ *(int *)si->value == STATE_TRUE ? STATE_FALSE : STATE_ASK) :
+ (*(int *)si->value == STATE_TRUE ? STATE_ASK :
+ *(int *)si->value == STATE_ASK ? STATE_FALSE : STATE_TRUE));
}
else if (si->type & TYPE_KEY)
{