From 7fef480c8c176f831187052444e5a8a02403a898 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 25 Mar 2018 01:17:37 +0100 Subject: [PATCH] replaced some info screen positions with already defined symbolic names --- src/screens.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/screens.c b/src/screens.c index e20f4deb..f5b450e4 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2600,9 +2600,9 @@ void DrawInfoScreen_NotAvailable(char *text_title, char *text_error) int font_foot = MENU_INFO_FONT_FOOT; int spacing_title = menu.headline1_spacing_info[info_mode]; int ystep_title = getMenuTextStep(spacing_title, font_title); - int ystart1 = mSY - SY + 100; + int ystart1 = mSY - SY + MENU_SCREEN_INFO_YSTART1; int ystart2 = ystart1 + ystep_title; - int ybottom = mSY - SY + SYSIZE - 20; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO); @@ -2756,7 +2756,7 @@ void DrawInfoScreen_HelpText(int element, int action, int direction, int ypos) int font_width = getFontWidth(font_nr); int font_height = getFontHeight(font_nr); int yoffset = (TILEX - 2 * font_height) / 2; - int xstart = mSX + MINI_TILEX + TILEX + MINI_TILEX; + int xstart = mSX + MENU_SCREEN_INFO_XSTART + TILEX + MINI_TILEX; int ystart = mSY + MENU_SCREEN_INFO_YSTART2 + yoffset; int ystep = TILEY + 4; int pad_x = xstart - SX; @@ -2919,8 +2919,8 @@ void HandleInfoScreen_Music(int button) int spacing_head = menu.headline2_spacing_info[info_mode]; int ystep_title = getMenuTextStep(spacing_title, font_title); int ystep_head = getMenuTextStep(spacing_head, font_head); - int ystart = mSY - SY + 100; - int ybottom = mSY - SY + SYSIZE - 20; + int ystart = mSY - SY + MENU_SCREEN_INFO_YSTART1; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; if (button == MB_MENU_INITIALIZE) { @@ -3081,8 +3081,8 @@ static void DrawInfoScreen_CreditsScreen(int screen_nr) int ystep_head = getMenuTextStep(spacing_head, font_head); int ystep_para = getMenuTextStep(spacing_para, font_text); int ystep_line = getMenuTextStep(spacing_line, font_text); - int ystart = mSY - SY + 100; - int ybottom = mSY - SY + SYSIZE - 20; + int ystart = mSY - SY + MENU_SCREEN_INFO_YSTART1; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; ClearField(); DrawHeadline(); @@ -3382,8 +3382,8 @@ void DrawInfoScreen_Program() int ystep_head = getMenuTextStep(spacing_head, font_head); int ystep_para = getMenuTextStep(spacing_para, font_text); int ystep_line = getMenuTextStep(spacing_line, font_text); - int ystart = mSY - SY + 100; - int ybottom = mSY - SY + SYSIZE - 20; + int ystart = mSY - SY + MENU_SCREEN_INFO_YSTART1; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_PROGRAM); @@ -3468,8 +3468,8 @@ void DrawInfoScreen_Version() int ystep_head = getMenuTextStep(spacing_head, font_head); int ystep_para = getMenuTextStep(spacing_para, font_text); int ystep_line = getMenuTextStep(spacing_line, font_text); - int ystart = mSY - SY + 100; - int ybottom = mSY - SY + SYSIZE - 20; + int ystart = mSY - SY + MENU_SCREEN_INFO_YSTART1; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; int xstart1 = mSX - SX + 2 * xstep; int xstart2 = mSX - SX + 18 * xstep; int xstart3 = mSX - SX + 28 * xstep; @@ -3655,8 +3655,8 @@ void DrawInfoScreen_LevelSet() struct TitleMessageInfo *tmi = &readme; char *filename = getLevelSetInfoFilename(); char *title = "Level Set Information:"; - int ystart = mSY - SY + 100; - int ybottom = mSY - SY + SYSIZE - 20; + int ystart = mSY - SY + MENU_SCREEN_INFO_YSTART1; + int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM; if (filename == NULL) { @@ -3688,7 +3688,7 @@ void DrawInfoScreen_LevelSet() /* if height set to "-1", automatically determine by playfield height */ if (tmi->height == -1) - tmi->height = SYSIZE - 20 - tmi->y - 10; + tmi->height = MENU_SCREEN_INFO_YBOTTOM - tmi->y - 10; /* if chars set to "-1", automatically determine by text and font width */ if (tmi->chars == -1) -- 2.34.1