void DrawHeadline()
{
- int font1_width = getFontWidth(FONT_TITLE_1);
- int font2_width = getFontWidth(FONT_TITLE_2);
- int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * font1_width) / 2;
- int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * font2_width) / 2;
+ int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ int text2_width = getTextWidth(WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ int x1 = SX + (SXSIZE - text1_width) / 2;
+ int x2 = SX + (SXSIZE - text2_width) / 2;
DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
DrawText(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
{
static LevelDirTree *leveldir_last_valid = NULL;
char *name_text = (!options.network && setup.team_mode ? "Team:" : "Name:");
- int font_width = getFontWidth(FONT_MENU_1);
- int name_width = font_width * strlen("Name:");
- int level_width = font_width * strlen("Level:");
+ int name_width = getTextWidth("Name:", FONT_MENU_1);
+ int level_width = getTextWidth("Level:", FONT_MENU_1);
int i;
- printf("::: CHECK A: '%s'\n", leveldir_current->graphics_path);
-
UnmapAllGadgets();
FadeSounds();
/* needed if last screen was the setup screen and fullscreen state changed */
ToggleFullscreenIfNeeded();
- printf("::: CHECK B.1: '%s'\n", leveldir_current->graphics_path);
-
-#if 1
/* leveldir_current may be invalid (level group, parent link) */
if (!validLevelSeries(leveldir_current))
leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
/* store valid level series information */
leveldir_last_valid = leveldir_current;
-#endif
-
- printf("::: CHECK B.2: '%s'\n", leveldir_current->graphics_path);
/* needed if last screen (level choice) changed graphics, sounds or music */
ReloadCustomArtwork();
- printf("::: CHECK C: '%s'\n", leveldir_current->graphics_path);
-
#ifdef TARGET_SDL
SetDrawtoField(DRAW_BACKBUFFER);
#endif
/* map gadgets for main menu screen */
MapTapeButtons();
-#if 0
- /* leveldir_current may be invalid (level group, parent link) */
- if (!validLevelSeries(leveldir_current))
- leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
-
- /* store valid level series information */
- leveldir_last_valid = leveldir_current;
-#endif
-
/* level_nr may have been set to value over handicap with level editor */
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
/* move upwards to top level directory */
while (leveldir_current->node_parent)
{
- printf("::: ---> '%s'\n", leveldir_current->graphics_path);
-
/* write a "path" into level tree for easy navigation to last level */
if (leveldir_current->node_parent->node_group->cl_first == -1)
{
}
leveldir_current = leveldir_current->node_parent;
-
- printf("::: +++> '%s'\n", leveldir_current->graphics_path);
}
-
- printf("::: ===> '%s'\n", leveldir_current->graphics_path);
}
void HandleMainMenu(int mx, int my, int dx, int dy, int button)
SaveLevelSetup_LastSeries();
SaveLevelSetup_SeriesInfo();
- printf("::: CHECK C.1: '%s'\n", leveldir_current->graphics_path);
-
gotoTopLevelDir();
- printf("::: CHECK C.2: '%s'\n", leveldir_current->graphics_path);
-
DrawChooseLevel();
}
}