From fa628a204ea4662806244b0ed994a48b40ece2ca Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 26 Feb 2006 15:50:14 +0100 Subject: [PATCH] rnd-20060226-3-src * changed some descriptive text in setup menu to use medium-width font * added key shortcut settings for switching player focus to setup menu --- ChangeLog | 2 + src/conftime.h | 2 +- src/editor.c | 2 +- src/events.c | 4 +- src/files.c | 51 ++++++++++------ src/libgame/setup.c | 17 +++--- src/libgame/setup.h | 2 +- src/libgame/system.h | 108 +++++++++++++++++---------------- src/libgame/text.c | 8 +++ src/screens.c | 140 +++++++++++++++++++++++++++++-------------- 10 files changed, 212 insertions(+), 124 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ef432eb..120b6501 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2006-02-26 * fixed bug with explosion graphic for player using "Murphy" graphic * fixed bug with explosion graphic if player leaves explosion in time + * changed some descriptive text in setup menu to use medium-width font + * added key shortcut settings for switching player focus to setup menu 2006-02-25 * fixed bug with random value initialization when recording tapes diff --git a/src/conftime.h b/src/conftime.h index 90bc5c8a..ffcafced 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-02-26 13:48]" +#define COMPILE_DATE_STRING "[2006-02-26 15:45]" diff --git a/src/editor.c b/src/editor.c index f832502e..2e317c3d 100644 --- a/src/editor.c +++ b/src/editor.c @@ -9912,7 +9912,7 @@ void HandleLevelEditorKeyInput(Key key) case KSYM_Escape: if (edit_mode == ED_MODE_DRAWING) { - RequestExitLevelEditor(setup.ask_on_escape); + RequestExitLevelEditor(setup.ask_on_escape_editor); } else if (edit_mode == ED_MODE_INFO) { diff --git a/src/events.c b/src/events.c index f478a86b..4d7a7a36 100644 --- a/src/events.c +++ b/src/events.c @@ -700,11 +700,11 @@ void HandleKey(Key key, int key_status) if (game_status == GAME_MODE_PLAYING) { - if (key == KSYM_5) + if (key == setup.shortcut.focus_player_all) game.centered_player_nr_next = -1; else for (i = 0; i < MAX_PLAYERS; i++) - if (key == KSYM_1 + i) + if (key == setup.shortcut.focus_player[i]) game.centered_player_nr_next = i; } diff --git a/src/files.c b/src/files.c index 0d4f895c..a99ca6ba 100644 --- a/src/files.c +++ b/src/files.c @@ -4929,15 +4929,16 @@ void SaveScore(int nr) #define SETUP_TOKEN_TIME_LIMIT 14 #define SETUP_TOKEN_FULLSCREEN 15 #define SETUP_TOKEN_ASK_ON_ESCAPE 16 -#define SETUP_TOKEN_QUICK_SWITCH 17 -#define SETUP_TOKEN_GRAPHICS_SET 18 -#define SETUP_TOKEN_SOUNDS_SET 19 -#define SETUP_TOKEN_MUSIC_SET 20 -#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS 21 -#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS 22 -#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC 23 +#define SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR 17 +#define SETUP_TOKEN_QUICK_SWITCH 18 +#define SETUP_TOKEN_GRAPHICS_SET 19 +#define SETUP_TOKEN_SOUNDS_SET 20 +#define SETUP_TOKEN_MUSIC_SET 21 +#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS 22 +#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS 23 +#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC 24 -#define NUM_GLOBAL_SETUP_TOKENS 24 +#define NUM_GLOBAL_SETUP_TOKENS 25 /* editor setup */ #define SETUP_TOKEN_EDITOR_EL_BOULDERDASH 0 @@ -4978,8 +4979,13 @@ void SaveScore(int nr) #define SETUP_TOKEN_SHORTCUT_SAVE_GAME 0 #define SETUP_TOKEN_SHORTCUT_LOAD_GAME 1 #define SETUP_TOKEN_SHORTCUT_TOGGLE_PAUSE 2 +#define SETUP_TOKEN_SHORTCUT_FOCUS_PLAYER_1 3 +#define SETUP_TOKEN_SHORTCUT_FOCUS_PLAYER_2 4 +#define SETUP_TOKEN_SHORTCUT_FOCUS_PLAYER_3 5 +#define SETUP_TOKEN_SHORTCUT_FOCUS_PLAYER_4 6 +#define SETUP_TOKEN_SHORTCUT_FOCUS_PLAYER_ALL 7 -#define NUM_SHORTCUT_SETUP_TOKENS 3 +#define NUM_SHORTCUT_SETUP_TOKENS 8 /* player setup */ #define SETUP_TOKEN_PLAYER_USE_JOYSTICK 0 @@ -5040,6 +5046,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_SWITCH, &si.time_limit, "time_limit" }, { TYPE_SWITCH, &si.fullscreen, "fullscreen" }, { TYPE_SWITCH, &si.ask_on_escape, "ask_on_escape" }, + { TYPE_SWITCH, &si.ask_on_escape_editor, "ask_on_escape_editor" }, { TYPE_SWITCH, &si.quick_switch, "quick_player_switch" }, { TYPE_STRING, &si.graphics_set, "graphics_set" }, { TYPE_STRING, &si.sounds_set, "sounds_set" }, @@ -5080,7 +5087,6 @@ static struct TokenInfo editor_cascade_setup_tokens[] = { TYPE_SWITCH, &seci.el_ce, "editor.cascade.el_ce" }, { TYPE_SWITCH, &seci.el_ge, "editor.cascade.el_ge" }, { TYPE_SWITCH, &seci.el_user, "editor.cascade.el_user" }, - { TYPE_SWITCH, &seci.el_generic, "editor.cascade.el_generic" }, { TYPE_SWITCH, &seci.el_dynamic, "editor.cascade.el_dynamic" }, }; @@ -5088,7 +5094,12 @@ static struct TokenInfo shortcut_setup_tokens[] = { { TYPE_KEY_X11, &ssi.save_game, "shortcut.save_game" }, { TYPE_KEY_X11, &ssi.load_game, "shortcut.load_game" }, - { TYPE_KEY_X11, &ssi.toggle_pause, "shortcut.toggle_pause" } + { TYPE_KEY_X11, &ssi.toggle_pause, "shortcut.toggle_pause" }, + { TYPE_KEY_X11, &ssi.focus_player[0], "shortcut.focus_player_1" }, + { TYPE_KEY_X11, &ssi.focus_player[1], "shortcut.focus_player_2" }, + { TYPE_KEY_X11, &ssi.focus_player[2], "shortcut.focus_player_3" }, + { TYPE_KEY_X11, &ssi.focus_player[3], "shortcut.focus_player_4" }, + { TYPE_KEY_X11, &ssi.focus_player_all,"shortcut.focus_player_all" }, }; static struct TokenInfo player_setup_tokens[] = @@ -5108,18 +5119,18 @@ static struct TokenInfo player_setup_tokens[] = { TYPE_KEY_X11, &sii.key.up, ".key.move_up" }, { TYPE_KEY_X11, &sii.key.down, ".key.move_down" }, { TYPE_KEY_X11, &sii.key.snap, ".key.snap_field" }, - { TYPE_KEY_X11, &sii.key.drop, ".key.place_bomb" } + { TYPE_KEY_X11, &sii.key.drop, ".key.place_bomb" }, }; static struct TokenInfo system_setup_tokens[] = { { TYPE_STRING, &syi.sdl_audiodriver, "system.sdl_audiodriver" }, - { TYPE_INTEGER, &syi.audio_fragment_size,"system.audio_fragment_size" } + { TYPE_INTEGER, &syi.audio_fragment_size,"system.audio_fragment_size" }, }; static struct TokenInfo options_setup_tokens[] = { - { TYPE_BOOLEAN, &soi.verbose, "options.verbose" } + { TYPE_BOOLEAN, &soi.verbose, "options.verbose" }, }; static char *get_corrected_login_name(char *login_name) @@ -5161,6 +5172,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->time_limit = TRUE; si->fullscreen = FALSE; si->ask_on_escape = TRUE; + si->ask_on_escape_editor = TRUE; si->quick_switch = FALSE; si->graphics_set = getStringCopy(GFX_CLASSIC_SUBDIR); @@ -5189,6 +5201,12 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->shortcut.load_game = DEFAULT_KEY_LOAD_GAME; si->shortcut.toggle_pause = DEFAULT_KEY_TOGGLE_PAUSE; + si->shortcut.focus_player[0] = DEFAULT_KEY_FOCUS_PLAYER_1; + si->shortcut.focus_player[1] = DEFAULT_KEY_FOCUS_PLAYER_2; + si->shortcut.focus_player[2] = DEFAULT_KEY_FOCUS_PLAYER_3; + si->shortcut.focus_player[3] = DEFAULT_KEY_FOCUS_PLAYER_4; + si->shortcut.focus_player_all = DEFAULT_KEY_FOCUS_PLAYER_ALL; + for (i = 0; i < MAX_PLAYERS; i++) { si->input[i].use_joystick = FALSE; @@ -5230,7 +5248,6 @@ static void setSetupInfoToDefaults_EditorCascade(struct SetupInfo *si) si->editor_cascade.el_ce = FALSE; si->editor_cascade.el_ge = FALSE; si->editor_cascade.el_user = FALSE; - si->editor_cascade.el_generic = FALSE; si->editor_cascade.el_dynamic = FALSE; } @@ -5326,7 +5343,7 @@ void LoadSetup() { char *player_name_new; - checkSetupFileHashIdentifier(setup_file_hash, getCookie("SETUP")); + checkSetupFileHashIdentifier(setup_file_hash, filename,getCookie("SETUP")); decodeSetupFileHash(setup_file_hash); setup.direct_draw = !setup.double_buffering; @@ -5354,7 +5371,7 @@ void LoadSetup_EditorCascade() if (setup_file_hash) { - checkSetupFileHashIdentifier(setup_file_hash, getCookie("SETUP")); + checkSetupFileHashIdentifier(setup_file_hash, filename,getCookie("SETUP")); decodeSetupFileHash_EditorCascade(setup_file_hash); freeSetupFileHash(setup_file_hash); diff --git a/src/libgame/setup.c b/src/libgame/setup.c index f952cab5..c96316f6 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1590,14 +1590,14 @@ SetupFileHash *loadSetupFileHash(char *filename) } void checkSetupFileHashIdentifier(SetupFileHash *setup_file_hash, - char *identifier) + char *filename, char *identifier) { char *value = getHashEntry(setup_file_hash, TOKEN_STR_FILE_IDENTIFIER); if (value == NULL) - Error(ERR_WARN, "configuration file has no file identifier"); + Error(ERR_WARN, "config file '%s' has no file identifier", filename); else if (!checkCookieString(value, identifier)) - Error(ERR_WARN, "configuration file has wrong file identifier"); + Error(ERR_WARN, "config file '%s' has wrong file identifier", filename); } @@ -1962,7 +1962,8 @@ static boolean LoadLevelInfoFromLevelConf(TreeInfo **node_first, leveldir_new->subdir = getStringCopy(directory_name); - checkSetupFileHashIdentifier(setup_file_hash, getCookie("LEVELINFO")); + checkSetupFileHashIdentifier(setup_file_hash, filename, + getCookie("LEVELINFO")); /* set all structure fields according to the token/value pairs */ ldi = *leveldir_new; @@ -2215,7 +2216,7 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first, if (setup_file_hash) /* (before defining ".color" and ".class_desc") */ { #if 0 - checkSetupFileHashIdentifier(setup_file_hash, getCookie("...")); + checkSetupFileHashIdentifier(setup_file_hash, filename, getCookie("...")); #endif /* set all structure fields according to the token/value pairs */ @@ -2707,7 +2708,8 @@ void LoadLevelSetup_LastSeries() if (leveldir_current == NULL) leveldir_current = getFirstValidTreeInfoEntry(leveldir_first); - checkSetupFileHashIdentifier(level_setup_hash, getCookie("LEVELSETUP")); + checkSetupFileHashIdentifier(level_setup_hash, filename, + getCookie("LEVELSETUP")); freeSetupFileHash(level_setup_hash); } @@ -2851,7 +2853,8 @@ void LoadLevelSetup_SeriesInfo() leveldir_current->handicap_level = level_nr; } - checkSetupFileHashIdentifier(level_setup_hash, getCookie("LEVELSETUP")); + checkSetupFileHashIdentifier(level_setup_hash, filename, + getCookie("LEVELSETUP")); freeSetupFileHash(level_setup_hash); } diff --git a/src/libgame/setup.h b/src/libgame/setup.h index 67a4c282..0f4746d8 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -265,7 +265,7 @@ char *getHashEntry(SetupFileHash *, char *); void setHashEntry(SetupFileHash *, char *, char *); char *removeHashEntry(SetupFileHash *, char *); SetupFileHash *loadSetupFileHash(char *); -void checkSetupFileHashIdentifier(SetupFileHash *, char *); +void checkSetupFileHashIdentifier(SetupFileHash *, char *, char *); void setSetupInfo(struct TokenInfo *, int, char *); char *getSetupValue(int, void *); char *getSetupLine(struct TokenInfo *, char *, int); diff --git a/src/libgame/system.h b/src/libgame/system.h index 4c05596d..2883d1dc 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -34,78 +34,83 @@ /* the additional 'b' is needed for Win32 to open files in binary mode */ -#define MODE_READ "rb" -#define MODE_WRITE "wb" -#define MODE_APPEND "ab" +#define MODE_READ "rb" +#define MODE_WRITE "wb" +#define MODE_APPEND "ab" -#define DEFAULT_DEPTH 0 +#define DEFAULT_DEPTH 0 -#define BLIT_OPAQUE 0 -#define BLIT_MASKED 1 -#define BLIT_INVERSE 2 -#define BLIT_ON_BACKGROUND 3 +#define BLIT_OPAQUE 0 +#define BLIT_MASKED 1 +#define BLIT_INVERSE 2 +#define BLIT_ON_BACKGROUND 3 -#define FULLSCREEN_NOT_AVAILABLE FALSE -#define FULLSCREEN_AVAILABLE TRUE +#define FULLSCREEN_NOT_AVAILABLE FALSE +#define FULLSCREEN_AVAILABLE TRUE /* default input keys */ -#define DEFAULT_KEY_LEFT KSYM_Left -#define DEFAULT_KEY_RIGHT KSYM_Right -#define DEFAULT_KEY_UP KSYM_Up -#define DEFAULT_KEY_DOWN KSYM_Down +#define DEFAULT_KEY_LEFT KSYM_Left +#define DEFAULT_KEY_RIGHT KSYM_Right +#define DEFAULT_KEY_UP KSYM_Up +#define DEFAULT_KEY_DOWN KSYM_Down #if defined(PLATFORM_MACOSX) -#define DEFAULT_KEY_SNAP KSYM_Control_L -#define DEFAULT_KEY_DROP KSYM_KP_Enter +#define DEFAULT_KEY_SNAP KSYM_Control_L +#define DEFAULT_KEY_DROP KSYM_KP_Enter #else -#define DEFAULT_KEY_SNAP KSYM_Control_L -#define DEFAULT_KEY_DROP KSYM_Control_R +#define DEFAULT_KEY_SNAP KSYM_Control_L +#define DEFAULT_KEY_DROP KSYM_Control_R #endif -#define DEFAULT_KEY_OKAY KSYM_Return -#define DEFAULT_KEY_CANCEL KSYM_Escape +#define DEFAULT_KEY_OKAY KSYM_Return +#define DEFAULT_KEY_CANCEL KSYM_Escape /* default shortcut keys */ -#define DEFAULT_KEY_SAVE_GAME KSYM_F1 -#define DEFAULT_KEY_LOAD_GAME KSYM_F2 -#define DEFAULT_KEY_TOGGLE_PAUSE KSYM_space +#define DEFAULT_KEY_SAVE_GAME KSYM_F1 +#define DEFAULT_KEY_LOAD_GAME KSYM_F2 +#define DEFAULT_KEY_TOGGLE_PAUSE KSYM_space +#define DEFAULT_KEY_FOCUS_PLAYER_1 KSYM_F5 +#define DEFAULT_KEY_FOCUS_PLAYER_2 KSYM_F6 +#define DEFAULT_KEY_FOCUS_PLAYER_3 KSYM_F7 +#define DEFAULT_KEY_FOCUS_PLAYER_4 KSYM_F8 +#define DEFAULT_KEY_FOCUS_PLAYER_ALL KSYM_F9 /* values for key_status */ -#define KEY_NOT_PRESSED FALSE -#define KEY_RELEASED FALSE -#define KEY_PRESSED TRUE +#define KEY_NOT_PRESSED FALSE +#define KEY_RELEASED FALSE +#define KEY_PRESSED TRUE /* values for button status */ -#define MB_NOT_PRESSED FALSE -#define MB_NOT_RELEASED TRUE -#define MB_RELEASED FALSE -#define MB_PRESSED TRUE -#define MB_MENU_CHOICE FALSE -#define MB_MENU_MARK TRUE -#define MB_MENU_INITIALIZE (-1) -#define MB_MENU_LEAVE (-2) -#define MB_LEFTBUTTON 1 -#define MB_MIDDLEBUTTON 2 -#define MB_RIGHTBUTTON 3 +#define MB_NOT_PRESSED FALSE +#define MB_NOT_RELEASED TRUE +#define MB_RELEASED FALSE +#define MB_PRESSED TRUE +#define MB_MENU_CHOICE FALSE +#define MB_MENU_MARK TRUE +#define MB_MENU_INITIALIZE (-1) +#define MB_MENU_LEAVE (-2) +#define MB_LEFTBUTTON 1 +#define MB_MIDDLEBUTTON 2 +#define MB_RIGHTBUTTON 3 /* values for move directions */ -#define MV_BIT_LEFT 0 -#define MV_BIT_RIGHT 1 -#define MV_BIT_UP 2 -#define MV_BIT_DOWN 3 +#define MV_BIT_LEFT 0 +#define MV_BIT_RIGHT 1 +#define MV_BIT_UP 2 +#define MV_BIT_DOWN 3 -#define NUM_DIRECTIONS 4 +#define NUM_DIRECTIONS 4 /* diagonal movement directions are used in a different contect than buttons */ -#define MV_BIT_UPLEFT 4 -#define MV_BIT_UPRIGHT 5 -#define MV_BIT_DOWNLEFT 6 -#define MV_BIT_DOWNRIGHT 7 +#define MV_BIT_UPLEFT 4 +#define MV_BIT_UPRIGHT 5 +#define MV_BIT_DOWNLEFT 6 +#define MV_BIT_DOWNRIGHT 7 -#define NUM_DIRECTIONS_FULL 8 +#define NUM_DIRECTIONS_FULL 8 /* values for special "button" bitmasks */ -#define BUTTON_1 4 -#define BUTTON_2 5 +#define BUTTON_1 4 +#define BUTTON_2 5 /* values for move directions and special "button" key bitmasks */ #define MV_NONE 0 @@ -645,7 +650,6 @@ struct SetupEditorCascadeInfo boolean el_ce; boolean el_ge; boolean el_user; - boolean el_generic; boolean el_dynamic; }; @@ -654,6 +658,9 @@ struct SetupShortcutInfo Key save_game; Key load_game; Key toggle_pause; + + Key focus_player[MAX_PLAYERS]; + Key focus_player_all; }; struct SetupSystemInfo @@ -684,6 +691,7 @@ struct SetupInfo boolean time_limit; boolean fullscreen; boolean ask_on_escape; + boolean ask_on_escape_editor; boolean quick_switch; char *graphics_set; diff --git a/src/libgame/text.c b/src/libgame/text.c index 6fd43735..de70abc3 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -255,8 +255,11 @@ void DrawTextExt(DrawBuffer *dst_bitmap, int dst_x, int dst_y, char *text, struct FontBitmapInfo *font = &gfx.font_bitmap_info[font_bitmap_id]; int font_width = getFontWidth(font_nr); int font_height = getFontHeight(font_nr); + int border_1 = gfx.sx + gfx.sxsize; + int border_2 = gfx.dx + gfx.dxsize; Bitmap *src_bitmap; int src_x, src_y; + int dst_x_start = dst_x; char *text_ptr = text; if (font->bitmap == NULL) @@ -275,6 +278,11 @@ void DrawTextExt(DrawBuffer *dst_bitmap, int dst_x, int dst_y, char *text, getFontCharSource(font_nr, c, &src_bitmap, &src_x, &src_y); + /* make sure that text does not run off the screen at the right side */ + if ((dst_x_start < border_1 && dst_x + font_width > border_1) || + (dst_x_start < border_2 && dst_x + font_width > border_2)) + break; + if (mask_mode == BLIT_INVERSE) /* special mode for text gadgets */ { /* first step: draw solid colored rectangle (use "cursor" character) */ diff --git a/src/screens.c b/src/screens.c index 4a9e2ffb..5b207805 100644 --- a/src/screens.c +++ b/src/screens.c @@ -29,15 +29,16 @@ #define SETUP_MODE_GAME 1 #define SETUP_MODE_EDITOR 2 #define SETUP_MODE_INPUT 3 -#define SETUP_MODE_SHORTCUT 4 -#define SETUP_MODE_GRAPHICS 5 -#define SETUP_MODE_SOUND 6 -#define SETUP_MODE_ARTWORK 7 -#define SETUP_MODE_CHOOSE_GRAPHICS 8 -#define SETUP_MODE_CHOOSE_SOUNDS 9 -#define SETUP_MODE_CHOOSE_MUSIC 10 +#define SETUP_MODE_SHORTCUT_1 4 +#define SETUP_MODE_SHORTCUT_2 5 +#define SETUP_MODE_GRAPHICS 6 +#define SETUP_MODE_SOUND 7 +#define SETUP_MODE_ARTWORK 8 +#define SETUP_MODE_CHOOSE_GRAPHICS 9 +#define SETUP_MODE_CHOOSE_SOUNDS 10 +#define SETUP_MODE_CHOOSE_MUSIC 11 -#define MAX_SETUP_MODES 11 +#define MAX_SETUP_MODES 12 /* for input setup functions */ #define SETUPINPUT_SCREEN_POS_START 0 @@ -2006,9 +2007,15 @@ static void execSetupInput() DrawSetupScreen(); } -static void execSetupShortcut() +static void execSetupShortcut1() { - setup_mode = SETUP_MODE_SHORTCUT; + setup_mode = SETUP_MODE_SHORTCUT_1; + DrawSetupScreen(); +} + +static void execSetupShortcut2() +{ + setup_mode = SETUP_MODE_SHORTCUT_2; DrawSetupScreen(); } @@ -2026,13 +2033,14 @@ static void execSaveAndExitSetup() static struct TokenInfo setup_info_main[] = { - { TYPE_ENTER_MENU, execSetupGame, "Game Settings" }, - { TYPE_ENTER_MENU, execSetupEditor, "Editor Settings" }, + { TYPE_ENTER_MENU, execSetupGame, "Game & Menu" }, + { TYPE_ENTER_MENU, execSetupEditor, "Editor" }, { TYPE_ENTER_MENU, execSetupGraphics, "Graphics" }, { TYPE_ENTER_MENU, execSetupSound, "Sound & Music" }, { TYPE_ENTER_MENU, execSetupArtwork, "Custom Artwork" }, { TYPE_ENTER_MENU, execSetupInput, "Input Devices" }, - { TYPE_ENTER_MENU, execSetupShortcut, "Key Shortcuts" }, + { TYPE_ENTER_MENU, execSetupShortcut1, "Key Shortcuts 1" }, + { TYPE_ENTER_MENU, execSetupShortcut2, "Key Shortcuts 2" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execExitSetup, "Exit" }, { TYPE_LEAVE_MENU, execSaveAndExitSetup, "Save and Exit" }, @@ -2042,12 +2050,11 @@ static struct TokenInfo setup_info_main[] = static struct TokenInfo setup_info_game[] = { - { TYPE_SWITCH, &setup.team_mode, "Team-Mode:" }, + { TYPE_SWITCH, &setup.team_mode, "Team-Mode (Multi-Player):" }, { TYPE_SWITCH, &setup.handicap, "Handicap:" }, - { TYPE_SWITCH, &setup.skip_levels, "Skip Levels:" }, - { TYPE_SWITCH, &setup.time_limit, "Timelimit:" }, - { TYPE_SWITCH, &setup.autorecord, "Auto-Record:" }, - { TYPE_SWITCH, &setup.quick_switch, "Quick Switch:" }, + { TYPE_SWITCH, &setup.skip_levels, "Skip Unsolved Levels:" }, + { TYPE_SWITCH, &setup.time_limit, "Time Limit:" }, + { TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, @@ -2062,20 +2069,20 @@ static struct TokenInfo setup_info_editor[] = #if 0 #else - { TYPE_SWITCH, &setup.editor.el_boulderdash, "BoulderDash:" }, + { TYPE_SWITCH, &setup.editor.el_boulderdash, "Boulder Dash:" }, { TYPE_SWITCH, &setup.editor.el_emerald_mine, "Emerald Mine:" }, - { TYPE_SWITCH, &setup.editor.el_emerald_mine_club,"E.M.C.:" }, - { TYPE_SWITCH, &setup.editor.el_more, "R'n'D:" }, + { TYPE_SWITCH, &setup.editor.el_emerald_mine_club, "Emerald Mine Club:" }, + { TYPE_SWITCH, &setup.editor.el_more, "Rocks'n'Diamonds:" }, { TYPE_SWITCH, &setup.editor.el_sokoban, "Sokoban:" }, { TYPE_SWITCH, &setup.editor.el_supaplex, "Supaplex:" }, - { TYPE_SWITCH, &setup.editor.el_diamond_caves, "DC II:" }, - { TYPE_SWITCH, &setup.editor.el_dx_boulderdash,"DX BD:" }, + { TYPE_SWITCH, &setup.editor.el_diamond_caves, "Diamond Caves II:" }, + { TYPE_SWITCH, &setup.editor.el_dx_boulderdash,"DX-Boulderdash:" }, #endif - { TYPE_SWITCH, &setup.editor.el_chars, "Characters:" }, - { TYPE_SWITCH, &setup.editor.el_custom, "Custom:" }, + { TYPE_SWITCH, &setup.editor.el_chars, "Text Characters:" }, + { TYPE_SWITCH, &setup.editor.el_custom, "Custom & Group Elements:" }, { TYPE_SWITCH, &setup.editor.el_headlines, "Headlines:" }, - { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined:" }, - { TYPE_SWITCH, &setup.editor.el_dynamic, "Dynamic:" }, + { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined element list:" }, + { TYPE_SWITCH, &setup.editor.el_dynamic, "Dynamic level elements:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, @@ -2084,14 +2091,15 @@ static struct TokenInfo setup_info_editor[] = static struct TokenInfo setup_info_graphics[] = { - { TYPE_SWITCH, &setup.fullscreen, "Fullscreen:" }, - { TYPE_SWITCH, &setup.scroll_delay, "Scroll Delay:" }, - { TYPE_SWITCH, &setup.soft_scrolling, "Soft Scroll.:" }, + { TYPE_SWITCH, &setup.fullscreen, "Fullscreen Mode:" }, + { TYPE_SWITCH, &setup.scroll_delay, "Delayed Scrolling:" }, + { TYPE_SWITCH, &setup.soft_scrolling, "Soft Scrolling:" }, #if 0 - { TYPE_SWITCH, &setup.double_buffering,"Buffered gfx:" }, + { TYPE_SWITCH, &setup.double_buffering,"Double-Buffering:" }, { TYPE_SWITCH, &setup.fading, "Fading:" }, #endif - { TYPE_SWITCH, &setup.quick_doors, "Quick Doors:" }, + { TYPE_SWITCH, &setup.quick_switch, "Quick Player Focus Switch:" }, + { TYPE_SWITCH, &setup.quick_doors, "Quick Menu Doors:" }, { TYPE_SWITCH, &setup.toons, "Toons:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, @@ -2101,9 +2109,9 @@ static struct TokenInfo setup_info_graphics[] = static struct TokenInfo setup_info_sound[] = { - { TYPE_SWITCH, &setup.sound_simple, "Simple Sound:" }, - { TYPE_SWITCH, &setup.sound_loops, "Sound Loops:" }, - { TYPE_SWITCH, &setup.sound_music, "Game Music:" }, + { TYPE_SWITCH, &setup.sound_simple, "Sound Effects (Normal):" }, + { TYPE_SWITCH, &setup.sound_loops, "Sound Effects (Looping):" }, + { TYPE_SWITCH, &setup.sound_music, "Music:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, @@ -2119,26 +2127,51 @@ static struct TokenInfo setup_info_artwork[] = { TYPE_ENTER_MENU, execSetupChooseMusic, "Custom Music" }, { TYPE_STRING, &music_set_name, "" }, { TYPE_EMPTY, NULL, "" }, +#if 1 + { 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:" }, +#else { TYPE_STRING, NULL, "Override Level Artwork:"}, { TYPE_YES_NO, &setup.override_level_graphics, "Graphics:" }, { TYPE_YES_NO, &setup.override_level_sounds, "Sounds:" }, { TYPE_YES_NO, &setup.override_level_music, "Music:" }, +#endif { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; -static struct TokenInfo setup_info_shortcut[] = +static struct TokenInfo setup_info_shortcut_1[] = { - { TYPE_KEYTEXT, NULL, "Quick Save Game:", }, - { TYPE_KEY, &setup.shortcut.save_game, "" }, - { TYPE_KEYTEXT, NULL, "Quick Load Game:", }, - { TYPE_KEY, &setup.shortcut.load_game, "" }, - { TYPE_KEYTEXT, NULL, "Toggle Pause:", }, - { TYPE_KEY, &setup.shortcut.toggle_pause, "" }, + { TYPE_KEYTEXT, NULL, "Quick Save Game to Tape:", }, + { TYPE_KEY, &setup.shortcut.save_game, "" }, + { TYPE_KEYTEXT, NULL, "Quick Load Game from Tape:", }, + { TYPE_KEY, &setup.shortcut.load_game, "" }, + { TYPE_KEYTEXT, NULL, "Start Game & Toggle Pause:", }, + { TYPE_KEY, &setup.shortcut.toggle_pause, "" }, + { TYPE_EMPTY, NULL, "" }, + { TYPE_YES_NO, &setup.ask_on_escape, "Ask on 'Esc' Key:" }, + { TYPE_YES_NO, &setup.ask_on_escape_editor, "Ask on 'Esc' Key (Editor):" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_YES_NO, &setup.ask_on_escape, "Ask on Esc:" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, + + { 0, NULL, NULL } +}; + +static struct TokenInfo setup_info_shortcut_2[] = +{ + { TYPE_KEYTEXT, NULL, "Set Focus to Player 1:", }, + { TYPE_KEY, &setup.shortcut.focus_player[0], "" }, + { TYPE_KEYTEXT, NULL, "Set Focus to Player 2:", }, + { TYPE_KEY, &setup.shortcut.focus_player[1], "" }, + { TYPE_KEYTEXT, NULL, "Set Focus to Player 3:", }, + { TYPE_KEY, &setup.shortcut.focus_player[2], "" }, + { TYPE_KEYTEXT, NULL, "Set Focus to Player 4:", }, + { TYPE_KEY, &setup.shortcut.focus_player[3], "" }, + { TYPE_KEYTEXT, NULL, "Set Focus to All Players:", }, + { TYPE_KEY, &setup.shortcut.focus_player_all, "" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, @@ -2207,7 +2240,11 @@ static void drawSetupValue(int pos) if (type & TYPE_KEY) { +#if 1 + xpos = 1; +#else xpos = 3; +#endif if (type & TYPE_QUERY) { @@ -2297,9 +2334,14 @@ static void DrawSetupScreen_Generic() setup_info = setup_info_artwork; title_string = "Custom Artwork"; } - else if (setup_mode == SETUP_MODE_SHORTCUT) + else if (setup_mode == SETUP_MODE_SHORTCUT_1) + { + setup_info = setup_info_shortcut_1; + title_string = "Setup Shortcuts"; + } + else if (setup_mode == SETUP_MODE_SHORTCUT_2) { - setup_info = setup_info_shortcut; + setup_info = setup_info_shortcut_2; title_string = "Setup Shortcuts"; } @@ -2323,8 +2365,16 @@ static void DrawSetupScreen_Generic() (value_ptr == &setup.fullscreen && !video.fullscreen_available)) setup_info[i].type |= TYPE_GHOSTED; +#if 1 + if (setup_info[i].type & (TYPE_SWITCH | + TYPE_YES_NO | + TYPE_STRING | + TYPE_KEYTEXT)) + font_nr = FONT_MENU_2; +#else if (setup_info[i].type & TYPE_STRING) font_nr = FONT_MENU_2; +#endif DrawText(mSX + 32, mSY + ypos * 32, setup_info[i].text, font_nr); -- 2.34.1