From c840bb9809d9dccf417e91b2639bdaa1ad8b594a Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 10 Aug 2013 21:21:17 +0000 Subject: [PATCH] Removed some (long) dead debugging code. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2788 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/gui/AudioWidget.cxx | 2 -- src/debugger/gui/CartDebugWidget.hxx | 5 +--- src/debugger/gui/ColorWidget.cxx | 1 - src/debugger/gui/ControllerWidget.hxx | 1 - src/debugger/gui/CpuWidget.cxx | 2 -- src/debugger/gui/DataGridOpsWidget.cxx | 2 -- src/debugger/gui/DataGridWidget.cxx | 1 - src/debugger/gui/PromptWidget.cxx | 1 - src/debugger/gui/RamWidget.cxx | 2 -- src/debugger/gui/RiotWidget.cxx | 2 -- src/debugger/gui/RomListWidget.cxx | 1 - src/debugger/gui/RomWidget.cxx | 2 -- src/debugger/gui/TiaInfoWidget.cxx | 2 -- src/debugger/gui/TiaOutputWidget.cxx | 2 -- src/debugger/gui/TiaWidget.cxx | 2 -- src/debugger/gui/TiaZoomWidget.cxx | 1 - src/debugger/gui/ToggleBitWidget.cxx | 2 -- src/debugger/gui/TogglePixelWidget.cxx | 2 -- src/debugger/gui/ToggleWidget.cxx | 1 - src/emucore/OSystem.cxx | 39 ++------------------------ src/gui/EditTextWidget.cxx | 1 - src/gui/ListWidget.cxx | 1 - src/gui/PopUpWidget.cxx | 1 - src/gui/ScrollBarWidget.cxx | 17 ++++++----- src/gui/TabWidget.cxx | 1 - src/gui/Widget.cxx | 5 ---- src/gui/Widget.hxx | 34 ---------------------- 27 files changed, 12 insertions(+), 121 deletions(-) diff --git a/src/debugger/gui/AudioWidget.cxx b/src/debugger/gui/AudioWidget.cxx index 35bfdb79f..46cb3eefa 100644 --- a/src/debugger/gui/AudioWidget.cxx +++ b/src/debugger/gui/AudioWidget.cxx @@ -32,8 +32,6 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font, : Widget(boss, font, x, y, w, h), CommandSender(boss) { - _type = kAudioWidget; - const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(); diff --git a/src/debugger/gui/CartDebugWidget.hxx b/src/debugger/gui/CartDebugWidget.hxx index a6c4a7491..ba1dabbcf 100644 --- a/src/debugger/gui/CartDebugWidget.hxx +++ b/src/debugger/gui/CartDebugWidget.hxx @@ -43,10 +43,7 @@ class CartDebugWidget : public Widget, public CommandSender myFontWidth(font.getMaxCharWidth()), myFontHeight(font.getFontHeight()), myLineHeight(font.getLineHeight()), - myButtonHeight(myLineHeight + 4) - { - _type = kCartDebugWidget; - } + myButtonHeight(myLineHeight + 4) { } virtual ~CartDebugWidget() { }; diff --git a/src/debugger/gui/ColorWidget.cxx b/src/debugger/gui/ColorWidget.cxx index 29f424324..9a2b59a05 100644 --- a/src/debugger/gui/ColorWidget.cxx +++ b/src/debugger/gui/ColorWidget.cxx @@ -35,7 +35,6 @@ ColorWidget::ColorWidget(GuiObject* boss, const GUI::Font& font, _cmd(cmd) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kColorWidget; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/ControllerWidget.hxx b/src/debugger/gui/ControllerWidget.hxx index 5c410c8c4..e7a409088 100644 --- a/src/debugger/gui/ControllerWidget.hxx +++ b/src/debugger/gui/ControllerWidget.hxx @@ -35,7 +35,6 @@ class ControllerWidget : public Widget, public CommandSender CommandSender(boss), myController(controller) { - _type = kControllerWidget; _w = 18 * font.getMaxCharWidth(); _h = 8 * font.getLineHeight(); } diff --git a/src/debugger/gui/CpuWidget.cxx b/src/debugger/gui/CpuWidget.cxx index 7e83b23aa..41cfa4892 100644 --- a/src/debugger/gui/CpuWidget.cxx +++ b/src/debugger/gui/CpuWidget.cxx @@ -36,8 +36,6 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y) : Widget(boss, font, x, y, 16, 16), CommandSender(boss) { - _type = kCpuWidget; - const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(); diff --git a/src/debugger/gui/DataGridOpsWidget.cxx b/src/debugger/gui/DataGridOpsWidget.cxx index cbb5449d9..7af1fda1a 100644 --- a/src/debugger/gui/DataGridOpsWidget.cxx +++ b/src/debugger/gui/DataGridOpsWidget.cxx @@ -32,8 +32,6 @@ DataGridOpsWidget::DataGridOpsWidget(GuiObject* boss, const GUI::Font& font, _shiftLeftButton(NULL), _shiftRightButton(NULL) { - _type = kDataGridOpsWidget; - const int bwidth = _font.getMaxCharWidth() * 4, bheight = _font.getFontHeight() + 3, space = 6; diff --git a/src/debugger/gui/DataGridWidget.cxx b/src/debugger/gui/DataGridWidget.cxx index 67fb0798a..c6cc32551 100644 --- a/src/debugger/gui/DataGridWidget.cxx +++ b/src/debugger/gui/DataGridWidget.cxx @@ -51,7 +51,6 @@ DataGridWidget::DataGridWidget(GuiObject* boss, const GUI::Font& font, { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANTS_RAWDATA; - _type = kDataGridWidget; _editMode = false; // The item is selected, thus _bgcolor is used to draw the caret and diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index b3a9a2d11..27776d6a7 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -46,7 +46,6 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font, { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANTS_TAB | WIDGET_WANTS_RAWDATA; - _type = kPromptWidget; _textcolor = kTextColor; _bgcolor = kWidColor; diff --git a/src/debugger/gui/RamWidget.cxx b/src/debugger/gui/RamWidget.cxx index 1c3f76250..8cafc46c0 100644 --- a/src/debugger/gui/RamWidget.cxx +++ b/src/debugger/gui/RamWidget.cxx @@ -38,8 +38,6 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y) myUndoValue(-1), myCurrentRamBank(0) { - _type = kRamWidget; - const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(), diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index be35777a4..17108b7c3 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -55,8 +55,6 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font, : Widget(boss, font, x, y, w, h), CommandSender(boss) { - _type = kRiotWidget; - const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(); diff --git a/src/debugger/gui/RomListWidget.cxx b/src/debugger/gui/RomListWidget.cxx index 8075da036..fbfc2725b 100644 --- a/src/debugger/gui/RomListWidget.cxx +++ b/src/debugger/gui/RomListWidget.cxx @@ -40,7 +40,6 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font, _currentKeyDown(KBDK_UNKNOWN) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kRomListWidget; _bgcolor = kWidColor; _bgcolorhi = kWidColor; _textcolor = kTextColor; diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 5fa5224f9..b35921636 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -39,8 +39,6 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font, CommandSender(boss), myListIsDirty(true) { - _type = kRomWidget; - int xpos, ypos; StaticTextWidget* t; WidgetArray wid; diff --git a/src/debugger/gui/TiaInfoWidget.cxx b/src/debugger/gui/TiaInfoWidget.cxx index 8ef78e4c8..00e4205be 100644 --- a/src/debugger/gui/TiaInfoWidget.cxx +++ b/src/debugger/gui/TiaInfoWidget.cxx @@ -34,8 +34,6 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& font, : Widget(boss, font, x, y, 16, 16), CommandSender(boss) { - _type = kTiaInfoWidget; - x += 5; const int lineHeight = font.getLineHeight(); int xpos = x, ypos = y, lwidth = font.getStringWidth("F. Cyc:"); diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 91ac4665a..3bd3860ab 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -40,8 +40,6 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font, myMenu(NULL), myZoom(NULL) { - _type = kTiaOutputWidget; - // Create context menu for commands VariantList l; l.push_back("Fill to scanline", "scanline"); diff --git a/src/debugger/gui/TiaWidget.cxx b/src/debugger/gui/TiaWidget.cxx index cbe55ee10..d146eca59 100644 --- a/src/debugger/gui/TiaWidget.cxx +++ b/src/debugger/gui/TiaWidget.cxx @@ -38,8 +38,6 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font, : Widget(boss, font, x, y, w, h), CommandSender(boss) { - _type = kTiaWidget; - const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(); diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index a1ec33223..be9422696 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -35,7 +35,6 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, const GUI::Font& font, myMenu(NULL) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kTiaZoomWidget; _bgcolor = _bgcolorhi = kDlgColor; // Use all available space, up to the maximum bounds of the TIA image diff --git a/src/debugger/gui/ToggleBitWidget.cxx b/src/debugger/gui/ToggleBitWidget.cxx index fcad179f0..9993fa97d 100644 --- a/src/debugger/gui/ToggleBitWidget.cxx +++ b/src/debugger/gui/ToggleBitWidget.cxx @@ -30,8 +30,6 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int cols, int rows, int colchars) : ToggleWidget(boss, font, x, y, cols, rows) { - _type = kToggleBitWidget; - _rowHeight = font.getLineHeight(); _colWidth = colchars * font.getMaxCharWidth() + 8; diff --git a/src/debugger/gui/TogglePixelWidget.cxx b/src/debugger/gui/TogglePixelWidget.cxx index 37e5f64bd..abab9c4b7 100644 --- a/src/debugger/gui/TogglePixelWidget.cxx +++ b/src/debugger/gui/TogglePixelWidget.cxx @@ -30,8 +30,6 @@ TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font, : ToggleWidget(boss, font, x, y, cols, rows), _pixelColor(0) { - _type = kTogglePixelWidget; - _rowHeight = _colWidth = font.getLineHeight(); // Calculate real dimensions diff --git a/src/debugger/gui/ToggleWidget.cxx b/src/debugger/gui/ToggleWidget.cxx index ba61de73c..5470dfddc 100644 --- a/src/debugger/gui/ToggleWidget.cxx +++ b/src/debugger/gui/ToggleWidget.cxx @@ -35,7 +35,6 @@ ToggleWidget::ToggleWidget(GuiObject* boss, const GUI::Font& font, { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANTS_RAWDATA; - _type = kToggleWidget; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 6d79b7001..175ca0862 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -121,43 +121,10 @@ OSystem::OSystem() ostringstream info; const SDL_version* ver = SDL_Linked_Version(); - info << "Build " << STELLA_BUILD << ", using "; - info << "SDL " << (int)ver->major << "." << (int)ver->minor << "." << (int)ver->patch << " "; - info << "[" << BSPF_ARCH << "]"; + info << "Build " << STELLA_BUILD << ", using SDL " << (int)ver->major + << "." << (int)ver->minor << "."<< (int)ver->patch + << " [" << BSPF_ARCH << "]"; myBuildInfo = info.str(); - -#if 0 - // Debugging info for the GUI widgets - ostringstream buf; - buf << " kStaticTextWidget = " << kStaticTextWidget << endl - << " kEditTextWidget = " << kEditTextWidget << endl - << " kButtonWidget = " << kButtonWidget << endl - << " kCheckboxWidget = " << kCheckboxWidget << endl - << " kSliderWidget = " << kSliderWidget << endl - << " kListWidget = " << kListWidget << endl - << " kScrollBarWidget = " << kScrollBarWidget << endl - << " kPopUpWidget = " << kPopUpWidget << endl - << " kTabWidget = " << kTabWidget << endl - << " kEventMappingWidget = " << kEventMappingWidget << endl - << " kEditableWidget = " << kEditableWidget << endl - << " kAudioWidget = " << kAudioWidget << endl - << " kColorWidget = " << kColorWidget << endl - << " kCpuWidget = " << kCpuWidget << endl - << " kDataGridOpsWidget = " << kDataGridOpsWidget << endl - << " kDataGridWidget = " << kDataGridWidget << endl - << " kPromptWidget = " << kPromptWidget << endl - << " kRamWidget = " << kRamWidget << endl - << " kRomListWidget = " << kRomListWidget << endl - << " kRomWidget = " << kRomWidget << endl - << " kTiaInfoWidget = " << kTiaInfoWidget << endl - << " kTiaOutputWidget = " << kTiaOutputWidget << endl - << " kTiaWidget = " << kTiaWidget << endl - << " kTiaZoomWidget = " << kTiaZoomWidget << endl - << " kToggleBitWidget = " << kToggleBitWidget << endl - << " kTogglePixelWidget = " << kTogglePixelWidget << endl - << " kToggleWidget = " << kToggleWidget << endl; - logMessage(buf.str(), 0); -#endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/EditTextWidget.cxx b/src/gui/EditTextWidget.cxx index ea7039408..83906377d 100644 --- a/src/gui/EditTextWidget.cxx +++ b/src/gui/EditTextWidget.cxx @@ -33,7 +33,6 @@ EditTextWidget::EditTextWidget(GuiObject* boss, const GUI::Font& font, _changed(false) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kEditTextWidget; startEditMode(); // We're always in edit mode } diff --git a/src/gui/ListWidget.cxx b/src/gui/ListWidget.cxx index 1ac9c1819..85e1d277c 100644 --- a/src/gui/ListWidget.cxx +++ b/src/gui/ListWidget.cxx @@ -43,7 +43,6 @@ ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font, _quickSelectTime(0) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kListWidget; _bgcolor = kWidColor; _bgcolorhi = kWidColor; _textcolor = kTextColor; diff --git a/src/gui/PopUpWidget.cxx b/src/gui/PopUpWidget.cxx index eebfc1e69..b820e3af4 100644 --- a/src/gui/PopUpWidget.cxx +++ b/src/gui/PopUpWidget.cxx @@ -49,7 +49,6 @@ PopUpWidget::PopUpWidget(GuiObject* boss, const GUI::Font& font, _labelWidth(labelWidth) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _type = kPopUpWidget; _bgcolor = kDlgColor; _bgcolorhi = kWidColor; _textcolor = kTextColor; diff --git a/src/gui/ScrollBarWidget.cxx b/src/gui/ScrollBarWidget.cxx index d428c406c..7d7ebe85d 100644 --- a/src/gui/ScrollBarWidget.cxx +++ b/src/gui/ScrollBarWidget.cxx @@ -46,14 +46,14 @@ static unsigned int up_arrow[8] = { // Down arrow static unsigned int down_arrow[8] = { - 0x11111111, - 0x11111111, - 0x01111110, - 0x01111110, - 0x00111100, - 0x00111100, - 0x00011000, - 0x00011000 + 0x11111111, + 0x11111111, + 0x01111110, + 0x01111110, + 0x00111100, + 0x00111100, + 0x00011000, + 0x00011000 }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71,7 +71,6 @@ ScrollBarWidget::ScrollBarWidget(GuiObject* boss, const GUI::Font& font, _sliderDeltaMouseDownPos(0) { _flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG; - _type = kScrollBarWidget; _bgcolor = kWidColor; _bgcolorhi = kWidColor; } diff --git a/src/gui/TabWidget.cxx b/src/gui/TabWidget.cxx index efe5ab3a3..af20d1168 100644 --- a/src/gui/TabWidget.cxx +++ b/src/gui/TabWidget.cxx @@ -39,7 +39,6 @@ TabWidget::TabWidget(GuiObject* boss, const GUI::Font& font, _id = 0; // For dialogs with multiple tab widgets, they should specifically // call ::setID to differentiate among them _flags = WIDGET_ENABLED | WIDGET_CLEARBG; - _type = kTabWidget; _bgcolor = kDlgColor; _bgcolorhi = kDlgColor; _textcolor = kTextColor; diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index ab331e6b7..e6c6ae2ff 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -37,7 +37,6 @@ Widget::Widget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h) : GuiObject(boss->instance(), boss->parent(), boss->dialog(), x, y, w, h), - _type(0), _boss(boss), _font(font), _id(-1), @@ -293,7 +292,6 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, const GUI::Font& font, _align(align) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG; - _type = kStaticTextWidget; _bgcolor = kDlgColor; _bgcolorhi = kDlgColor; _textcolor = kTextColor; @@ -337,7 +335,6 @@ ButtonWidget::ButtonWidget(GuiObject *boss, const GUI::Font& font, _cmd(cmd) { _flags = WIDGET_ENABLED | WIDGET_BORDER | WIDGET_CLEARBG; - _type = kButtonWidget; _bgcolor = kBtnColor; _bgcolorhi = kBtnColorHi; _textcolor = kBtnTextColor; @@ -446,7 +443,6 @@ CheckboxWidget::CheckboxWidget(GuiObject *boss, const GUI::Font& font, _textY(0) { _flags = WIDGET_ENABLED; - _type = kCheckboxWidget; _bgcolor = _bgcolorhi = kWidColor; _editable = true; @@ -555,7 +551,6 @@ SliderWidget::SliderWidget(GuiObject *boss, const GUI::Font& font, _labelWidth(labelWidth) { _flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG; - _type = kSliderWidget; _bgcolor = kDlgColor; _bgcolorhi = kDlgColor; diff --git a/src/gui/Widget.hxx b/src/gui/Widget.hxx index 4750fb596..08afdfb30 100644 --- a/src/gui/Widget.hxx +++ b/src/gui/Widget.hxx @@ -50,39 +50,6 @@ enum { WIDGET_WANTS_RAWDATA = 1 << 8 }; -enum { - kStaticTextWidget = 'TEXT', - kEditTextWidget = 'EDIT', - kButtonWidget = 'BTTN', - kCheckboxWidget = 'CHKB', - kSliderWidget = 'SLDE', - kListWidget = 'LIST', - kScrollBarWidget = 'SCRB', - kPopUpWidget = 'POPU', - kTabWidget = 'TABW', - kEventMappingWidget = 'EVMP', - kEditableWidget = 'EDLE', - kAudioWidget = 'AUDW', - kColorWidget = 'COLR', - kCpuWidget = 'CPUW', - kDataGridOpsWidget = 'BGRO', - kDataGridWidget = 'BGRI', - kPromptWidget = 'PROM', - kRamWidget = 'RAMW', - kRiotWidget = 'RIOW', - kRomListWidget = 'ROML', - kRomWidget = 'ROMW', - kTiaInfoWidget = 'TIAI', - kTiaOutputWidget = 'TIAO', - kTiaWidget = 'TIAW', - kTiaZoomWidget = 'TIAZ', - kToggleBitWidget = 'TGLB', - kTogglePixelWidget = 'TGLP', - kToggleWidget = 'TOGL', - kControllerWidget = 'CTRL', - kCartDebugWidget = 'CDBG' -}; - /** This is the base class for all widgets. @@ -160,7 +127,6 @@ class Widget : public GuiObject { assert(_boss); _boss->handleCommand(sender, cmd, data, id); } protected: - int _type; GuiObject* _boss; const GUI::Font& _font; Widget* _next;