+2006-10-17
+ * added additional configuration directives for info screen draw offset:
+ menu.draw_{x,y}offset.INFO[{ELEMENTS,MUSIC,CREDITS,PROGRAM,LEVELSET}]
+
2006-10-16
* added highlighted menu text entries to menu navigation when selected
{ "menu.draw_yoffset.EDITOR", "0" },
{ "menu.draw_xoffset.INFO", "0" },
{ "menu.draw_yoffset.INFO", "0" },
+ { "menu.draw_xoffset.INFO[ELEMENTS]", "0" },
+ { "menu.draw_yoffset.INFO[ELEMENTS]", "0" },
+ { "menu.draw_xoffset.INFO[MUSIC]", "0" },
+ { "menu.draw_yoffset.INFO[MUSIC]", "0" },
+ { "menu.draw_xoffset.INFO[CREDITS]", "0" },
+ { "menu.draw_yoffset.INFO[CREDITS]", "0" },
+ { "menu.draw_xoffset.INFO[PROGRAM]", "0" },
+ { "menu.draw_yoffset.INFO[PROGRAM]", "0" },
+ { "menu.draw_xoffset.INFO[LEVELSET]", "0" },
+ { "menu.draw_yoffset.INFO[LEVELSET]", "0" },
{ "menu.draw_xoffset.SETUP", "0" },
{ "menu.draw_yoffset.SETUP", "0" },
{ "preview.y", "388" },
{ "preview.xsize", "66" },
{ "preview.ysize", "34" },
+ { "preview.xoffset", "0" },
+ { "preview.yoffset", "0" },
{ "preview.tile_size", "4" },
{ "preview.step_offset", "1" },
{ "preview.step_delay", "50" },
-#define COMPILE_DATE_STRING "[2006-10-17 02:38]"
+#define COMPILE_DATE_STRING "[2006-10-17 20:23]"
ToggleFullscreenIfNeeded();
+ if (game_status == GAME_MODE_SETUP)
+ RedrawSetupScreenAfterFullscreenToggle();
+
return;
}
menu.list_size[i] = get_integer_from_string(list_size);
}
+ /* special case: initialize with default values that may be overwritten */
+ for (i = 0; i < NUM_SPECIAL_GFX_INFO_ARGS; i++)
+ {
+ char *value_x = getHashEntry(setup_file_hash, "menu.draw_xoffset.INFO");
+ char *value_y = getHashEntry(setup_file_hash, "menu.draw_yoffset.INFO");
+
+ if (value_x != NULL)
+ menu.draw_xoffset_info[i] = get_integer_from_string(value_x);
+ if (value_y != NULL)
+ menu.draw_yoffset_info[i] = get_integer_from_string(value_y);
+ }
+
/* read (and overwrite with) values that may be specified in config file */
for (i = 0; image_config_vars[i].token != NULL; i++)
{
{ "menu.draw_yoffset.EDITOR", &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] },
{ "menu.draw_xoffset.INFO", &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO] },
{ "menu.draw_yoffset.INFO", &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO] },
+ { "menu.draw_xoffset.INFO[ELEMENTS]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] },
+ { "menu.draw_yoffset.INFO[ELEMENTS]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] },
+ { "menu.draw_xoffset.INFO[MUSIC]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] },
+ { "menu.draw_yoffset.INFO[MUSIC]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] },
+ { "menu.draw_xoffset.INFO[CREDITS]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] },
+ { "menu.draw_yoffset.INFO[CREDITS]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] },
+ { "menu.draw_xoffset.INFO[PROGRAM]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
+ { "menu.draw_yoffset.INFO[PROGRAM]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
+ { "menu.draw_xoffset.INFO[LEVELSET]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] },
+ { "menu.draw_yoffset.INFO[LEVELSET]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] },
{ "menu.draw_xoffset.SETUP", &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP] },
{ "menu.draw_yoffset.SETUP", &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP] },
{ "preview.y", &preview.y },
{ "preview.xsize", &preview.xsize },
{ "preview.ysize", &preview.ysize },
+ { "preview.xoffset", &preview.xoffset },
+ { "preview.yoffset", &preview.yoffset },
{ "preview.tile_size", &preview.tile_size },
{ "preview.step_offset", &preview.step_offset },
{ "preview.step_delay", &preview.step_delay },
#define NUM_SPECIAL_GFX_ARGS 12
+/* these additional definitions are currently only used for draw offsets */
+#define GFX_SPECIAL_ARG_INFO_MAIN 0
+#define GFX_SPECIAL_ARG_INFO_TITLE 1
+#define GFX_SPECIAL_ARG_INFO_ELEMENTS 2
+#define GFX_SPECIAL_ARG_INFO_MUSIC 3
+#define GFX_SPECIAL_ARG_INFO_CREDITS 4
+#define GFX_SPECIAL_ARG_INFO_PROGRAM 5
+#define GFX_SPECIAL_ARG_INFO_LEVELSET 6
+
+#define NUM_SPECIAL_GFX_INFO_ARGS 7
+
/* values for image configuration suffixes */
#define GFX_ARG_X 0
{
int draw_xoffset[NUM_SPECIAL_GFX_ARGS];
int draw_yoffset[NUM_SPECIAL_GFX_ARGS];
+ int draw_xoffset_info[NUM_SPECIAL_GFX_INFO_ARGS];
+ int draw_yoffset_info[NUM_SPECIAL_GFX_INFO_ARGS];
int scrollbar_xoffset;
{
int x, y;
int xsize, ysize;
+ int xoffset, yoffset;
int tile_size;
int step_offset;
int step_delay;
static TreeInfo *screen_modes = NULL;
static TreeInfo *screen_mode_current = NULL;
-#define DRAW_OFFSET_MODE(x) (x >= GAME_MODE_MAIN && \
- x <= GAME_MODE_SETUP ? x : \
- x == GAME_MODE_PSEUDO_TYPENAME ? \
+#define DRAW_MODE(s) ((s) >= GAME_MODE_MAIN && \
+ (s) <= GAME_MODE_SETUP ? (s) : \
+ (s) == GAME_MODE_PSEUDO_TYPENAME ? \
GAME_MODE_MAIN : GAME_MODE_DEFAULT)
-#define mSX (SX + menu.draw_xoffset[DRAW_OFFSET_MODE(game_status)])
-#define mSY (SY + menu.draw_yoffset[DRAW_OFFSET_MODE(game_status)])
+#define DRAW_MODE_INFO(i) ((i) >= INFO_MODE_ELEMENTS && \
+ (i) <= INFO_MODE_LEVELSET ? (i) : \
+ INFO_MODE_MAIN)
+
+#define DRAW_XOFFSET_INFO(i) (DRAW_MODE_INFO(i) == INFO_MODE_MAIN ? \
+ menu.draw_xoffset[GAME_MODE_INFO] : \
+ menu.draw_xoffset_info[DRAW_MODE_INFO(i)])
+#define DRAW_YOFFSET_INFO(i) (DRAW_MODE_INFO(i) == INFO_MODE_MAIN ? \
+ menu.draw_yoffset[GAME_MODE_INFO] : \
+ menu.draw_yoffset_info[DRAW_MODE_INFO(i)])
+
+#define DRAW_XOFFSET(s) ((s) == GAME_MODE_INFO ? \
+ DRAW_XOFFSET_INFO(info_mode) : \
+ menu.draw_xoffset[DRAW_MODE(s)])
+#define DRAW_YOFFSET(s) ((s) == GAME_MODE_INFO ? \
+ DRAW_YOFFSET_INFO(info_mode) : \
+ menu.draw_yoffset[DRAW_MODE(s)])
+
+#define mSX (SX + DRAW_XOFFSET(game_status))
+#define mSY (SY + DRAW_YOFFSET(game_status))
#define NUM_MENU_ENTRIES_ON_SCREEN (menu.list_size[game_status] > 2 ? \
menu.list_size[game_status] : \
PlayMenuMusic();
}
+void RedrawSetupScreenAfterFullscreenToggle()
+{
+ if (setup_mode == SETUP_MODE_GRAPHICS)
+ DrawSetupScreen();
+}
+
void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
{
if (setup_mode == SETUP_MODE_INPUT)
void DrawMainMenu(void);
void DrawHallOfFame(int);
+void RedrawSetupScreenAfterFullscreenToggle();
+
void HandleTitleScreen(int, int, int, int, int);
void HandleMainMenu(int, int, int, int, int);
void HandleChooseLevel(int, int, int, int, int);
if (restart)
{
- from_x = from_y = 0;
+ from_x = preview.xoffset;
+ from_y = preview.yoffset;
scroll_direction = MV_RIGHT;
label_state = 1;
label_counter = 0;