#define MENU_INFO_FONT_TEXT FONT_TEXT_3
#define MENU_INFO_FONT_FOOT FONT_TEXT_4
#define MENU_INFO_SPACE_HEAD (menu.headline2_spacing_info[info_mode])
-#define MENU_SCREEN_INFO_XSTART 16
-#define MENU_SCREEN_INFO_YSTART1 100
+#define MENU_SCREEN_INFO_SPACE_LEFT (menu.left_spacing_info[info_mode])
+#define MENU_SCREEN_INFO_SPACE_RIGHT (menu.right_spacing_info[info_mode])
+#define MENU_SCREEN_INFO_SPACE_TOP (menu.top_spacing_info[info_mode])
+#define MENU_SCREEN_INFO_SPACE_BOTTOM (menu.bottom_spacing_info[info_mode])
+#define MENU_SCREEN_INFO_YSTART1 MENU_SCREEN_INFO_SPACE_TOP
#define MENU_SCREEN_INFO_YSTART2 (MENU_SCREEN_INFO_YSTART1 + \
getMenuTextStep(MENU_INFO_SPACE_HEAD, \
MENU_INFO_FONT_TITLE))
#define MENU_SCREEN_INFO_YSTEP (TILEY + 4)
-#define MENU_SCREEN_INFO_YBOTTOM (SYSIZE - 20)
+#define MENU_SCREEN_INFO_YBOTTOM (SYSIZE - MENU_SCREEN_INFO_SPACE_BOTTOM)
#define MENU_SCREEN_INFO_YSIZE (MENU_SCREEN_INFO_YBOTTOM - \
MENU_SCREEN_INFO_YSTART2 - \
TILEY / 2)
char *text;
} scaling_types_list[] =
{
- { SCALING_QUALITY_NEAREST, "None" },
+ { SCALING_QUALITY_NEAREST, "Off" },
{ SCALING_QUALITY_LINEAR, "Linear" },
{ SCALING_QUALITY_BEST, "Anisotropic" },
char *text;
} touch_controls_list[] =
{
+ { TOUCH_CONTROL_OFF, "Off" },
{ TOUCH_CONTROL_VIRTUAL_BUTTONS, "Virtual Buttons" },
{ TOUCH_CONTROL_WIPE_GESTURES, "Wipe Gestures" },
{ TOUCH_CONTROL_FOLLOW_FINGER, "Follow Finger" },
static char *main_text_level_imported_from = NULL;
static char *main_text_level_imported_by = NULL;
static char *main_text_level_tested_by = NULL;
+static char *main_text_title_1 = NULL;
+static char *main_text_title_2 = NULL;
+static char *main_text_title_3 = NULL;
struct MainControlInfo
{
{
MAIN_CONTROL_TITLE_1,
NULL, -1,
- &menu.main.text.title_1, &setup.internal.program_title,
+ &menu.main.text.title_1, &main_text_title_1,
NULL, NULL,
},
{
MAIN_CONTROL_TITLE_2,
NULL, -1,
- &menu.main.text.title_2, &setup.internal.program_copyright,
+ &menu.main.text.title_2, &main_text_title_2,
NULL, NULL,
},
{
MAIN_CONTROL_TITLE_3,
NULL, -1,
- &menu.main.text.title_3, &setup.internal.program_company,
+ &menu.main.text.title_3, &main_text_title_3,
NULL, NULL,
},
main_text_level_imported_by = leveldir_current->imported_by;
main_text_level_tested_by = leveldir_current->tested_by;
+ main_text_title_1 = getConfigProgramTitleString();
+ main_text_title_2 = getConfigProgramCopyrightString();
+ main_text_title_3 = getConfigProgramCompanyString();
+
/* set main control screen positions to dynamically determined values */
for (i = 0; main_controls[i].nr != -1; i++)
{
void DrawHeadline()
{
- DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, getProgramTitleString());
- DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2,
- setup.internal.program_copyright);
+ DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, main_text_title_1);
+ DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, main_text_title_2);
}
void DrawTitleScreenImage(int nr, boolean initial)
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);
static int infoscreen_frame[MAX_INFO_ELEMENTS_ON_SCREEN];
int font_title = MENU_INFO_FONT_TITLE;
int font_foot = MENU_INFO_FONT_FOOT;
- int xstart = mSX + MENU_SCREEN_INFO_XSTART;
+ int xstart = mSX + MENU_SCREEN_INFO_SPACE_LEFT;
int ystart1 = mSY - SY + MENU_SCREEN_INFO_YSTART1;
int ystart2 = mSY + MENU_SCREEN_INFO_YSTART2;
int ybottom = mSY - SY + MENU_SCREEN_INFO_YBOTTOM;
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_SPACE_LEFT + TILEX + MINI_TILEX;
int ystart = mSY + MENU_SCREEN_INFO_YSTART2 + yoffset;
int ystep = TILEY + 4;
- int pad_x = xstart - SX;
- int max_chars_per_line = (SXSIZE - pad_x - MINI_TILEX) / font_width;
+ int pad_left = xstart - SX;
+ int pad_right = MENU_SCREEN_INFO_SPACE_RIGHT;
+ int max_chars_per_line = (SXSIZE - pad_left - pad_right) / font_width;
int max_lines_per_text = 2;
char *text = NULL;
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)
{
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();
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);
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;
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)
{
/* 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)
void HandleGameActions()
{
+ if (game.restart_game_message != NULL)
+ RequestRestartGame(game.restart_game_message);
+
if (game_status != GAME_MODE_PLAYING)
return;