-/* screens on the setup screen */
-/* (must match GFX_SPECIAL_ARG_SETUP_* values as defined in src/main.h) */
-/* (should also match corresponding entries in src/conf_gfx.c) */
+// screens on the setup screen
+// (must match GFX_SPECIAL_ARG_SETUP_* values as defined in src/main.h)
+// (should also match corresponding entries in src/conf_gfx.c)
#define SETUP_MODE_MAIN 0
#define SETUP_MODE_GAME 1
#define SETUP_MODE_EDITOR 2
#define SETUP_MODE_MAIN 0
#define SETUP_MODE_GAME 1
#define SETUP_MODE_EDITOR 2
#define SETUP_MODE_CHOOSE_GAME_SPEED 16
#define SETUP_MODE_CHOOSE_SCROLL_DELAY 17
#define SETUP_MODE_CHOOSE_SNAPSHOT_MODE 18
#define SETUP_MODE_CHOOSE_GAME_SPEED 16
#define SETUP_MODE_CHOOSE_SCROLL_DELAY 17
#define SETUP_MODE_CHOOSE_SNAPSHOT_MODE 18
#define STR_SETUP_MAIN "Setup"
#define STR_SETUP_GAME "Game & Menu"
#define STR_SETUP_EDITOR "Editor"
#define STR_SETUP_MAIN "Setup"
#define STR_SETUP_GAME "Game & Menu"
#define STR_SETUP_EDITOR "Editor"
#define STR_SETUP_CHOOSE_GRID_XSIZE_1 "Horiz. Buttons"
#define STR_SETUP_CHOOSE_GRID_YSIZE_1 "Vert. Buttons"
#define STR_SETUP_CHOOSE_GRID_XSIZE_1 "Horiz. Buttons"
#define STR_SETUP_CHOOSE_GRID_YSIZE_1 "Vert. Buttons"
#define SETUPINPUT_SCREEN_POS_START 0
#define SETUPINPUT_SCREEN_POS_EMPTY1 3
#define SETUPINPUT_SCREEN_POS_EMPTY2 12
#define SETUPINPUT_SCREEN_POS_START 0
#define SETUPINPUT_SCREEN_POS_EMPTY1 3
#define SETUPINPUT_SCREEN_POS_EMPTY2 12
#define MENU_SCREEN_START_XPOS 1
#define MENU_SCREEN_START_YPOS 2
#define MENU_SCREEN_VALUE_XPOS (SCR_FIELDX - 3)
#define MENU_SCREEN_START_XPOS 1
#define MENU_SCREEN_START_YPOS 2
#define MENU_SCREEN_VALUE_XPOS (SCR_FIELDX - 3)
#define MAX_MENU_TEXT_LENGTH_BIG 13
#define MAX_MENU_TEXT_LENGTH_MEDIUM (MAX_MENU_TEXT_LENGTH_BIG * 2)
#define MAX_MENU_TEXT_LENGTH_BIG 13
#define MAX_MENU_TEXT_LENGTH_MEDIUM (MAX_MENU_TEXT_LENGTH_BIG * 2)
#define SCREEN_CTRL_ID_PREV_LEVEL 0
#define SCREEN_CTRL_ID_NEXT_LEVEL 1
#define SCREEN_CTRL_ID_PREV_PLAYER 2
#define SCREEN_CTRL_ID_PREV_LEVEL 0
#define SCREEN_CTRL_ID_NEXT_LEVEL 1
#define SCREEN_CTRL_ID_PREV_PLAYER 2
static void HandleScreenGadgets(struct GadgetInfo *);
static void HandleSetupScreen_Generic(int, int, int, int, int);
static void HandleSetupScreen_Input(int, int, int, int, int);
static void HandleScreenGadgets(struct GadgetInfo *);
static void HandleSetupScreen_Generic(int, int, int, int, int);
static void HandleSetupScreen_Input(int, int, int, int, int);
title_controls[num_title_screens].local_nr = nr;
title_controls[num_title_screens].sort_priority = sort_priority;
title_controls[num_title_screens].local_nr = nr;
title_controls[num_title_screens].sort_priority = sort_priority;
qsort(title_controls, num_title_screens, sizeof(struct TitleControlInfo),
compareTitleControlInfo);
qsort(title_controls, num_title_screens, sizeof(struct TitleControlInfo),
compareTitleControlInfo);
sprintf(main_text_name, "%s", local_team_mode ? "Team:" : "Name:");
strcpy(main_text_first_level, int2str(leveldir_current->first_level,
sprintf(main_text_name, "%s", local_team_mode ? "Team:" : "Name:");
strcpy(main_text_first_level, int2str(leveldir_current->first_level,
main_text_title_2 = getConfigProgramCopyrightString();
main_text_title_3 = getConfigProgramCompanyString();
main_text_title_2 = getConfigProgramCopyrightString();
main_text_title_3 = getConfigProgramCompanyString();
DrawBackgroundForFont(x, y, pos->width, pos->height, font_text);
#endif
DrawText(x, y, text, font_text);
DrawBackgroundForFont(x, y, pos->width, pos->height, font_text);
#endif
DrawText(x, y, text, font_text);
DrawBackgroundForFont(x, y, pos->width, pos->height, font_input);
#endif
DrawText(x, y, input, font_input);
DrawBackgroundForFont(x, y, pos->width, pos->height, font_input);
#endif
DrawText(x, y, input, font_input);
DrawBackground(mSX, mSY + MENU_SCREEN_START_YPOS * 32,
scrollbar_xpos - mSX, NUM_MENU_ENTRIES_ON_SCREEN * 32);
}
DrawBackground(mSX, mSY + MENU_SCREEN_START_YPOS * 32,
scrollbar_xpos - mSX, NUM_MENU_ENTRIES_ON_SCREEN * 32);
}
if (tmi->chars == -1)
tmi->chars = tmi->width / getFontWidth(tmi->font);
else
tmi->width = tmi->chars * getFontWidth(tmi->font);
if (tmi->chars == -1)
tmi->chars = tmi->width / getFontWidth(tmi->font);
else
tmi->width = tmi->chars * getFontWidth(tmi->font);
if (tmi->lines == -1)
tmi->lines = tmi->height / getFontHeight(tmi->font);
else
tmi->height = tmi->lines * getFontHeight(tmi->font);
if (tmi->lines == -1)
tmi->lines = tmi->height / getFontHeight(tmi->font);
else
tmi->height = tmi->lines * getFontHeight(tmi->font);
InitializeTitleControls(show_title_initial);
if (setup.show_titlescreen && (show_title_initial || levelset_has_changed))
show_titlescreen = TRUE;
InitializeTitleControls(show_title_initial);
if (setup.show_titlescreen && (show_title_initial || levelset_has_changed))
show_titlescreen = TRUE;
// (moved to "execSetupGraphics()" to change fullscreen state directly)
// ToggleFullscreenOrChangeWindowScalingIfNeeded();
// (moved to "execSetupGraphics()" to change fullscreen state directly)
// ToggleFullscreenOrChangeWindowScalingIfNeeded();
if (!validLevelSeries(leveldir_current))
leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
if (leveldir_current != leveldir_last_valid)
levelset_has_changed = TRUE;
if (!validLevelSeries(leveldir_current))
leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
if (leveldir_current != leveldir_last_valid)
levelset_has_changed = TRUE;
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
MapTapeButtons();
MapScreenMenuGadgets(SCREEN_MASK_MAIN);
UpdateScreenMenuGadgets(SCREEN_MASK_MAIN_HAS_SOLUTION, hasSolutionTape());
MapTapeButtons();
MapScreenMenuGadgets(SCREEN_MASK_MAIN);
UpdateScreenMenuGadgets(SCREEN_MASK_MAIN_HAS_SOLUTION, hasSolutionTape());
BlitBitmap(drawto, bitmap_db_door_1, DX, DY, DXSIZE, DYSIZE, 0, 0);
BlitBitmap(drawto, bitmap_db_door_2, VX, VY, VXSIZE, VYSIZE, 0, 0);
BlitBitmap(drawto, bitmap_db_door_1, DX, DY, DXSIZE, DYSIZE, 0, 0);
BlitBitmap(drawto, bitmap_db_door_2, VX, VY, VXSIZE, VYSIZE, 0, 0);
while (leveldir_current->node_parent &&
!strEqual(leveldir_current->node_parent->subdir, STRING_TOP_DIRECTORY))
{
while (leveldir_current->node_parent &&
!strEqual(leveldir_current->node_parent->subdir, STRING_TOP_DIRECTORY))
{
if (leveldir_current->node_parent->node_group->cl_first == -1)
{
int num_leveldirs = numTreeInfoInGroup(leveldir_current);
if (leveldir_current->node_parent->node_group->cl_first == -1)
{
int num_leveldirs = numTreeInfoInGroup(leveldir_current);
game_status_last_screen = GAME_MODE_INFO;
DrawInfoScreen_NotAvailable("Title screen information:",
game_status_last_screen = GAME_MODE_INFO;
DrawInfoScreen_NotAvailable("Title screen information:",
if (setup.skip_levels && new_level_nr == old_level_nr + 1 &&
Request("Level still unsolved! Skip despite handicap?", REQ_ASK))
{
if (setup.skip_levels && new_level_nr == old_level_nr + 1 &&
Request("Level still unsolved! Skip despite handicap?", REQ_ASK))
{
-/* ========================================================================= */
-/* info screen functions */
-/* ========================================================================= */
+// ============================================================================
+// info screen functions
+// ============================================================================
-static int num_info_info; /* number of info entries shown on screen */
-static int max_info_info; /* total number of info entries in list */
+static int num_info_info; // number of info entries shown on screen
+static int max_info_info; // total number of info entries in list
if ((value_ptr == &setup.sound_simple && !audio.sound_available) ||
(value_ptr == &setup.sound_loops && !audio.loops_available) ||
(value_ptr == &setup.sound_music && !audio.music_available) ||
if ((value_ptr == &setup.sound_simple && !audio.sound_available) ||
(value_ptr == &setup.sound_loops && !audio.loops_available) ||
(value_ptr == &setup.sound_music && !audio.music_available) ||
int *num_page_entries_last = num_page_entries_all_last[game_status];
int *choice_store = choice_stores[game_status];
int *first_entry_store = first_entry_stores[game_status];
int *num_page_entries_last = num_page_entries_all_last[game_status];
int *choice_store = choice_stores[game_status];
int *first_entry_store = first_entry_stores[game_status];
- int choice = choice_store[mode]; /* starts with 0 */
- int first_entry = first_entry_store[mode]; /* starts with 0 */
+ int choice = choice_store[mode]; // starts with 0
+ int first_entry = first_entry_store[mode]; // starts with 0
if (dy == -1 * SCROLL_LINE && first_entry == 0)
dy = -1;
else if (dy == +1 * SCROLL_LINE &&
first_entry + num_page_entries == max_page_entries)
dy = 1;
if (dy == -1 * SCROLL_LINE && first_entry == 0)
dy = -1;
else if (dy == +1 * SCROLL_LINE &&
first_entry + num_page_entries == max_page_entries)
dy = 1;
while (first_entry + y > 0 &&
first_entry + y < max_page_entries - 1 &&
menu_info[first_entry + y].type & TYPE_SKIP_ENTRY)
while (first_entry + y > 0 &&
first_entry + y < max_page_entries - 1 &&
menu_info[first_entry + y].type & TYPE_SKIP_ENTRY)
if (menu_info[first_entry + y].type & TYPE_KEYTEXT &&
menu_info[first_entry + y + 1].type & TYPE_KEY)
y++;
if (menu_info[first_entry + y].type & TYPE_KEYTEXT &&
menu_info[first_entry + y + 1].type & TYPE_KEY)
y++;
if (menu_info[first_entry + y].type & TYPE_STRING && y > 0 &&
menu_info[first_entry + y - 1].type & TYPE_ENTER_LIST)
y--;
if (menu_info[first_entry + y].type & TYPE_STRING && y > 0 &&
menu_info[first_entry + y - 1].type & TYPE_ENTER_LIST)
y--;
if (menu_info[first_entry + y].type & TYPE_STRING && y > 0 &&
menu_info[first_entry + y - 1].type & TYPE_TEXT_INPUT)
y--;
if (menu_info[first_entry + y].type & TYPE_STRING && y > 0 &&
menu_info[first_entry + y - 1].type & TYPE_TEXT_INPUT)
y--;
ystart += getFontHeight(font_nr) / 2;
DrawTextBuffer(xstart, ystart + ypos * ystep, text, font_nr,
ystart += getFontHeight(font_nr) / 2;
DrawTextBuffer(xstart, ystart + ypos * ystep, text, font_nr,
if (tmi->chars == -1)
tmi->chars = tmi->width / getFontWidth(tmi->font);
else
tmi->width = tmi->chars * getFontWidth(tmi->font);
if (tmi->chars == -1)
tmi->chars = tmi->width / getFontWidth(tmi->font);
else
tmi->width = tmi->chars * getFontWidth(tmi->font);
-/* ========================================================================= */
-/* type name functions */
-/* ========================================================================= */
+// ============================================================================
+// type name functions
+// ============================================================================
-/* ========================================================================= */
-/* tree menu functions */
-/* ========================================================================= */
+// ============================================================================
+// tree menu functions
+// ============================================================================
ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
ti->cl_cursor = entry_pos - ti->cl_first;
}
ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
ti->cl_cursor = entry_pos - ti->cl_first;
}
ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
ti->cl_cursor = entry_pos - ti->cl_first;
}
ti->cl_first = MAX(0, entry_pos - num_page_entries + 1);
ti->cl_cursor = entry_pos - ti->cl_first;
}
if (dy == -1 * SCROLL_LINE && ti->cl_first == 0)
dy = -1;
else if (dy == +1 * SCROLL_LINE &&
ti->cl_first + num_page_entries == num_entries)
dy = 1;
if (dy == -1 * SCROLL_LINE && ti->cl_first == 0)
dy = -1;
else if (dy == +1 * SCROLL_LINE &&
ti->cl_first + num_page_entries == num_entries)
dy = 1;
-/* ========================================================================= */
-/* setup screen functions */
-/* ========================================================================= */
+// ============================================================================
+// setup screen functions
+// ============================================================================
-static int num_setup_info; /* number of setup entries shown on screen */
-static int max_setup_info; /* total number of setup entries in list */
+static int num_setup_info; // number of setup entries shown on screen
+static int max_setup_info; // total number of setup entries in list
if (game_speed_current == NULL)
game_speed_current =
getTreeInfoFromIdentifier(game_speeds, i_to_a(GAME_FRAME_DELAY));
if (game_speed_current == NULL)
game_speed_current =
getTreeInfoFromIdentifier(game_speeds, i_to_a(GAME_FRAME_DELAY));
if (scroll_delay_current == NULL)
scroll_delay_current =
getTreeInfoFromIdentifier(scroll_delays, i_to_a(STD_SCROLL_DELAY));
if (scroll_delay_current == NULL)
scroll_delay_current =
getTreeInfoFromIdentifier(scroll_delays, i_to_a(STD_SCROLL_DELAY));
if (scroll_delay_current == NULL)
scroll_delay_current = scroll_delays;
}
setup.scroll_delay_value = atoi(scroll_delay_current->identifier);
if (scroll_delay_current == NULL)
scroll_delay_current = scroll_delays;
}
setup.scroll_delay_value = atoi(scroll_delay_current->identifier);
if (snapshot_mode_current == NULL)
snapshot_mode_current =
getTreeInfoFromIdentifier(snapshot_modes, STR_SNAPSHOT_MODE_DEFAULT);
if (snapshot_mode_current == NULL)
snapshot_mode_current =
getTreeInfoFromIdentifier(snapshot_modes, STR_SNAPSHOT_MODE_DEFAULT);
if (snapshot_mode_current == NULL)
snapshot_mode_current = snapshot_modes;
}
setup.engine_snapshot_mode = snapshot_mode_current->identifier;
if (snapshot_mode_current == NULL)
snapshot_mode_current = snapshot_modes;
}
setup.engine_snapshot_mode = snapshot_mode_current->identifier;
window_size_current =
getTreeInfoFromIdentifier(window_sizes,
i_to_a(setup.window_scaling_percent));
window_size_current =
getTreeInfoFromIdentifier(window_sizes,
i_to_a(setup.window_scaling_percent));
if (window_size_current == NULL)
window_size_current =
getTreeInfoFromIdentifier(window_sizes,
i_to_a(STD_WINDOW_SCALING_PERCENT));
if (window_size_current == NULL)
window_size_current =
getTreeInfoFromIdentifier(window_sizes,
i_to_a(STD_WINDOW_SCALING_PERCENT));
if (window_size_current == NULL)
window_size_current = window_sizes;
}
setup.window_scaling_percent = atoi(window_size_current->identifier);
if (window_size_current == NULL)
window_size_current = window_sizes;
}
setup.window_scaling_percent = atoi(window_size_current->identifier);
if (scaling_type_current == NULL)
scaling_type_current =
getTreeInfoFromIdentifier(scaling_types, SCALING_QUALITY_DEFAULT);
if (scaling_type_current == NULL)
scaling_type_current =
getTreeInfoFromIdentifier(scaling_types, SCALING_QUALITY_DEFAULT);
if (scaling_type_current == NULL)
scaling_type_current = scaling_types;
}
setup.window_scaling_quality = scaling_type_current->identifier;
if (scaling_type_current == NULL)
scaling_type_current = scaling_types;
}
setup.window_scaling_quality = scaling_type_current->identifier;
if (rendering_mode_current == NULL)
rendering_mode_current =
getTreeInfoFromIdentifier(rendering_modes,
STR_SPECIAL_RENDERING_DEFAULT);
if (rendering_mode_current == NULL)
rendering_mode_current =
getTreeInfoFromIdentifier(rendering_modes,
STR_SPECIAL_RENDERING_DEFAULT);
if (rendering_mode_current == NULL)
rendering_mode_current = rendering_modes;
}
setup.screen_rendering_mode = rendering_mode_current->identifier;
if (rendering_mode_current == NULL)
rendering_mode_current = rendering_modes;
}
setup.screen_rendering_mode = rendering_mode_current->identifier;
if (vsync_mode_current == NULL)
vsync_mode_current =
getTreeInfoFromIdentifier(vsync_modes, STR_VSYNC_MODE_DEFAULT);
if (vsync_mode_current == NULL)
vsync_mode_current =
getTreeInfoFromIdentifier(vsync_modes, STR_VSYNC_MODE_DEFAULT);
if (vsync_mode_current == NULL)
vsync_mode_current = vsync_modes;
}
setup.vsync_mode = vsync_mode_current->identifier;
if (vsync_mode_current == NULL)
vsync_mode_current = vsync_modes;
}
setup.vsync_mode = vsync_mode_current->identifier;
if (volume_simple_current == NULL)
volume_simple_current =
getTreeInfoFromIdentifier(volumes_simple, i_to_a(100));
if (volume_simple_current == NULL)
volume_simple_current =
getTreeInfoFromIdentifier(volumes_simple, i_to_a(100));
if (volume_loops_current == NULL)
volume_loops_current =
getTreeInfoFromIdentifier(volumes_loops, i_to_a(100));
if (volume_loops_current == NULL)
volume_loops_current =
getTreeInfoFromIdentifier(volumes_loops, i_to_a(100));
if (volume_music_current == NULL)
volume_music_current =
getTreeInfoFromIdentifier(volumes_music, i_to_a(100));
if (volume_music_current == NULL)
volume_music_current =
getTreeInfoFromIdentifier(volumes_music, i_to_a(100));
setup.volume_loops = atoi(volume_loops_current->identifier);
setup.volume_music = atoi(volume_music_current->identifier);
setup.volume_loops = atoi(volume_loops_current->identifier);
setup.volume_music = atoi(volume_music_current->identifier);
volume_simple_text = volume_simple_current->name;
volume_loops_text = volume_loops_current->name;
volume_music_text = volume_music_current->name;
volume_simple_text = volume_simple_current->name;
volume_loops_text = volume_loops_current->name;
volume_music_text = volume_music_current->name;
if (touch_control_current == NULL)
touch_control_current =
getTreeInfoFromIdentifier(touch_controls, TOUCH_CONTROL_DEFAULT);
if (touch_control_current == NULL)
touch_control_current =
getTreeInfoFromIdentifier(touch_controls, TOUCH_CONTROL_DEFAULT);
move_distance_current =
getTreeInfoFromIdentifier(move_distances,
i_to_a(setup.touch.move_distance));
move_distance_current =
getTreeInfoFromIdentifier(move_distances,
i_to_a(setup.touch.move_distance));
if (move_distance_current == NULL)
move_distance_current =
getTreeInfoFromIdentifier(move_distances,
i_to_a(TOUCH_MOVE_DISTANCE_DEFAULT));
if (move_distance_current == NULL)
move_distance_current =
getTreeInfoFromIdentifier(move_distances,
i_to_a(TOUCH_MOVE_DISTANCE_DEFAULT));
drop_distance_current =
getTreeInfoFromIdentifier(drop_distances,
i_to_a(setup.touch.drop_distance));
drop_distance_current =
getTreeInfoFromIdentifier(drop_distances,
i_to_a(setup.touch.drop_distance));
if (drop_distance_current == NULL)
drop_distance_current =
getTreeInfoFromIdentifier(drop_distances,
i_to_a(TOUCH_DROP_DISTANCE_DEFAULT));
if (drop_distance_current == NULL)
drop_distance_current =
getTreeInfoFromIdentifier(drop_distances,
i_to_a(TOUCH_DROP_DISTANCE_DEFAULT));
transparency_current =
getTreeInfoFromIdentifier(transparencies,
i_to_a(setup.touch.transparency));
transparency_current =
getTreeInfoFromIdentifier(transparencies,
i_to_a(setup.touch.transparency));
if (transparency_current == NULL)
transparency_current =
getTreeInfoFromIdentifier(transparencies,
i_to_a(TOUCH_TRANSPARENCY_DEFAULT));
if (transparency_current == NULL)
transparency_current =
getTreeInfoFromIdentifier(transparencies,
i_to_a(TOUCH_TRANSPARENCY_DEFAULT));
grid_size_current[i][j] =
getTreeInfoFromIdentifier(grid_sizes[i][j],
i_to_a(j == 0 ?
setup.touch.grid_xsize[i] :
setup.touch.grid_ysize[i]));
grid_size_current[i][j] =
getTreeInfoFromIdentifier(grid_sizes[i][j],
i_to_a(j == 0 ?
setup.touch.grid_xsize[i] :
setup.touch.grid_ysize[i]));
if (grid_size_current[i][j] == NULL)
grid_size_current[i][j] =
getTreeInfoFromIdentifier(grid_sizes[i][j],
if (grid_size_current[i][j] == NULL)
grid_size_current[i][j] =
getTreeInfoFromIdentifier(grid_sizes[i][j],
touch_controls_text = touch_control_current->name;
move_distance_text = move_distance_current->name;
drop_distance_text = drop_distance_current->name;
touch_controls_text = touch_control_current->name;
move_distance_text = move_distance_current->name;
drop_distance_text = drop_distance_current->name;
setup.sounds_set = artwork.snd_current->identifier;
setup.music_set = artwork.mus_current->identifier;
setup.sounds_set = artwork.snd_current->identifier;
setup.music_set = artwork.mus_current->identifier;
graphics_set_name = artwork.gfx_current->name;
sounds_set_name = artwork.snd_current->name;
music_set_name = artwork.mus_current->name;
graphics_set_name = artwork.gfx_current->name;
sounds_set_name = artwork.snd_current->name;
music_set_name = artwork.mus_current->name;
if (setup.game_speed_extended)
setup.game_frame_delay = (setup.game_frame_delay == 15 ? 16 :
setup.game_frame_delay == 30 ? 29 :
if (setup.game_speed_extended)
setup.game_frame_delay = (setup.game_frame_delay == 15 ? 16 :
setup.game_frame_delay == 30 ? 29 :
if (setup_mode != SETUP_MODE_INPUT)
{
int max_menu_text_length_big = (menu_screen_value_xpos -
MENU_SCREEN_START_XPOS);
int max_menu_text_length_medium = max_menu_text_length_big * 2;
if (setup_mode != SETUP_MODE_INPUT)
{
int max_menu_text_length_big = (menu_screen_value_xpos -
MENU_SCREEN_START_XPOS);
int max_menu_text_length_medium = max_menu_text_length_big * 2;
int font1_xoffset = getFontBitmapInfo(font_nr)->draw_xoffset;
int font2_xoffset = getFontBitmapInfo(check_font_nr)->draw_xoffset;
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
int font1_xoffset = getFontBitmapInfo(font_nr)->draw_xoffset;
int font2_xoffset = getFontBitmapInfo(check_font_nr)->draw_xoffset;
int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
startx + font2_xoffset < text_startx + text_width + text_font_xoffset)
correct_font_draw_xoffset = TRUE;
startx + font2_xoffset < text_startx + text_width + text_font_xoffset)
correct_font_draw_xoffset = TRUE;
- /* check if setup value would overlap with setup text when printed */
- /* (this can happen for extreme/wrong values for font draw offset) */
+ // check if setup value would overlap with setup text when printed
+ // (this can happen for extreme/wrong values for font draw offset)
checked_free(setup_info_final);
setup_info_final = checked_calloc(list_size * sizeof(struct TokenInfo));
checked_free(setup_info_final);
setup_info_final = checked_calloc(list_size * sizeof(struct TokenInfo));
setup_info = getSetupInfoFinal(setup_info);
DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
setup_info = getSetupInfoFinal(setup_info);
DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
MapScreenMenuGadgets(SCREEN_MASK_INPUT);
HandleSetupScreen_Input(0, 0, 0, 0, MB_MENU_INITIALIZE);
MapScreenMenuGadgets(SCREEN_MASK_INPUT);
HandleSetupScreen_Input(0, 0, 0, 0, MB_MENU_INITIALIZE);
*customize_step[step_nr].key = key;
DrawText(mSX + 4 * 32, mSY + (2 + 2 * step_nr + 1) * 32,
" ", font_nr_new);
*customize_step[step_nr].key = key;
DrawText(mSX + 4 * 32, mSY + (2 + 2 * step_nr + 1) * 32,
" ", font_nr_new);
DrawText(mSX, mSY + (2 + 2 * (step_nr - 1)) * 32,
customize_step[step_nr - 1].text, FONT_MENU_1);
DrawText(mSX, mSY + (2 + 2 * (step_nr - 1) + 1) * 32,
"Key:", FONT_MENU_1);
DrawText(mSX, mSY + (2 + 2 * (step_nr - 1)) * 32,
customize_step[step_nr - 1].text, FONT_MENU_1);
DrawText(mSX, mSY + (2 + 2 * (step_nr - 1) + 1) * 32,
"Key:", FONT_MENU_1);
DrawText(mSX, mSY + (2 + 2 * step_nr) * 32,
customize_step[step_nr].text, FONT_INPUT_1_ACTIVE);
DrawText(mSX, mSY + (2 + 2 * step_nr + 1) * 32,
DrawText(mSX, mSY + (2 + 2 * step_nr) * 32,
customize_step[step_nr].text, FONT_INPUT_1_ACTIVE);
DrawText(mSX, mSY + (2 + 2 * step_nr + 1) * 32,
Error(ERR_DEBUG, "watching joystick %d: (%s)\n",
SDL_JoystickInstanceID(joystick), name);
Error(ERR_DEBUG, "joystick has %d axes, %d hats, %d balls, and %d buttons\n",
Error(ERR_DEBUG, "watching joystick %d: (%s)\n",
SDL_JoystickInstanceID(joystick), name);
Error(ERR_DEBUG, "joystick has %d axes, %d hats, %d balls, and %d buttons\n",
SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), temp, sizeof(temp));
snprintf(mapping, sizeof(mapping), "%s,%s,platform:%s,",
temp, name, SDL_GetPlatform());
SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), temp, sizeof(temp));
snprintf(mapping, sizeof(mapping), "%s,%s,platform:%s,",
temp, name, SDL_GetPlatform());
prev_step = &steps[i - 1];
strcpy(mapping, prev_step->mapping);
i--;
prev_step = &steps[i - 1];
strcpy(mapping, prev_step->mapping);
i--;
- -1, -1, /* these values are not constant, but can change at runtime */
+ -1, -1, // these values are not constant, but can change at runtime
SCREEN_CTRL_ID_SCROLL_UP,
"scroll up"
},
{
IMG_MENU_BUTTON_DOWN, IMG_MENU_BUTTON_DOWN_ACTIVE,
SCREEN_CTRL_ID_SCROLL_UP,
"scroll up"
},
{
IMG_MENU_BUTTON_DOWN, IMG_MENU_BUTTON_DOWN_ACTIVE,
- -1, -1, /* these values are not constant, but can change at runtime */
+ -1, -1, // these values are not constant, but can change at runtime
- -1, -1, /* these values are not constant, but can change at runtime */
- -1, -1, /* these values are not constant, but can change at runtime */
+ -1, -1, // these values are not constant, but can change at runtime
+ -1, -1, // these values are not constant, but can change at runtime
GD_TYPE_SCROLLBAR_VERTICAL,
SCREEN_CTRL_ID_SCROLL_VERTICAL,
"scroll level series vertically"
GD_TYPE_SCROLLBAR_VERTICAL,
SCREEN_CTRL_ID_SCROLL_VERTICAL,
"scroll level series vertically"
- -1, -1, /* these values are not constant, but can change at runtime */
+ -1, -1, // these values are not constant, but can change at runtime
MAX_SETUP_TEXT_INPUT_LEN,
network_server_hostname,
"Network Server Hostname / IP"
MAX_SETUP_TEXT_INPUT_LEN,
network_server_hostname,
"Network Server Hostname / IP"
scrollbutton_info[0].x = SC_SCROLL_UP_XPOS;
scrollbutton_info[0].y = SC_SCROLL_UP_YPOS;
scrollbutton_info[1].x = SC_SCROLL_DOWN_XPOS;
scrollbutton_info[0].x = SC_SCROLL_UP_XPOS;
scrollbutton_info[0].y = SC_SCROLL_UP_YPOS;
scrollbutton_info[1].x = SC_SCROLL_DOWN_XPOS;
scrollbar_info[0].x = SC_SCROLL_VERTICAL_XPOS;
scrollbar_info[0].y = SC_SCROLL_VERTICAL_YPOS;
scrollbar_info[0].width = SC_SCROLL_VERTICAL_XSIZE;
scrollbar_info[0].x = SC_SCROLL_VERTICAL_XPOS;
scrollbar_info[0].y = SC_SCROLL_VERTICAL_YPOS;
scrollbar_info[0].width = SC_SCROLL_VERTICAL_XSIZE;