From 43da84eb088f7c8c06ddbdb70e91e6092bed2329 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Tue, 12 May 2020 16:09:39 +0200 Subject: [PATCH] renamed palette settings prefix --- src/common/PaletteHandler.cxx | 28 ++++++++++----------- src/common/tv_filters/NTSCFilter.cxx | 10 ++++---- src/emucore/Settings.cxx | 37 ++++++++++++++-------------- 3 files changed, 37 insertions(+), 38 deletions(-) diff --git a/src/common/PaletteHandler.cxx b/src/common/PaletteHandler.cxx index 2aecc6abf..70867d116 100644 --- a/src/common/PaletteHandler.cxx +++ b/src/common/PaletteHandler.cxx @@ -191,30 +191,30 @@ void PaletteHandler::changeColorPhaseShift(bool increase) void PaletteHandler::loadConfig(const Settings& settings) { // Load adjustables - myPhaseNTSC = BSPF::clamp(settings.getFloat("tv.phase_ntsc"), + myPhaseNTSC = BSPF::clamp(settings.getFloat("pal.phase_ntsc"), DEF_NTSC_SHIFT - MAX_SHIFT, DEF_NTSC_SHIFT + MAX_SHIFT); - myPhasePAL = BSPF::clamp(settings.getFloat("tv.phase_pal"), + myPhasePAL = BSPF::clamp(settings.getFloat("pal.phase_pal"), DEF_PAL_SHIFT - MAX_SHIFT, DEF_PAL_SHIFT + MAX_SHIFT); - myHue = BSPF::clamp(settings.getFloat("tv.hue"), -1.0F, 1.0F); - mySaturation = BSPF::clamp(settings.getFloat("tv.saturation"), -1.0F, 1.0F); - myContrast = BSPF::clamp(settings.getFloat("tv.contrast"), -1.0F, 1.0F); - myBrightness = BSPF::clamp(settings.getFloat("tv.brightness"), -1.0F, 1.0F); - myGamma = BSPF::clamp(settings.getFloat("tv.gamma"), -1.0F, 1.0F); + myHue = BSPF::clamp(settings.getFloat("pal.hue"), -1.0F, 1.0F); + mySaturation = BSPF::clamp(settings.getFloat("pal.saturation"), -1.0F, 1.0F); + myContrast = BSPF::clamp(settings.getFloat("pal.contrast"), -1.0F, 1.0F); + myBrightness = BSPF::clamp(settings.getFloat("pal.brightness"), -1.0F, 1.0F); + myGamma = BSPF::clamp(settings.getFloat("pal.gamma"), -1.0F, 1.0F); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PaletteHandler::saveConfig(Settings& settings) const { // Save adjustables - settings.setValue("tv.phase_ntsc", myPhaseNTSC); - settings.setValue("tv.phase_pal", myPhasePAL); + settings.setValue("pal.phase_ntsc", myPhaseNTSC); + settings.setValue("pal.phase_pal", myPhasePAL); - settings.setValue("tv.hue", myHue); - settings.setValue("tv.saturation", mySaturation); - settings.setValue("tv.contrast", myContrast); - settings.setValue("tv.brightness", myBrightness); - settings.setValue("tv.gamma", myGamma); + settings.setValue("pal.hue", myHue); + settings.setValue("pal.saturation", mySaturation); + settings.setValue("pal.contrast", myContrast); + settings.setValue("pal.brightness", myBrightness); + settings.setValue("pal.gamma", myGamma); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/tv_filters/NTSCFilter.cxx b/src/common/tv_filters/NTSCFilter.cxx index 64f26da2b..5a275fbf2 100644 --- a/src/common/tv_filters/NTSCFilter.cxx +++ b/src/common/tv_filters/NTSCFilter.cxx @@ -172,11 +172,11 @@ void NTSCFilter::saveConfig(Settings& settings) const { // Save adjustables for custom mode #ifdef BLARGG_PALETTE - //settings.setValue("tv.hue", myCustomSetup.hue); - //settings.setValue("tv.saturation", myCustomSetup.saturation); - //settings.setValue("tv.contrast", myCustomSetup.contrast); - //settings.setValue("tv.brightness", myCustomSetup.brightness); - //settings.setValue("tv.gamma", myCustomSetup.gamma); + settings.setValue("tv.hue", myCustomSetup.hue); + settings.setValue("tv.saturation", myCustomSetup.saturation); + settings.setValue("tv.contrast", myCustomSetup.contrast); + settings.setValue("tv.brightness", myCustomSetup.brightness); + settings.setValue("tv.gamma", myCustomSetup.gamma); #endif settings.setValue("tv.sharpness", myCustomSetup.sharpness); settings.setValue("tv.resolution", myCustomSetup.resolution); diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 07c41e0f3..f5e120408 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -46,30 +46,29 @@ Settings::Settings() setPermanent("center", "true"); setPermanent("windowedpos", Common::Point(50, 50)); setPermanent("display", 0); - setPermanent("palette", PaletteHandler::SETTING_STANDARD); setPermanent("uimessages", "true"); - // TIA specific options - setPermanent("tia.zoom", "3"); setPermanent("tia.inter", "false"); - setPermanent("tia.vsizeadjust", 0); + setPermanent("tia.zoom", "3"); setPermanent("fullscreen", "false"); setPermanent("tia.fs_stretch", "false"); setPermanent("tia.fs_overscan", "0"); + setPermanent("tia.vsizeadjust", 0); setPermanent("tia.dbgcolors", "roygpb"); - + // Palette options + setPermanent("palette", PaletteHandler::SETTING_STANDARD); + setPermanent("pal.phase_ntsc", "26.2"); + setPermanent("pal.phase_pal", "31.3"); + setPermanent("pal.contrast", "0.0"); + setPermanent("pal.brightness", "0.0"); + setPermanent("pal.hue", "0.0"); + setPermanent("pal.saturation", "0.0"); + setPermanent("pal.gamma", "0.0"); // TV filtering options setPermanent("tv.filter", "0"); setPermanent("tv.phosphor", "byrom"); setPermanent("tv.phosblend", "50"); setPermanent("tv.scanlines", "25"); - setPermanent("tv.phase_ntsc", "26.2"); - setPermanent("tv.phase_pal", "31.3"); - setPermanent("tv.contrast", "0.0"); - setPermanent("tv.brightness", "0.0"); - setPermanent("tv.hue", "0.0"); - setPermanent("tv.saturation", "0.0"); - setPermanent("tv.gamma", "0.0"); // TV options when using 'custom' mode setPermanent("tv.sharpness", "0.0"); setPermanent("tv.resolution", "0.0"); @@ -411,8 +410,13 @@ void Settings::usage() const << " -palette \n" - << " -phase_ntsc Phase shift for NTSC custom color palette\n" - << " -phase_pal Phase shift for PAL custom color palette\n" + << " -pal.phase_ntsc Phase shift for NTSC 'custom' palette\n" + << " -pal.phase_pal Phase shift for PAL 'custom' palette\n" + << " -pal.hue <-1.0 - 1.0> Adjust hue for current palette\n" + << " -pal.saturation <-1.0 - 1.0> Adjust saturation of current palette\n" + << " -pal.contrast <-1.0 - 1.0> Adjust contrast of current palette\n" + << " -pal.brightness <-1.0 - 1.0> Adjust brightness of current palette\n" + << " -pal.gamma <-1.0 - 1.0> Adjust gamma of current palette\n" << " -speed Run emulation at the given speed\n" << " -turbo <1|0> Enable 'Turbo' mode for maximum emulation speed\n" << " -uimessages <1|0> Show onscreen UI messages for different events\n" @@ -447,11 +451,6 @@ void Settings::usage() const << " -tv.phosblend <0-100> Set default blend level in phosphor mode\n" << " -tv.scanlines <0-100> Set scanline intensity to percentage\n" << " (0 disables completely)\n" - << " -tv.contrast <-1.0 - 1.0> Set TV effects custom contrast\n" - << " -tv.brightness <-1.0 - 1.0> Set TV effects custom brightness\n" - << " -tv.hue <-1.0 - 1.0> Set TV effects custom hue\n" - << " -tv.saturation <-1.0 - 1.0> Set TV effects custom saturation\n" - << " -tv.gamma <-1.0 - 1.0> Set TV effects custom gamma\n" << " -tv.sharpness <-1.0 - 1.0> Set TV effects custom sharpness\n" << " -tv.resolution <-1.0 - 1.0> Set TV effects custom resolution\n" << " -tv.artifacts <-1.0 - 1.0> Set TV effects custom artifacts\n"