From 87d5886067e11b4ab8ac25822bb8d787848aa47d Mon Sep 17 00:00:00 2001 From: thrust26 Date: Wed, 6 Dec 2017 11:01:33 +0100 Subject: [PATCH] fixed #264 --- src/debugger/TIADebug.cxx | 12 ++++++------ src/emucore/tia/TIA.cxx | 6 ++++++ src/emucore/tia/TIA.hxx | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index 50e972975..80a790fb3 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -869,17 +869,17 @@ string TIADebug::debugColors() const ostringstream buf; int mode = myTIA.frameLayout() == FrameLayout::ntsc ? 0 : 1; - buf << " Red " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P0]) + buf << " " << myTIA.myFixedColorNames[TIA::P0] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P0]) << " Player 0\n" - << " Orange " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M0]) + << " " << myTIA.myFixedColorNames[TIA::M0] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M0]) << " Missile 0\n" - << " Yellow " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P1]) + << " " << myTIA.myFixedColorNames[TIA::P1] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P1]) << " Player 1\n" - << " Green " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M1]) + << " " << myTIA.myFixedColorNames[TIA::M1] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M1]) << " Missile 1\n" - << " Blue " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::PF]) + << " " << myTIA.myFixedColorNames[TIA::PF] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::PF]) << " Playfield\n" - << " Purple " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::BL]) + << " " << myTIA.myFixedColorNames[TIA::BL] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::BL]) << " Ball\n" << " Grey " << colorSwatch(TIA::FixedColor::BK_GREY) << " Background\n" diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 8deaf9c2f..6e57c0454 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -968,26 +968,32 @@ bool TIA::setFixedColorPalette(const string& colors) case 'r': myFixedColorPalette[0][i] = FixedColor::NTSC_RED; myFixedColorPalette[1][i] = FixedColor::PAL_RED; + myFixedColorNames[i] = "Red "; break; case 'o': myFixedColorPalette[0][i] = FixedColor::NTSC_ORANGE; myFixedColorPalette[1][i] = FixedColor::PAL_ORANGE; + myFixedColorNames[i] = "Orange"; break; case 'y': myFixedColorPalette[0][i] = FixedColor::NTSC_YELLOW; myFixedColorPalette[1][i] = FixedColor::PAL_YELLOW; + myFixedColorNames[i] = "Yellow"; break; case 'g': myFixedColorPalette[0][i] = FixedColor::NTSC_GREEN; myFixedColorPalette[1][i] = FixedColor::PAL_GREEN; + myFixedColorNames[i] = "Green "; break; case 'b': myFixedColorPalette[0][i] = FixedColor::NTSC_BLUE; myFixedColorPalette[1][i] = FixedColor::PAL_BLUE; + myFixedColorNames[i] = "Blue "; break; case 'p': myFixedColorPalette[0][i] = FixedColor::NTSC_PURPLE; myFixedColorPalette[1][i] = FixedColor::PAL_PURPLE; + myFixedColorNames[i] = "Purple"; break; } } diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index bf2bcdecf..a64b726e6 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -460,6 +460,7 @@ class TIA : public Device */ enum FixedObject { P0, M0, P1, M1, PF, BL }; FixedColor myFixedColorPalette[2][6]; + string myFixedColorNames[6]; private: