diff --git a/Changes.txt b/Changes.txt
index a889575e6..46438ec8c 100644
--- a/Changes.txt
+++ b/Changes.txt
@@ -12,6 +12,14 @@
Release History
===========================================================================
+4.1 to 4.2: (September x, 2014)
+
+ * Re-added 'uipalette' option due to popular demand (of at least one
+ person :)).
+
+-Have fun!
+
+
4.0 to 4.1: (September 1, 2014)
* Improved 'DASH' bankswitching scheme support; there is now a debugger
@@ -39,8 +47,6 @@
* The UNIX configure script now supports newer versions of Hurd.
Special thanks to Stephen Kitt for the patch.
--Have fun!
-
3.9.3 to 4.0: (July 1, 2014)
diff --git a/docs/graphics/options_misc.png b/docs/graphics/options_misc.png
index 6dc4c0820..dff679190 100644
Binary files a/docs/graphics/options_misc.png and b/docs/graphics/options_misc.png differ
diff --git a/docs/index.html b/docs/index.html
index be50955d3..02348e2f5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -2093,6 +2093,11 @@
given zoom level (1 or 2).
+
-listdelay <delay> |
Set the amount of time to wait between treating successive
@@ -2475,6 +2480,7 @@
|
Item | Brief description | For more information, see CommandLine |
+ Interface Palette | palette to use for UI elements | -uipalette |
List quick delay | time to wait between keypresses in listwidget | -listdelay |
Mouse wheel scroll | number of lines mouse scroll will move in listwidget | -mscroll |
diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx
index 4ad4d8909..31c30ca09 100644
--- a/src/emucore/FrameBuffer.cxx
+++ b/src/emucore/FrameBuffer.cxx
@@ -77,10 +77,8 @@ FrameBuffer::~FrameBuffer(void)
bool FrameBuffer::initialize()
{
// Get desktop resolution and supported renderers
- uInt32 query_w, query_h;
queryHardware(myDisplays, myRenderers);
- query_w = myDisplays[0].w;
- query_h = myDisplays[0].h;
+ uInt32 query_w = myDisplays[0].w, query_h = myDisplays[0].h;
// Check the 'maxres' setting, which is an undocumented developer feature
// that specifies the desktop size (not normally set)
@@ -104,8 +102,7 @@ bool FrameBuffer::initialize()
// We can probably add ifdefs to take care of corner cases,
// but that means we've failed to abstract it enough ...
////////////////////////////////////////////////////////////////////
- bool smallScreen = myDesktopSize.w < kFBMinW ||
- myDesktopSize.h < kFBMinH;
+ bool smallScreen = myDesktopSize.w < kFBMinW || myDesktopSize.h < kFBMinH;
// This font is used in a variety of situations when a really small
// font is needed; we let the specific widget/dialog decide when to
@@ -150,11 +147,13 @@ bool FrameBuffer::initialize()
}
// Set palette for GUI (upper area of array, doesn't change during execution)
+ int palID = myOSystem.settings().getString("uipalette") == "classic" ? 1 : 0;
+
for(int i = 0, j = 256; i < kNumColors-256; ++i, ++j)
{
- Uint8 r = (ourGUIColors[i] >> 16) & 0xff;
- Uint8 g = (ourGUIColors[i] >> 8) & 0xff;
- Uint8 b = ourGUIColors[i] & 0xff;
+ Uint8 r = (ourGUIColors[palID][i] >> 16) & 0xff;
+ Uint8 g = (ourGUIColors[palID][i] >> 8) & 0xff;
+ Uint8 b = ourGUIColors[palID][i] & 0xff;
myPalette[j] = mapRGB(r, g, b);
}
@@ -1030,12 +1029,24 @@ void FrameBuffer::VideoModeList::setZoom(uInt32 zoom)
kDbgChangedTextColor Text color for changed cells
kDbgColorHi Highlighted color in debugger data cells
*/
-uInt32 FrameBuffer::ourGUIColors[kNumColors-256] = {
- 0x686868, 0x000000, 0x404040, 0x000000, 0x62a108, 0x9f0000,
- 0xc9af7c, 0xf0f0cf, 0xc80000,
- 0xac3410, 0xd55941, 0xffffff, 0xffd652,
- 0xac3410,
- 0xac3410, 0xd55941,
- 0xac3410, 0xd55941,
- 0xc80000, 0x00ff00, 0xc8c8ff
+uInt32 FrameBuffer::ourGUIColors[2][kNumColors-256] = {
+ // Standard
+ { 0x686868, 0x000000, 0x404040, 0x000000, 0x62a108, 0x9f0000,
+ 0xc9af7c, 0xf0f0cf, 0xc80000,
+ 0xac3410, 0xd55941, 0xffffff, 0xffd652,
+ 0xac3410,
+ 0xac3410, 0xd55941,
+ 0xac3410, 0xd55941,
+ 0xc80000, 0x00ff00, 0xc8c8ff
+ },
+
+ // Classic
+ { 0x686868, 0x000000, 0x404040, 0x20a020, 0x00ff00, 0xc80000,
+ 0x000000, 0x000000, 0xc80000,
+ 0x000000, 0x000000, 0x20a020, 0x00ff00,
+ 0x20a020,
+ 0x20a020, 0x00ff00,
+ 0x20a020, 0x00ff00,
+ 0xc80000, 0x00ff00, 0xc8c8ff
+ }
};
diff --git a/src/emucore/FrameBuffer.hxx b/src/emucore/FrameBuffer.hxx
index 52703eec7..e7a5121f5 100644
--- a/src/emucore/FrameBuffer.hxx
+++ b/src/emucore/FrameBuffer.hxx
@@ -579,8 +579,8 @@ class FrameBuffer
// Holds a reference to all the surfaces that have been created
map mySurfaceList;
- // Holds UI palette data
- static uInt32 ourGUIColors[kNumColors-256];
+ // Holds UI palette data (standard and classic colours)
+ static uInt32 ourGUIColors[2][kNumColors-256];
};
#endif
diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx
index 4c62d6f91..4dd2fe18c 100644
--- a/src/emucore/Settings.cxx
+++ b/src/emucore/Settings.cxx
@@ -121,6 +121,7 @@ Settings::Settings(OSystem& osystem)
GUI::Size(DebuggerDialog::kMediumFontMinW,
DebuggerDialog::kMediumFontMinH));
#endif
+ setInternal("uipalette", "standard");
setInternal("listdelay", "300");
setInternal("mwheel", "4");
diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx
index 8edff49ee..c58ae21e3 100644
--- a/src/gui/UIDialog.cxx
+++ b/src/gui/UIDialog.cxx
@@ -236,10 +236,19 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
// 3) Misc. options
wid.clear();
tabID = myTab->addTab(" Misc. ");
- lwidth = font.getStringWidth("Mouse wheel scroll: ");
+ lwidth = font.getStringWidth("Interface Palette (*): ");
pwidth = font.getStringWidth("Standard");
xpos = ypos = vBorder;
+
+ // UI Palette
ypos += 1;
+ items.clear();
+ items.push_back("Standard", "standard");
+ items.push_back("Classic", "classic");
+ myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
+ items, "Interface Palette (*): ", lwidth);
+ wid.push_back(myPalettePopup);
+ ypos += lineHeight + 4;
// Delay between quick-selecting characters in ListWidget
items.clear();
@@ -273,6 +282,13 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
wid.push_back(myWheelLinesPopup);
ypos += lineHeight + 4;
+ // Add message concerning usage
+ xpos = vBorder; ypos += 1*(lineHeight + 4);
+ lwidth = ifont.getStringWidth("(*) Requires application restart");
+ new StaticTextWidget(myTab, ifont, xpos, ypos, BSPF_min(lwidth, _w-20), fontHeight,
+ "(*) Requires application restart",
+ kTextAlignLeft);
+
// Add items for tab 2
addToFocusList(wid, myTab, tabID);
@@ -341,6 +357,10 @@ void UIDialog::loadConfig()
myDebuggerFontStyle->setSelected(style, "0");
#endif
+ // UI palette
+ const string& pal = instance().settings().getString("uipalette");
+ myPalettePopup->setSelected(pal, "standard");
+
// Listwidget quick delay
const string& delay = instance().settings().getString("listdelay");
myListDelayPopup->setSelected(delay, "300");
@@ -381,6 +401,10 @@ void UIDialog::saveConfig()
instance().settings().setValue("dbg.fontstyle",
myDebuggerFontStyle->getSelectedTag().toString());
+ // UI palette
+ instance().settings().setValue("uipalette",
+ myPalettePopup->getSelectedTag().toString());
+
// Listwidget quick delay
instance().settings().setValue("listdelay",
myListDelayPopup->getSelectedTag().toString());
@@ -426,6 +450,7 @@ void UIDialog::setDefaults()
}
case 2: // Misc. options
+ myPalettePopup->setSelected("standard");
myListDelayPopup->setSelected("300");
myWheelLinesPopup->setSelected("4");
break;
diff --git a/src/gui/UIDialog.hxx b/src/gui/UIDialog.hxx
index 5f2726dd3..3b4fa9913 100644
--- a/src/gui/UIDialog.hxx
+++ b/src/gui/UIDialog.hxx
@@ -58,6 +58,7 @@ class UIDialog : public Dialog
PopUpWidget* myDebuggerFontStyle;
// Misc options
+ PopUpWidget* myPalettePopup;
PopUpWidget* myListDelayPopup;
PopUpWidget* myWheelLinesPopup;
|