From 0a4d291e64b8d413e9963fce0df9eb06dc27155d Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 3 Jul 2008 14:01:41 +0000 Subject: [PATCH] Added Disp BG, OBJ hotkeys --- src/drivers/win/mapinput.cpp | 2 -- src/input.cpp | 20 ++++++++++++++++++++ src/input.h | 2 ++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/drivers/win/mapinput.cpp b/src/drivers/win/mapinput.cpp index 5506747c..e171483c 100644 --- a/src/drivers/win/mapinput.cpp +++ b/src/drivers/win/mapinput.cpp @@ -41,14 +41,12 @@ static struct { EMUCMD_SAVE_SLOT_9, SCAN_9, }, { EMUCMD_SAVE_STATE, SCAN_I, }, //adelikat, set to my defaults for lack of something better { EMUCMD_LOAD_STATE, SCAN_P, }, //most people use the loadslotx / savestlotx style system which requires hogging all th F Keys. So I set it up in FCEUX that way. - //get feedback from TAS people about these { EMUCMD_MOVIE_FRAME_DISPLAY_TOGGLE, SCAN_PERIOD, }, //{ EMUCMD_FDS_EJECT_INSERT, SCAN_F8, }, //These two can be removed, as they can cause nasty errors and the F keys are needed //{ EMUCMD_FDS_SIDE_SELECT, SCAN_F6, }, { EMUCMD_MOVIE_INPUT_DISPLAY_TOGGLE, SCAN_COMMA, }, //{ EMUCMD_MOVIE_READONLY_TOGGLE, SCAN_8 | CMD_KEY_SHIFT, },*/ //{ EMUCMD_MISC_AUTOSAVE, SCAN_R, }, adelikat - Since Auto-save is disabled by default, so should the hotkey mapping - //mbg 7/31/06 - these have been removed as defaults until we decide whether hotkey philosophy permits them { EMUCMD_SAVE_STATE_SLOT_0, SCAN_F10 | CMD_KEY_SHIFT, }, { EMUCMD_SAVE_STATE_SLOT_1, SCAN_F1 | CMD_KEY_SHIFT, }, { EMUCMD_SAVE_STATE_SLOT_2, SCAN_F2 | CMD_KEY_SHIFT, }, diff --git a/src/input.cpp b/src/input.cpp index 8295a20c..92fd3658 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -616,6 +616,8 @@ static void CommandEmulationSpeed(void); //static void CommandMovieReplay(void); static void CommandSoundAdjust(void); static void CommandUsePreset(void); +static void BackgroundDisplayToggle(void); +static void ObjectDisplayToggle(void); static void ViewSlots(void); struct EMUCMDTABLE FCEUI_CommandTable[]= @@ -743,6 +745,8 @@ struct EMUCMDTABLE FCEUI_CommandTable[]= { EMUCMD_MISC_USE_INPUT_PRESET_1, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 1", 0 }, { EMUCMD_MISC_USE_INPUT_PRESET_2, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 2", 0 }, { EMUCMD_MISC_USE_INPUT_PRESET_3, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 3", 0 }, + { EMUCMD_MISC_DISPLAY_BG_TOGGLE, EMUCMDTYPE_MISC, BackgroundDisplayToggle, 0, 0, "Toggle Background Display", 0 }, + { EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMDTYPE_MISC, ObjectDisplayToggle, 0, 0, "Toggle Object Display", 0 }, }; #define NUM_EMU_CMDS (sizeof(FCEUI_CommandTable)/sizeof(FCEUI_CommandTable[0])) @@ -858,3 +862,19 @@ static void CommandUsePreset(void) { FCEUI_UseInputPreset(execcmd-EMUCMD_MISC_USE_INPUT_PRESET_1); } + +static void BackgroundDisplayToggle(void) +{ + bool spr, bg; + FCEUI_GetRenderPlanes(spr,bg); + bg = !bg; + FCEUI_SetRenderPlanes(spr,bg); +} + +static void ObjectDisplayToggle(void) +{ + bool spr, bg; + FCEUI_GetRenderPlanes(spr,bg); + spr = !spr; + FCEUI_SetRenderPlanes(spr,bg); +} \ No newline at end of file diff --git a/src/input.h b/src/input.h index eb06dea2..e4228ee4 100644 --- a/src/input.h +++ b/src/input.h @@ -226,6 +226,8 @@ enum EMUCMD EMUCMD_MISC_USE_INPUT_PRESET_1, EMUCMD_MISC_USE_INPUT_PRESET_2, EMUCMD_MISC_USE_INPUT_PRESET_3, + EMUCMD_MISC_DISPLAY_BG_TOGGLE, + EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMD_MAX };