From: Holger Schemel Date: Mon, 29 Sep 2014 23:30:30 +0000 (+0200) Subject: fixed display bugs with certain custom menu definitions X-Git-Tag: 4.0.0.0-rc1~345 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2b8e172616210fa577b4ea3c4a777a3c09b40bb9;p=rocksndiamonds.git fixed display bugs with certain custom menu definitions --- diff --git a/ChangeLog b/ChangeLog index 948f2d24..cdf4fdbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-09-29 + * fixed display bugs with certain custom menu definitions regarding the + hall of fame (high scores) and setup screens that require scrolling + (these display bugs showed up with custom menu graphics of R'n'D jue) + 2014-09-28 * fixed bug with animation frames per line with non-standard tile size (relevant for example for 64x64 sized frames continued on next row) diff --git a/src/conftime.h b/src/conftime.h index 30924324..8aace495 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-09-28 20:37" +#define COMPILE_DATE_STRING "2014-09-30 01:29" diff --git a/src/screens.c b/src/screens.c index 61cb7106..b22e8299 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3763,7 +3763,7 @@ static void drawHallOfFameList(int first_entry, int highlight_position) int font_nr4 = (active ? FONT_TEXT_4_ACTIVE : FONT_TEXT_4); int dx1 = 3 * getFontWidth(font_nr1); int dx2 = dx1 + getFontWidth(font_nr1); - int dx3 = SXSIZE - 5 * getFontWidth(font_nr4); + int dx3 = SXSIZE - 2 * (mSX - SX) - 5 * getFontWidth(font_nr4); int num_dots = (dx3 - dx2) / getFontWidth(font_nr3); int sy = mSY + 64 + i * 32; @@ -5344,10 +5344,12 @@ static void DrawSetupScreen_Generic() DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string); + // determine maximal number of setup entries that can be displayed on screen num_setup_info = 0; - for (i = 0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++) + for (i = 0; setup_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++) num_setup_info++; + // determine maximal number of setup entries available for this setup screen max_setup_info = 0; for (i = 0; setup_info[i].type != 0; i++) max_setup_info++;