ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
if (DrawingOnBackground(dst_x, dst_y))
+ {
+ SetClipOrigin(bitmap, bitmap->stored_clip_gc, dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
+ }
else
BlitBitmap(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
level_nr = leveldir_current->handicap_level;
LoadLevel(level_nr);
+ LoadScore(level_nr);
SetMainBackgroundImage(IMG_BACKGROUND_MAIN);
}
else if (pos == MAIN_CONTROL_GAME)
{
- StartGameActions(options.network, setup.autorecord, NEW_RANDOMIZE);
+ StartGameActions(options.network, setup.autorecord, level.random_seed);
}
else if (pos == MAIN_CONTROL_SETUP)
{
if (info_info[choice].type & menu_navigation_type ||
info_info[choice].type & TYPE_ENTER_SCREEN ||
- info_info[choice].type & TYPE_BOOLEAN_STYLE)
+ info_info[choice].type & TYPE_BOOLEAN_STYLE ||
+ info_info[choice].type & TYPE_YES_NO_AUTO)
button = MB_MENU_CHOICE;
}
else if (dy)
static void execSetupArtwork()
{
+#if 0
+ printf("::: '%s', '%s', '%s'\n",
+ artwork.gfx_current->subdir,
+ artwork.gfx_current->fullpath,
+ artwork.gfx_current->basepath);
+#endif
+
setup.graphics_set = artwork.gfx_current->identifier;
setup.sounds_set = artwork.snd_current->identifier;
setup.music_set = artwork.mus_current->identifier;
{ TYPE_STRING, &music_set_name, "" },
{ TYPE_EMPTY, NULL, "" },
#if 1
+#if 1
+ { TYPE_YES_NO_AUTO,&setup.override_level_graphics,"Override Level Graphics:"},
+ { TYPE_YES_NO_AUTO,&setup.override_level_sounds, "Override Level Sounds:" },
+ { TYPE_YES_NO_AUTO,&setup.override_level_music, "Override Level Music:" },
+#else
{ TYPE_YES_NO, &setup.override_level_graphics,"Override Level Graphics:" },
{ TYPE_YES_NO, &setup.override_level_sounds, "Override Level Sounds:" },
{ TYPE_YES_NO, &setup.override_level_music, "Override Level Music:" },
+ { TYPE_YES_NO, &setup.auto_override_artwork, "Auto-Override Non-CE Sets:" },
+#endif
#else
{ TYPE_STRING, NULL, "Override Level Artwork:"},
{ TYPE_YES_NO, &setup.override_level_graphics, "Graphics:" },
static int getSetupTextFont(int type)
{
- if (type & (TYPE_SWITCH |
- TYPE_YES_NO |
- TYPE_STRING |
- TYPE_ECS_AGA |
- TYPE_KEYTEXT |
+ if (type & (TYPE_SWITCH |
+ TYPE_YES_NO |
+ TYPE_YES_NO_AUTO |
+ TYPE_STRING |
+ TYPE_ECS_AGA |
+ TYPE_KEYTEXT |
TYPE_ENTER_LIST))
return FONT_MENU_2;
else
return FONT_VALUE_1;
else if (type & TYPE_BOOLEAN_STYLE)
return (*(boolean *)value ? FONT_OPTION_ON : FONT_OPTION_OFF);
+ else if (type & TYPE_YES_NO_AUTO)
+ return (*(int *)value == AUTO ? FONT_OPTION_ON :
+ *(int *)value == FALSE ? FONT_OPTION_OFF : FONT_OPTION_ON);
else
return FONT_VALUE_1;
}
int ypos = MENU_SCREEN_START_YPOS + pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
- int font_nr, font_width;
+ int font_nr, font_width, font_height;
int type = setup_info[pos].type;
void *value = setup_info[pos].value;
char *value_string = getSetupValue(type, value);
+#if 1
int i;
+#endif
if (value_string == NULL)
return;
xpos = MENU_SCREEN_START_XPOS;
if (type & TYPE_QUERY)
- {
value_string = "<press key>";
- }
}
else if (type & TYPE_STRING)
{
if (strlen(value_string) > max_value_len)
value_string[max_value_len] = '\0';
}
+ else if (type & TYPE_YES_NO_AUTO)
+ {
+ xpos = MENU_SCREEN_VALUE_XPOS - 1;
+ }
startx = mSX + xpos * 32;
starty = mSY + ypos * 32;
font_nr = getSetupValueFont(type, value);
font_width = getFontWidth(font_nr);
+ font_height = getFontHeight(font_nr);
/* downward compatibility correction for Juergen Bonhagen's menu settings */
if (setup_mode != SETUP_MODE_INPUT)
}
}
+#if 0
+ DrawBackground(startx, starty, SX + SXSIZE - startx, font_height);
+#else
for (i = 0; i <= MENU_SCREEN_MAX_XPOS - xpos; i++)
DrawText(startx + i * font_width, starty, " ", font_nr);
+#endif
DrawText(startx, starty, value_string, font_nr);
getFontBitmapInfo(font_nr)->draw_xoffset = font_draw_xoffset_old;
}
-static void changeSetupValue(int pos)
+static void changeSetupValue(int pos, int dx)
{
if (setup_info[pos].type & TYPE_BOOLEAN_STYLE)
{
*(boolean *)setup_info[pos].value ^= TRUE;
}
+ else if (setup_info[pos].type & TYPE_YES_NO_AUTO)
+ {
+ *(int *)setup_info[pos].value =
+ (dx == -1 ?
+ (*(int *)setup_info[pos].value == AUTO ? TRUE :
+ *(int *)setup_info[pos].value == TRUE ? FALSE : AUTO) :
+ (*(int *)setup_info[pos].value == TRUE ? AUTO :
+ *(int *)setup_info[pos].value == AUTO ? FALSE : TRUE));
+ }
else if (setup_info[pos].type & TYPE_KEY)
{
Key key;
int menu_navigation_type = (dx < 0 ? TYPE_LEAVE : TYPE_ENTER);
if (setup_info[choice].type & menu_navigation_type ||
- setup_info[choice].type & TYPE_BOOLEAN_STYLE)
+ setup_info[choice].type & TYPE_BOOLEAN_STYLE ||
+ setup_info[choice].type & TYPE_YES_NO_AUTO)
button = MB_MENU_CHOICE;
}
else if (dy)
else
{
if (setup_info[y].type & TYPE_VALUE)
- changeSetupValue(y);
+ changeSetupValue(y, dx);
}
}
}