Reintroduce 'ystart' shortcuts (currently set to Shift-PgUp/PgDn).

Refactor some of the event names for increase/decrease, to be more consistent.
This commit is contained in:
Stephen Anthony 2019-12-15 21:29:37 -03:30
parent df9c71bc86
commit 528df82641
5 changed files with 44 additions and 31 deletions

View File

@ -436,8 +436,8 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
{Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL},
{Event::ToggleFullScreen, KBDK_RETURN, MOD3},
{Event::DecreaseOverscan, KBDK_PAGEDOWN, MOD3},
{Event::IncreaseOverScan, KBDK_PAGEUP, MOD3},
{Event::OverscanDecrease, KBDK_PAGEDOWN, MOD3},
{Event::OverScanIncrease, KBDK_PAGEUP, MOD3},
{Event::VidmodeStd, KBDK_1, MOD3},
{Event::VidmodeRGB, KBDK_2, MOD3},
{Event::VidmodeSVideo, KBDK_3, MOD3},
@ -448,11 +448,13 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
{Event::NextAttribute, KBDK_7, MOD3},
{Event::DecreaseAttribute, KBDK_8, KBDM_SHIFT | MOD3},
{Event::IncreaseAttribute, KBDK_8, MOD3},
{Event::DecreasePhosphor, KBDK_9, KBDM_SHIFT | MOD3},
{Event::IncreasePhosphor, KBDK_9, MOD3},
{Event::PhosphorDecrease, KBDK_9, KBDM_SHIFT | MOD3},
{Event::PhosphorIncrease, KBDK_9, MOD3},
{Event::TogglePhosphor, KBDK_P, MOD3},
{Event::ScanlinesDecrease, KBDK_0, KBDM_SHIFT | MOD3},
{Event::ScanlinesIncrease, KBDK_0, MOD3},
{Event::YStartDecrease, KBDK_PAGEDOWN, KBDM_SHIFT},
{Event::YStartIncrease, KBDK_PAGEUP, KBDM_SHIFT},
{Event::ToggleColorLoss, KBDK_L, KBDM_CTRL},
{Event::TogglePalette, KBDK_P, KBDM_CTRL},
{Event::ToggleJitter, KBDK_J, MOD3},
@ -465,8 +467,8 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
{Event::HandleMouseControl, KBDK_0, KBDM_CTRL},
{Event::ToggleGrabMouse, KBDK_G, KBDM_CTRL},
{Event::ToggleSAPortOrder, KBDK_1, KBDM_CTRL},
{Event::DecreaseFormat, KBDK_F, KBDM_SHIFT | KBDM_CTRL},
{Event::IncreaseFormat, KBDK_F, KBDM_CTRL},
{Event::FormatDecrease, KBDK_F, KBDM_SHIFT | KBDM_CTRL},
{Event::FormatIncrease, KBDK_F, KBDM_CTRL},
{Event::ToggleP0Collision, KBDK_Z, KBDM_SHIFT | MOD3},
{Event::ToggleP0Bit, KBDK_Z, MOD3},

View File

@ -83,26 +83,26 @@ class Event
ToggleFullScreen,
VidmodeStd, VidmodeRGB, VidmodeSVideo, VidModeComposite, VidModeBad, VidModeCustom,
PreviousAttribute, NextAttribute, DecreaseAttribute, IncreaseAttribute,
ScanlinesDecrease, ScanlinesIncrease,
ScanlinesDecrease, ScanlinesIncrease, YStartDecrease, YStartIncrease,
ToggleP0Collision, ToggleP0Bit, ToggleP1Collision, ToggleP1Bit,
ToggleM0Collision, ToggleM0Bit, ToggleM1Collision, ToggleM1Bit,
ToggleBLCollision, ToggleBLBit, TogglePFCollision, TogglePFBit,
ToggleCollisions, ToggleBits, ToggleFixedColors,
DecreasePhosphor, IncreasePhosphor, TogglePhosphor, ToggleJitter,
PhosphorDecrease, PhosphorIncrease, TogglePhosphor, ToggleJitter,
ToggleFrameStats, ToggleTimeMachine,
ToggleContSnapshots, ToggleContSnapshotsFrame,
ToggleColorLoss, TogglePalette,
HandleMouseControl, ToggleGrabMouse, ToggleSAPortOrder,
DecreaseFormat, IncreaseFormat, ReloadConsole,
FormatDecrease, FormatIncrease, ReloadConsole,
Rewind1Menu, Rewind10Menu, RewindAllMenu,
Unwind1Menu, Unwind10Menu, UnwindAllMenu,
StartPauseMode, SaveAllStates, LoadAllStates,
DecreaseOverscan, IncreaseOverScan,
OverscanDecrease, OverScanIncrease,
ToggleAutoSlot,

View File

@ -423,11 +423,11 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
if (pressed && !repeated) myOSystem.frameBuffer().toggleFullscreen();
return;
case Event::DecreaseOverscan:
case Event::OverscanDecrease:
if (pressed) myOSystem.frameBuffer().changeOverscan(-1);
return;
case Event::IncreaseOverScan:
case Event::OverScanIncrease:
if (pressed) myOSystem.frameBuffer().changeOverscan(1);
return;
@ -463,6 +463,14 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
if (pressed) myOSystem.frameBuffer().tiaSurface().setScanlineIntensity(+2);
return;
case Event::YStartDecrease:
if (pressed) myOSystem.console().changeYStart(-1);
return;
case Event::YStartIncrease:
if (pressed) myOSystem.console().changeYStart(+1);
return;
case Event::PreviousAttribute:
if (pressed)
{
@ -499,12 +507,12 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
}
return;
case Event::DecreasePhosphor:
case Event::PhosphorDecrease:
if (pressed) myOSystem.console().changePhosphor(-1);
return;
case Event::IncreasePhosphor:
if (pressed) myOSystem.console().changePhosphor(1);
case Event::PhosphorIncrease:
if (pressed) myOSystem.console().changePhosphor(+1);
return;
case Event::TogglePhosphor:
@ -549,11 +557,11 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
if (pressed && !repeated) toggleSAPortOrder();
return;
case Event::DecreaseFormat:
case Event::FormatDecrease:
if (pressed) myOSystem.console().toggleFormat(-1);
return;
case Event::IncreaseFormat:
case Event::FormatIncrease:
if (pressed) myOSystem.console().toggleFormat(1);
return;
@ -1820,10 +1828,10 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
{ Event::VidmodeDecrease, "Previous zoom level", "" },
{ Event::VidmodeIncrease, "Next zoom level", "" },
{ Event::ToggleFullScreen, "Toggle fullscreen", "" },
{ Event::DecreaseOverscan, "Decrease overscan in fullscreen mode", "" },
{ Event::IncreaseOverScan, "Increase overscan in fullscreen mode", "" },
{ Event::DecreaseFormat, "Decrease display format", "" },
{ Event::IncreaseFormat, "Increase display format", "" },
{ Event::OverscanDecrease, "Decrease overscan in fullscreen mode", "" },
{ Event::OverScanIncrease, "Increase overscan in fullscreen mode", "" },
{ Event::FormatDecrease, "Decrease display format", "" },
{ Event::FormatIncrease, "Increase display format", "" },
{ Event::TogglePalette, "Switch palette (Standard/Z26/User)", "" },
// TV effects:
@ -1838,10 +1846,12 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
{ Event::DecreaseAttribute, "Decrease selected 'Custom' attribute", "" },
{ Event::IncreaseAttribute, "Increase selected 'Custom' attribute", "" },
{ Event::TogglePhosphor, "Toggle 'phosphor' effect", "" },
{ Event::DecreasePhosphor, "Decrease 'phosphor' blend", "" },
{ Event::IncreasePhosphor, "Increase 'phosphor' blend", "" },
{ Event::PhosphorDecrease, "Decrease 'phosphor' blend", "" },
{ Event::PhosphorIncrease, "Increase 'phosphor' blend", "" },
{ Event::ScanlinesDecrease, "Decrease scanlines", "" },
{ Event::ScanlinesIncrease, "Increase scanlines", "" },
{ Event::YStartDecrease, "Decrease ystart", "" },
{ Event::YStartIncrease, "Increase ystart", "" },
// Developer keys:
{ Event::ToggleFrameStats, "Toggle frame stats", "" },
{ Event::ToggleP0Bit, "Toggle TIA Player0 object", "" },
@ -1947,9 +1957,10 @@ const Event::EventSet EventHandler::AudioVideoEvents = {
Event::VidmodeStd, Event::VidmodeRGB, Event::VidmodeSVideo, Event::VidModeComposite, Event::VidModeBad, Event::VidModeCustom,
Event::PreviousAttribute, Event::NextAttribute, Event::DecreaseAttribute, Event::IncreaseAttribute,
Event::ScanlinesDecrease, Event::ScanlinesIncrease,
Event::DecreasePhosphor, Event::IncreasePhosphor, Event::TogglePhosphor,
Event::DecreaseFormat, Event::IncreaseFormat,
Event::DecreaseOverscan, Event::IncreaseOverScan,
Event::YStartDecrease, Event::YStartIncrease,
Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor,
Event::FormatDecrease, Event::FormatIncrease,
Event::OverscanDecrease, Event::OverScanIncrease,
Event::TogglePalette,
};

View File

@ -464,7 +464,7 @@ class EventHandler
#else
PNG_SIZE = 0,
#endif
EMUL_ACTIONLIST_SIZE = 138 + PNG_SIZE + COMBO_SIZE,
EMUL_ACTIONLIST_SIZE = 140 + PNG_SIZE + COMBO_SIZE,
MENU_ACTIONLIST_SIZE = 18
;

View File

@ -111,13 +111,13 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title)
ADD_EVENT(Event::VidmodeDecrease, "Decrease window size");
ADD_EVENT(Event::ToggleFullScreen, "Toggle fullscreen /");
ADD_BIND("", " windowed mode");
ADD_EVENT(Event::IncreaseOverScan, "Increase overscan in FS mode");
ADD_EVENT(Event::DecreaseOverscan, "Decrease overscan in FS mode");
ADD_EVENT(Event::OverScanIncrease, "Increase overscan in FS mode");
ADD_EVENT(Event::OverscanDecrease, "Decrease overscan in FS mode");
break;
case 2:
title = "Special commands";
ADD_EVENT(Event::IncreaseFormat, "Switch between NTSC/PAL/SECAM");
ADD_EVENT(Event::FormatIncrease, "Switch between NTSC/PAL/SECAM");
ADD_EVENT(Event::TogglePalette, "Switch palette");
ADD_EVENT(Event::TogglePhosphor, "Toggle 'phosphor' effect");
ADD_LINE();
@ -139,7 +139,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title)
ADD_EVENT(Event::VidModeCustom, "Enable 'Custom' mode");
ADD_EVENT(Event::NextAttribute, "Select 'Custom' attribute");
ADD_EVENT(Event::IncreaseAttribute, "Modify 'Custom' attribute");
ADD_EVENT(Event::IncreasePhosphor, "Adjust phosphor blend");
ADD_EVENT(Event::PhosphorIncrease, "Adjust phosphor blend");
ADD_EVENT(Event::ScanlinesIncrease, "Adjust scanline intensity");
break;