#define MENU_SCREEN_INFO_YSIZE (MENU_SCREEN_INFO_YBOTTOM - \
MENU_SCREEN_INFO_YSTART - \
TILEY / 2)
-#define MAX_INFO_ELEMENTS_ON_SCREEN 128
-#define STD_INFO_ELEMENTS_ON_SCREEN (MENU_SCREEN_INFO_YSIZE / \
+#define MAX_INFO_ELEMENTS_IN_ARRAY 128
+#define MAX_INFO_ELEMENTS_ON_SCREEN (SYSIZE / TILEY)
+#define MAX_INFO_ELEMENTS MIN(MAX_INFO_ELEMENTS_IN_ARRAY, \
+ MAX_INFO_ELEMENTS_ON_SCREEN)
+#define STD_INFO_ELEMENTS_ON_SCREEN 10
+#define DYN_INFO_ELEMENTS_ON_SCREEN (MENU_SCREEN_INFO_YSIZE / \
MENU_SCREEN_INFO_YSTEP)
-#define NUM_INFO_ELEMENTS_FROM_CONF \
+#define DEFAULT_INFO_ELEMENTS MIN(STD_INFO_ELEMENTS_ON_SCREEN,\
+ DYN_INFO_ELEMENTS_ON_SCREEN)
+#define NUM_INFO_ELEMENTS_FROM_CONF \
(menu.list_size_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] > 0 ? \
menu.list_size_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] : \
- MAX_MENU_ENTRIES_ON_SCREEN)
-#define NUM_INFO_ELEMENTS_ON_SCREEN MIN(MIN(STD_INFO_ELEMENTS_ON_SCREEN, \
- MAX_INFO_ELEMENTS_ON_SCREEN), \
- NUM_INFO_ELEMENTS_FROM_CONF)
+ DEFAULT_INFO_ELEMENTS)
+#define NUM_INFO_ELEMENTS_ON_SCREEN MIN(NUM_INFO_ELEMENTS_FROM_CONF,\
+ MAX_INFO_ELEMENTS)
#define MAX_MENU_ENTRIES_ON_SCREEN (SCR_FIELDY - MENU_SCREEN_START_YPOS)
#define MAX_MENU_TEXT_LENGTH_BIG 13
#define MAX_MENU_TEXT_LENGTH_MEDIUM (MAX_MENU_TEXT_LENGTH_BIG * 2)
void DrawInfoScreen_HelpAnim(int start, int max_anims, boolean init)
{
- static int infoscreen_step[MAX_INFO_ELEMENTS_ON_SCREEN];
- static int infoscreen_frame[MAX_INFO_ELEMENTS_ON_SCREEN];
+ static int infoscreen_step[MAX_INFO_ELEMENTS_IN_ARRAY];
+ static int infoscreen_frame[MAX_INFO_ELEMENTS_IN_ARRAY];
int font_foot = MENU_INFO_FONT_FOOT;
int xstart = mSX + MENU_SCREEN_INFO_SPACE_LEFT;
int ystart = mSY + MENU_SCREEN_INFO_YSTART;