Merge branch 'release/6.0'

This commit is contained in:
Christian Speckner 2018-08-10 00:47:21 +02:00
commit 5a705ad4e9
59 changed files with 400 additions and 232 deletions

View File

@ -46,7 +46,7 @@ FBSurfaceSDL2::~FBSurfaceSDL2()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceSDL2::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color) void FBSurfaceSDL2::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
{ {
// Fill the rectangle // Fill the rectangle
SDL_Rect tmp; SDL_Rect tmp;

View File

@ -38,7 +38,7 @@ class FBSurfaceSDL2 : public FBSurface
// Most of the surface drawing primitives are implemented in FBSurface; // Most of the surface drawing primitives are implemented in FBSurface;
// the ones implemented here use SDL-specific code for extra performance // the ones implemented here use SDL-specific code for extra performance
// //
void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color) override; void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color) override;
// With hardware surfaces, it's faster to just update the entire surface // With hardware surfaces, it's faster to just update the entire surface
void setDirty() override { mySurfaceIsDirty = true; } void setDirty() override { mySurfaceIsDirty = true; }

View File

@ -38,7 +38,7 @@ void RewindManager::setup()
{ {
myLastTimeMachineAdd = false; myLastTimeMachineAdd = false;
string prefix = myOSystem.settings().getBool("dev.settings") ? "dev." : "plr."; const string& prefix = myOSystem.settings().getBool("dev.settings") ? "dev." : "plr.";
mySize = myOSystem.settings().getInt(prefix + "tm.size"); mySize = myOSystem.settings().getInt(prefix + "tm.size");
if(mySize != myStateList.capacity()) if(mySize != myStateList.capacity())

View File

@ -27,7 +27,7 @@
#include "StateManager.hxx" #include "StateManager.hxx"
#define STATE_HEADER "05019000state" #define STATE_HEADER "05099000state"
// #define MOVIE_HEADER "03030000movie" // #define MOVIE_HEADER "03030000movie"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -19,6 +19,6 @@
#define VERSION_HXX #define VERSION_HXX
#define STELLA_VERSION "6.0_pre1" #define STELLA_VERSION "6.0_pre1"
#define STELLA_BUILD "4409" #define STELLA_BUILD "4434"
#endif #endif

View File

@ -0,0 +1,41 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2018 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================
#include <cmath>
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#include "HighPass.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HighPass::HighPass(float cutOffFrequency, float frequency)
: myLastValueIn(0),
myLastValueOut(0),
myAlpha(1.f / (1.f + 2.f*M_PI*cutOffFrequency/frequency))
{}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
float HighPass::apply(float valueIn)
{
float valueOut = myAlpha * (myLastValueOut + valueIn - myLastValueIn);
myLastValueIn = valueIn;
myLastValueOut = valueOut;
return valueOut;
}

View File

@ -0,0 +1,42 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2018 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================
#ifndef HIGH_PASS_HXX
#define HIGH_PASS_HXX
class HighPass
{
public:
HighPass(float cutOffFrequency, float frequency);
float apply(float value);
private:
float myLastValueIn;
float myLastValueOut;
float myAlpha;
private:
HighPass() = delete;
};
#endif // HIGH_PASS_HXX

View File

@ -25,6 +25,7 @@
namespace { namespace {
constexpr float CLIPPING_FACTOR = 0.75; constexpr float CLIPPING_FACTOR = 0.75;
constexpr float HIGH_PASS_CUT_OFF = 10;
uInt32 reducedDenominator(uInt32 n, uInt32 d) uInt32 reducedDenominator(uInt32 n, uInt32 d)
{ {
@ -78,6 +79,9 @@ LanczosResampler::LanczosResampler(
myCurrentFragment(nullptr), myCurrentFragment(nullptr),
myFragmentIndex(0), myFragmentIndex(0),
myIsUnderrun(true), myIsUnderrun(true),
myHighPassL(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)),
myHighPassR(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)),
myHighPass(HIGH_PASS_CUT_OFF, float(formatFrom.sampleRate)),
myTimeIndex(0) myTimeIndex(0)
{ {
myPrecomputedKernels = make_unique<float[]>(myPrecomputedKernelCount * myKernelSize); myPrecomputedKernels = make_unique<float[]>(myPrecomputedKernelCount * myKernelSize);
@ -184,11 +188,11 @@ inline void LanczosResampler::shiftSamples(uInt32 samplesToShift)
{ {
while (samplesToShift-- > 0) { while (samplesToShift-- > 0) {
if (myFormatFrom.stereo) { if (myFormatFrom.stereo) {
myBufferL->shift(myCurrentFragment[2*myFragmentIndex] / static_cast<float>(0x7fff)); myBufferL->shift(myHighPassL.apply(myCurrentFragment[2*myFragmentIndex] / static_cast<float>(0x7fff)));
myBufferR->shift(myCurrentFragment[2*myFragmentIndex + 1] / static_cast<float>(0x7fff)); myBufferR->shift(myHighPassR.apply(myCurrentFragment[2*myFragmentIndex + 1] / static_cast<float>(0x7fff)));
} }
else else
myBuffer->shift(myCurrentFragment[myFragmentIndex] / static_cast<float>(0x7fff)); myBuffer->shift(myHighPass.apply(myCurrentFragment[myFragmentIndex] / static_cast<float>(0x7fff)));
myFragmentIndex++; myFragmentIndex++;

View File

@ -21,6 +21,7 @@
#include "bspf.hxx" #include "bspf.hxx"
#include "Resampler.hxx" #include "Resampler.hxx"
#include "ConvolutionBuffer.hxx" #include "ConvolutionBuffer.hxx"
#include "HighPass.hxx"
class LanczosResampler : public Resampler class LanczosResampler : public Resampler
{ {
@ -59,6 +60,10 @@ class LanczosResampler : public Resampler
uInt32 myFragmentIndex; uInt32 myFragmentIndex;
bool myIsUnderrun; bool myIsUnderrun;
HighPass myHighPassL;
HighPass myHighPassR;
HighPass myHighPass;
uInt32 myTimeIndex; uInt32 myTimeIndex;
}; };

View File

@ -3,7 +3,8 @@ MODULE := src/common/audio
MODULE_OBJS := \ MODULE_OBJS := \
src/common/audio/SimpleResampler.o \ src/common/audio/SimpleResampler.o \
src/common/audio/ConvolutionBuffer.o \ src/common/audio/ConvolutionBuffer.o \
src/common/audio/LanczosResampler.o src/common/audio/LanczosResampler.o \
src/common/audio/HighPass.o
MODULE_DIRS += \ MODULE_DIRS += \
src/emucore/tia src/emucore/tia

View File

@ -49,15 +49,17 @@ const DebuggerState& TIADebug::getState()
myState.coluRegs.push_back(coluBK()); myState.coluRegs.push_back(coluBK());
// Debug Colors // Debug Colors
int mode = myTIA.frameLayout() == FrameLayout::ntsc ? 0 : 1; int timing = myTIA.consoleTiming() == ConsoleTiming::ntsc ? 0
: myTIA.consoleTiming() == ConsoleTiming::pal ? 1 : 2;
myState.fixedCols.clear(); myState.fixedCols.clear();
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::P0]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::P0]);
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::P1]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::P1]);
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::PF]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::PF]);
myState.fixedCols.push_back(TIA::FixedColor::BK_GREY); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::BK]);
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::M0]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::M0]);
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::M1]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::M1]);
myState.fixedCols.push_back(myTIA.myFixedColorPalette[mode][TIA::BL]); myState.fixedCols.push_back(myTIA.myFixedColorPalette[timing][TIA::BL]);
myState.fixedCols.push_back(TIA::FixedColor::HBLANK_WHITE); myState.fixedCols.push_back(TIA::FixedColor::HBLANK_WHITE);
// Collisions // Collisions
@ -1012,20 +1014,22 @@ string TIADebug::debugColors() const
{ {
ostringstream buf; ostringstream buf;
int mode = myTIA.frameLayout() == FrameLayout::ntsc ? 0 : 1; int timing = myTIA.consoleTiming() == ConsoleTiming::ntsc ? 0
buf << " " << myTIA.myFixedColorNames[TIA::P0] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P0]) : myTIA.consoleTiming() == ConsoleTiming::pal ? 1 : 2;
buf << " " << myTIA.myFixedColorNames[TIA::P0] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::P0])
<< " Player 0\n" << " Player 0\n"
<< " " << myTIA.myFixedColorNames[TIA::M0] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M0]) << " " << myTIA.myFixedColorNames[TIA::M0] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::M0])
<< " Missile 0\n" << " Missile 0\n"
<< " " << myTIA.myFixedColorNames[TIA::P1] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::P1]) << " " << myTIA.myFixedColorNames[TIA::P1] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::P1])
<< " Player 1\n" << " Player 1\n"
<< " " << myTIA.myFixedColorNames[TIA::M1] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::M1]) << " " << myTIA.myFixedColorNames[TIA::M1] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::M1])
<< " Missile 1\n" << " Missile 1\n"
<< " " << myTIA.myFixedColorNames[TIA::PF] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::PF]) << " " << myTIA.myFixedColorNames[TIA::PF] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::PF])
<< " Playfield\n" << " Playfield\n"
<< " " << myTIA.myFixedColorNames[TIA::BL] << " " << colorSwatch(myTIA.myFixedColorPalette[mode][TIA::BL]) << " " << myTIA.myFixedColorNames[TIA::BL] << " " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::BL])
<< " Ball\n" << " Ball\n"
<< " Grey " << colorSwatch(TIA::FixedColor::BK_GREY) << " Grey " << colorSwatch(myTIA.myFixedColorPalette[timing][TIA::BK])
<< " Background\n" << " Background\n"
<< " White " << colorSwatch(TIA::FixedColor::HBLANK_WHITE) << " White " << colorSwatch(TIA::FixedColor::HBLANK_WHITE)
<< " HMOVE\n"; << " HMOVE\n";

View File

@ -596,7 +596,7 @@ void DataGridWidget::drawWidget(bool hilite)
bool onTop = _boss->dialog().isOnTop(); bool onTop = _boss->dialog().isOnTop();
int row, col; int row, col;
s.fillRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? _bgcolorhi : onTop ? _bgcolor : _bgcolorlo); s.fillRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? _bgcolorhi : onTop ? _bgcolor : kBGColorHi);
// Draw the internal grid and labels // Draw the internal grid and labels
int linewidth = _cols * _colWidth; int linewidth = _cols * _colWidth;
s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor); s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
@ -615,7 +615,7 @@ void DataGridWidget::drawWidget(bool hilite)
int x = _x + 4 + (col * _colWidth); int x = _x + 4 + (col * _colWidth);
int y = _y + 2 + (row * _rowHeight); int y = _y + 2 + (row * _rowHeight);
int pos = row*_cols + col; int pos = row*_cols + col;
uInt32 textColor = onTop ? kTextColor : kColor; ColorId textColor = onTop ? kTextColor : kColor;
// Draw the selected item inverted, on a highlighted background. // Draw the selected item inverted, on a highlighted background.
if (_currentRow == row && _currentCol == col && if (_currentRow == row && _currentCol == col &&
@ -635,7 +635,8 @@ void DataGridWidget::drawWidget(bool hilite)
{ {
if(_changedList[pos]) if(_changedList[pos])
{ {
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kDbgChangedColor : _bgcolorlo); s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
onTop ? kDbgChangedColor : _bgcolorlo);
if(_hiliteList[pos]) if(_hiliteList[pos])
textColor = kDbgColorHi; textColor = kDbgColorHi;

View File

@ -90,6 +90,7 @@ void DelayQueueWidget::loadConfig() {
void DelayQueueWidget::drawWidget(bool hilite) void DelayQueueWidget::drawWidget(bool hilite)
{ {
FBSurface& surface = _boss->dialog().surface(); FBSurface& surface = _boss->dialog().surface();
bool onTop = _boss->dialog().isOnTop();
int y = _y, int y = _y,
x = _x, x = _x,
@ -101,14 +102,14 @@ void DelayQueueWidget::drawWidget(bool hilite)
y += 1; y += 1;
x += 1; x += 1;
w -= 1; w -= 1;
surface.fillRect(x, y, w - 1, _h - 2, kDlgColor); surface.fillRect(x, y, w - 1, _h - 2, onTop ? kDlgColor : _bgcolorlo);
y += 2; y += 2;
x += 2; x += 2;
w -= 3; w -= 3;
for (const auto& line : myLines) { for (const auto& line : myLines) {
surface.drawString(_font, line, x, y, w, _textcolor); surface.drawString(_font, line, x, y, w, onTop ? _textcolor : kColor);
y += lineHeight; y += lineHeight;
} }
} }

View File

@ -72,7 +72,7 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font,
void PromptWidget::drawWidget(bool hilite) void PromptWidget::drawWidget(bool hilite)
{ {
//cerr << "PromptWidget::drawWidget\n"; //cerr << "PromptWidget::drawWidget\n";
uInt32 fgcolor, bgcolor; ColorId fgcolor, bgcolor;
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
bool onTop = _boss->dialog().isOnTop(); bool onTop = _boss->dialog().isOnTop();
@ -90,11 +90,11 @@ void PromptWidget::drawWidget(bool hilite)
if(c & (1 << 17)) // inverse video flag if(c & (1 << 17)) // inverse video flag
{ {
fgcolor = _bgcolor; fgcolor = _bgcolor;
bgcolor = (c & 0x1ffff) >> 8; bgcolor = ColorId((c & 0x1ffff) >> 8);
s.fillRect(x, y, _kConsoleCharWidth, _kConsoleCharHeight, bgcolor); s.fillRect(x, y, _kConsoleCharWidth, _kConsoleCharHeight, bgcolor);
} }
else else
fgcolor = c >> 8; fgcolor = ColorId(c >> 8);
s.drawChar(_font, c & 0x7f, x, y, onTop ? fgcolor : kColor); s.drawChar(_font, c & 0x7f, x, y, onTop ? fgcolor : kColor);
x += _kConsoleCharWidth; x += _kConsoleCharWidth;
@ -833,13 +833,11 @@ void PromptWidget::putcharIntern(int c)
nextLine(); nextLine();
else if(c & 0x80) { // set foreground color to TIA color else if(c & 0x80) { // set foreground color to TIA color
// don't print or advance cursor // don't print or advance cursor
// there are only 128 TIA colors, but _textcolor = ColorId((c & 0x7f) << 1);
// OverlayColor contains 256 of them
_textcolor = (c & 0x7f) << 1;
} }
else if(c && c < 0x1e) { // first actual character is large dash else if(c && c < 0x1e) { // first actual character is large dash
// More colors (the regular GUI ones) // More colors (the regular GUI ones)
_textcolor = c + 0x100; _textcolor = ColorId(c + 0x100);
} }
else if(c == 0x7f) { // toggle inverse video (DEL char) else if(c == 0x7f) { // toggle inverse video (DEL char)
_inverse = !_inverse; _inverse = !_inverse;
@ -869,6 +867,7 @@ void PromptWidget::drawCaret()
{ {
//cerr << "PromptWidget::drawCaret()\n"; //cerr << "PromptWidget::drawCaret()\n";
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
bool onTop = _boss->dialog().isOnTop();
int line = _currentPos / _lineWidth; int line = _currentPos / _lineWidth;
@ -881,7 +880,7 @@ void PromptWidget::drawCaret()
int y = _y + displayLine * _kConsoleLineHeight; int y = _y + displayLine * _kConsoleLineHeight;
char c = buffer(_currentPos); char c = buffer(_currentPos);
s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, kTextColor); s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, onTop ? kTextColor : kColor);
s.drawChar(_font, c, x, y + 2, kBGColor); s.drawChar(_font, c, x, y + 2, kBGColor);
} }

View File

@ -468,7 +468,7 @@ void RomListWidget::drawWidget(bool hilite)
bool onTop = _boss->dialog().isOnTop(); bool onTop = _boss->dialog().isOnTop();
const CartDebug::DisassemblyList& dlist = myDisasm->list; const CartDebug::DisassemblyList& dlist = myDisasm->list;
int i, pos, xpos, ypos, len = int(dlist.size()); int i, pos, xpos, ypos, len = int(dlist.size());
uInt32 textColor = onTop ? kTextColor : kColor; ColorId textColor = onTop ? kTextColor : kColor;
const GUI::Rect& r = getEditRect(); const GUI::Rect& r = getEditRect();
const GUI::Rect& l = getLineRect(); const GUI::Rect& l = getLineRect();
@ -489,7 +489,7 @@ void RomListWidget::drawWidget(bool hilite)
xpos = _x + CheckboxWidget::boxSize() + 10; ypos = _y + 2; xpos = _x + CheckboxWidget::boxSize() + 10; ypos = _y + 2;
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++, ypos += _fontHeight) for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++, ypos += _fontHeight)
{ {
uInt32 bytesColor = textColor; ColorId bytesColor = textColor;
// Draw checkboxes for correct lines (takes scrolling into account) // Draw checkboxes for correct lines (takes scrolling into account)
myCheckList[i]->setState(myBPState->isSet(dlist[pos].address)); myCheckList[i]->setState(myBPState->isSet(dlist[pos].address));

View File

@ -273,7 +273,7 @@ void TiaZoomWidget::drawWidget(bool hilite)
for(x = myXOff, col = 0; x < myNumCols+myXOff; ++x, col += wzoom) for(x = myXOff, col = 0; x < myNumCols+myXOff; ++x, col += wzoom)
{ {
uInt32 idx = y*width + x; uInt32 idx = y*width + x;
uInt32 color = currentFrame[idx] | (idx > scanoffset ? 1 : 0); ColorId color = ColorId(currentFrame[idx] | (idx > scanoffset ? 1 : 0));
s.fillRect(_x + col + 1, _y + row + 1, wzoom, hzoom, color); s.fillRect(_x + col + 1, _y + row + 1, wzoom, hzoom, color);
} }
} }

View File

@ -30,6 +30,7 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font,
{ {
_rowHeight = font.getLineHeight(); _rowHeight = font.getLineHeight();
_colWidth = colchars * font.getMaxCharWidth() + 8; _colWidth = colchars * font.getMaxCharWidth() + 8;
_bgcolorlo = kDlgColor;
// Make sure all lists contain some default values // Make sure all lists contain some default values
int size = _rows * _cols; int size = _rows * _cols;
@ -93,7 +94,7 @@ void ToggleBitWidget::drawWidget(bool hilite)
{ {
for (col = 0; col < _cols; col++) for (col = 0; col < _cols; col++)
{ {
uInt32 textColor = kTextColor; ColorId textColor = kTextColor;
int x = _x + 4 + (col * _colWidth); int x = _x + 4 + (col * _colWidth);
int y = _y + 2 + (row * _rowHeight); int y = _y + 2 + (row * _rowHeight);
int pos = row*_cols + col; int pos = row*_cols + col;
@ -115,16 +116,18 @@ void ToggleBitWidget::drawWidget(bool hilite)
// Highlight changes // Highlight changes
if(_changedList[pos]) if(_changedList[pos])
{ {
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kDbgChangedColor : _bgcolorlo); s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
onTop ? kDbgChangedColor : _bgcolorlo);
s.drawString(_font, buffer, x, y, _colWidth, onTop ? kDbgChangedTextColor : kColor); s.drawString(_font, buffer, x, y, _colWidth, onTop ? kDbgChangedTextColor : kColor);
} }
else else
s.drawString(_font, buffer, x, y, _colWidth, onTop ? textColor : kColor); s.drawString(_font, buffer, x, y, _colWidth,
onTop ? textColor : kColor);
} }
else else
{ {
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kBGColorHi); s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kBGColorHi : kDlgColor);
s.drawString(_font, buffer, x, y, _colWidth, kTextColor); s.drawString(_font, buffer, x, y, _colWidth, onTop ? kTextColor : kColor);
} }
} }
} }

View File

@ -121,6 +121,7 @@ void TogglePixelWidget::drawWidget(bool hilite)
{ {
//cerr << "TogglePixelWidget::drawWidget\n"; //cerr << "TogglePixelWidget::drawWidget\n";
FBSurface& s = dialog().surface(); FBSurface& s = dialog().surface();
bool onTop = _boss->dialog().isOnTop();
int row, col; int row, col;
s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor); s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
@ -148,7 +149,7 @@ void TogglePixelWidget::drawWidget(bool hilite)
// Either draw the pixel in given color, or erase (show background) // Either draw the pixel in given color, or erase (show background)
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
_stateList[pos] ? _pixelColor : _backgroundColor); _stateList[pos] ? onTop ? _pixelColor : kColor : onTop ? _backgroundColor : kBGColorLo);
if (_changedList[pos]) if (_changedList[pos])
s.frameRect(x - 3, y - 1, _colWidth - 1, _rowHeight - 1, kDbgChangedColor); s.frameRect(x - 3, y - 1, _colWidth - 1, _rowHeight - 1, kDbgChangedColor);
} }

View File

@ -28,11 +28,11 @@ class TogglePixelWidget : public ToggleWidget
int x, int y, int cols, int rows); int x, int y, int cols, int rows);
virtual ~TogglePixelWidget() = default; virtual ~TogglePixelWidget() = default;
void setColor(int color) { void setColor(ColorId color) {
_pixelColor = (color >= 0 && color <= kNumColors) ? color : kDlgColor; _pixelColor = color <= kNumColors ? color : kDlgColor;
} }
void setBackgroundColor(int color) { void setBackgroundColor(ColorId color) {
_backgroundColor = (color >= 0 && color <= kNumColors) ? color : kDlgColor; _backgroundColor = color <= kNumColors ? color : kDlgColor;
} }
void setState(const BoolArray& state); void setState(const BoolArray& state);
@ -42,7 +42,7 @@ class TogglePixelWidget : public ToggleWidget
void setCrossed(bool enable) { _crossBits = enable; } void setCrossed(bool enable) { _crossBits = enable; }
private: private:
int _pixelColor, _backgroundColor; ColorId _pixelColor, _backgroundColor;
bool _swapBits; bool _swapBits;
bool _crossBits; bool _crossBits;

View File

@ -64,7 +64,7 @@ CartridgeBUS::CartridgeBUS(const BytePtr& image, uInt32 size,
myDisplayImage = myBUSRAM + DSRAM; myDisplayImage = myBUSRAM + DSRAM;
// Create Thumbulator ARM emulator // Create Thumbulator ARM emulator
string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev.";
myThumbEmulator = make_unique<Thumbulator>( myThumbEmulator = make_unique<Thumbulator>(
reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myBUSRAM), reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myBUSRAM),
settings.getBool(prefix + "thumb.trapfatal"), Thumbulator::ConfigureFor::BUS, this settings.getBool(prefix + "thumb.trapfatal"), Thumbulator::ConfigureFor::BUS, this

View File

@ -67,7 +67,7 @@ CartridgeCDF::CartridgeCDF(const BytePtr& image, uInt32 size,
setVersion(); setVersion();
// Create Thumbulator ARM emulator // Create Thumbulator ARM emulator
string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev.";
myThumbEmulator = make_unique<Thumbulator>( myThumbEmulator = make_unique<Thumbulator>(
reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myCDFRAM), reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myCDFRAM),
settings.getBool(prefix + "thumb.trapfatal"), myVersion ? settings.getBool(prefix + "thumb.trapfatal"), myVersion ?

View File

@ -53,7 +53,7 @@ CartridgeDPCPlus::CartridgeDPCPlus(const BytePtr& image, uInt32 size,
myFrequencyImage = myDisplayImage + 0x1000; myFrequencyImage = myDisplayImage + 0x1000;
// Create Thumbulator ARM emulator // Create Thumbulator ARM emulator
string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev.";
myThumbEmulator = make_unique<Thumbulator> myThumbEmulator = make_unique<Thumbulator>
(reinterpret_cast<uInt16*>(myImage), (reinterpret_cast<uInt16*>(myImage),
reinterpret_cast<uInt16*>(myDPCRAM), reinterpret_cast<uInt16*>(myDPCRAM),

View File

@ -491,6 +491,9 @@ void Console::setPalette(const string& type)
palettes[paletteNum][0]; palettes[paletteNum][0];
myOSystem.frameBuffer().setPalette(palette); myOSystem.frameBuffer().setPalette(palette);
if(myTIA->usingFixedColors())
myTIA->enableFixedColors(true);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -35,7 +35,7 @@ class DispatchResult
const string& getMessage() const { assertStatus(Status::debugger); return myMessage; } const string& getMessage() const { assertStatus(Status::debugger); return myMessage; }
uInt16 getAddress() const { assertStatus(Status::debugger); return myAddress; } int getAddress() const { assertStatus(Status::debugger); return myAddress; }
bool wasReadTrap() const { assertStatus(Status::debugger); return myWasReadTrap; } bool wasReadTrap() const { assertStatus(Status::debugger); return myWasReadTrap; }

View File

@ -60,7 +60,7 @@ void FBSurface::readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) c
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::pixel(uInt32 x, uInt32 y, uInt32 color) void FBSurface::pixel(uInt32 x, uInt32 y, ColorId color)
{ {
uInt32* buffer = myPixels + y * myPitch + x; uInt32* buffer = myPixels + y * myPitch + x;
@ -68,7 +68,7 @@ void FBSurface::pixel(uInt32 x, uInt32 y, uInt32 color)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::line(uInt32 x, uInt32 y, uInt32 x2, uInt32 y2, uInt32 color) void FBSurface::line(uInt32 x, uInt32 y, uInt32 x2, uInt32 y2, ColorId color)
{ {
// draw line using Bresenham algorithm // draw line using Bresenham algorithm
Int32 dx = (x2 - x); Int32 dx = (x2 - x);
@ -127,7 +127,7 @@ void FBSurface::line(uInt32 x, uInt32 y, uInt32 x2, uInt32 y2, uInt32 color)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color) void FBSurface::hLine(uInt32 x, uInt32 y, uInt32 x2, ColorId color)
{ {
uInt32* buffer = myPixels + y * myPitch + x; uInt32* buffer = myPixels + y * myPitch + x;
while(x++ <= x2) while(x++ <= x2)
@ -135,7 +135,7 @@ void FBSurface::hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color) void FBSurface::vLine(uInt32 x, uInt32 y, uInt32 y2, ColorId color)
{ {
uInt32* buffer = static_cast<uInt32*>(myPixels + y * myPitch + x); uInt32* buffer = static_cast<uInt32*>(myPixels + y * myPitch + x);
while(y++ <= y2) while(y++ <= y2)
@ -146,7 +146,7 @@ void FBSurface::vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color) void FBSurface::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
{ {
while(h--) while(h--)
hLine(x, y+h, x+w-1, color); hLine(x, y+h, x+w-1, color);
@ -154,9 +154,9 @@ void FBSurface::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::drawChar(const GUI::Font& font, uInt8 chr, void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
uInt32 tx, uInt32 ty, uInt32 color, uInt32 shadowColor) uInt32 tx, uInt32 ty, ColorId color, ColorId shadowColor)
{ {
if(shadowColor != 0) if(shadowColor != kNone)
{ {
drawChar(font, chr, tx + 1, ty + 0, shadowColor); drawChar(font, chr, tx + 1, ty + 0, shadowColor);
drawChar(font, chr, tx + 0, ty + 1, shadowColor); drawChar(font, chr, tx + 0, ty + 1, shadowColor);
@ -208,14 +208,14 @@ void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty, void FBSurface::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty,
uInt32 color, uInt32 h) ColorId color, uInt32 h)
{ {
drawBitmap(bitmap, tx, ty, color, h, h); drawBitmap(bitmap, tx, ty, color, h, h);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty, void FBSurface::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty,
uInt32 color, uInt32 w, uInt32 h) ColorId color, uInt32 w, uInt32 h)
{ {
uInt32* buffer = myPixels + ty * myPitch + tx; uInt32* buffer = myPixels + ty * myPitch + tx;
@ -241,7 +241,7 @@ void FBSurface::drawPixels(uInt32* data, uInt32 tx, uInt32 ty, uInt32 numpixels)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::box(uInt32 x, uInt32 y, uInt32 w, uInt32 h, void FBSurface::box(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 colorA, uInt32 colorB) ColorId colorA, ColorId colorB)
{ {
hLine(x + 1, y, x + w - 2, colorA); hLine(x + 1, y, x + w - 2, colorA);
hLine(x, y + 1, x + w - 1, colorA); hLine(x, y + 1, x + w - 1, colorA);
@ -256,7 +256,7 @@ void FBSurface::box(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 color, FrameStyle style) ColorId color, FrameStyle style)
{ {
switch(style) switch(style)
{ {
@ -285,8 +285,8 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::drawString(const GUI::Font& font, const string& s, void FBSurface::drawString(const GUI::Font& font, const string& s,
int x, int y, int w, int x, int y, int w,
uInt32 color, TextAlign align, ColorId color, TextAlign align,
int deltax, bool useEllipsis, uInt32 shadowColor) int deltax, bool useEllipsis, ColorId shadowColor)
{ {
const string ELLIPSIS = "\x1d"; // "..." const string ELLIPSIS = "\x1d"; // "..."
const int leftX = x, rightX = x + w; const int leftX = x, rightX = x + w;

View File

@ -79,7 +79,7 @@ class FBSurface
@param y The y coordinate @param y The y coordinate
@param color The color of the line @param color The color of the line
*/ */
virtual void pixel(uInt32 x, uInt32 y, uInt32 color); virtual void pixel(uInt32 x, uInt32 y, ColorId color);
/** /**
This method should be called to draw a line. This method should be called to draw a line.
@ -90,7 +90,7 @@ class FBSurface
@param y2 The second y coordinate @param y2 The second y coordinate
@param color The color of the line @param color The color of the line
*/ */
virtual void line(uInt32 x, uInt32 y, uInt32 x2, uInt32 y2, uInt32 color); virtual void line(uInt32 x, uInt32 y, uInt32 x2, uInt32 y2, ColorId color);
/** /**
This method should be called to draw a horizontal line. This method should be called to draw a horizontal line.
@ -100,7 +100,7 @@ class FBSurface
@param x2 The second x coordinate @param x2 The second x coordinate
@param color The color of the line @param color The color of the line
*/ */
virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color); virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, ColorId color);
/** /**
This method should be called to draw a vertical line. This method should be called to draw a vertical line.
@ -110,7 +110,7 @@ class FBSurface
@param y2 The second y coordinate @param y2 The second y coordinate
@param color The color of the line @param color The color of the line
*/ */
virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color); virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, ColorId color);
/** /**
This method should be called to draw a filled rectangle. This method should be called to draw a filled rectangle.
@ -122,7 +122,7 @@ class FBSurface
@param color The fill color of the rectangle @param color The fill color of the rectangle
*/ */
virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 color); ColorId color);
/** /**
This method should be called to draw the specified character. This method should be called to draw the specified character.
@ -134,7 +134,7 @@ class FBSurface
@param color The color of the character @param color The color of the character
*/ */
virtual void drawChar(const GUI::Font& font, uInt8 c, uInt32 x, uInt32 y, virtual void drawChar(const GUI::Font& font, uInt8 c, uInt32 x, uInt32 y,
uInt32 color, uInt32 shadowColor = 0); ColorId color, ColorId shadowColor = kNone);
/** /**
This method should be called to draw the bitmap image. This method should be called to draw the bitmap image.
@ -145,7 +145,7 @@ class FBSurface
@param color The color of the bitmap @param color The color of the bitmap
@param h The height of the data image @param h The height of the data image
*/ */
virtual void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, uInt32 color, virtual void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, ColorId color,
uInt32 h = 8); uInt32 h = 8);
/** /**
@ -158,7 +158,7 @@ class FBSurface
@param w The width of the data image @param w The width of the data image
@param h The height of the data image @param h The height of the data image
*/ */
virtual void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, uInt32 color, virtual void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, ColorId color,
uInt32 w, uInt32 h); uInt32 w, uInt32 h);
/** /**
@ -185,7 +185,7 @@ class FBSurface
@param colorB Darker color for inside line. @param colorB Darker color for inside line.
*/ */
virtual void box(uInt32 x, uInt32 y, uInt32 w, uInt32 h, virtual void box(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 colorA, uInt32 colorB); ColorId colorA, ColorId colorB);
/** /**
This method should be called to draw a framed rectangle with This method should be called to draw a framed rectangle with
@ -199,7 +199,7 @@ class FBSurface
@param style The 'FrameStyle' to use for the surrounding frame @param style The 'FrameStyle' to use for the surrounding frame
*/ */
virtual void frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, virtual void frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 color, FrameStyle style = FrameStyle::Solid); ColorId color, FrameStyle style = FrameStyle::Solid);
/** /**
This method should be called to draw the specified string. This method should be called to draw the specified string.
@ -216,8 +216,8 @@ class FBSurface
*/ */
virtual void drawString( virtual void drawString(
const GUI::Font& font, const string& s, int x, int y, int w, const GUI::Font& font, const string& s, int x, int y, int w,
uInt32 color, TextAlign align = TextAlign::Left, ColorId color, TextAlign align = TextAlign::Left,
int deltax = 0, bool useEllipsis = true, uInt32 shadowColor = 0); int deltax = 0, bool useEllipsis = true, ColorId shadowColor = kNone);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Note: The following methods are FBSurface-specific, and must be // Note: The following methods are FBSurface-specific, and must be

View File

@ -138,7 +138,7 @@ bool FrameBuffer::initialize()
else if(myOSystem.settings().getString("uipalette") == "light") else if(myOSystem.settings().getString("uipalette") == "light")
palID = 2; palID = 2;
for(int i = 0, j = 256; i < kNumColors-256; ++i, ++j) for(uInt32 i = 0, j = 256; i < kNumColors-256; ++i, ++j)
{ {
uInt8 r = (ourGUIColors[palID][i] >> 16) & 0xff; uInt8 r = (ourGUIColors[palID][i] >> 16) & 0xff;
uInt8 g = (ourGUIColors[palID][i] >> 8) & 0xff; uInt8 g = (ourGUIColors[palID][i] >> 8) & 0xff;
@ -413,7 +413,6 @@ void FrameBuffer::showMessage(const string& message, MessagePosition position,
void FrameBuffer::drawFrameStats(float framesPerSecond) void FrameBuffer::drawFrameStats(float framesPerSecond)
{ {
const ConsoleInfo& info = myOSystem.console().about(); const ConsoleInfo& info = myOSystem.console().about();
uInt32 color;
int xPos = 2, yPos = 0; int xPos = 2, yPos = 0;
const int dy = font().getFontHeight() + 2; const int dy = font().getFontHeight() + 2;
@ -422,8 +421,8 @@ void FrameBuffer::drawFrameStats(float framesPerSecond)
myStatsMsg.surface->invalidate(); myStatsMsg.surface->invalidate();
// draw scanlines // draw scanlines
color = myOSystem.console().tia().frameBufferScanlinesLastFrame() != myLastScanlines ? ColorId color = myOSystem.console().tia().frameBufferScanlinesLastFrame() != myLastScanlines ?
uInt32(kDbgColorRed) : myStatsMsg.color; kDbgColorRed : myStatsMsg.color;
ss ss
<< myOSystem.console().tia().frameBufferScanlinesLastFrame() << myOSystem.console().tia().frameBufferScanlinesLastFrame()

View File

@ -518,13 +518,13 @@ class FrameBuffer
int counter; int counter;
int x, y, w, h; int x, y, w, h;
MessagePosition position; MessagePosition position;
uInt32 color; ColorId color;
shared_ptr<FBSurface> surface; shared_ptr<FBSurface> surface;
bool enabled; bool enabled;
Message() Message()
: counter(-1), x(0), y(0), w(0), h(0), position(MessagePosition::BottomCenter), : counter(-1), x(0), y(0), w(0), h(0), position(MessagePosition::BottomCenter),
color(0), enabled(false) { } color(kNone), enabled(false) { }
}; };
Message myMsg; Message myMsg;
Message myStatsMsg; Message myStatsMsg;

View File

@ -18,6 +18,8 @@
#ifndef FRAMEBUFFER_CONSTANTS_HXX #ifndef FRAMEBUFFER_CONSTANTS_HXX
#define FRAMEBUFFER_CONSTANTS_HXX #define FRAMEBUFFER_CONSTANTS_HXX
#include "bspf.hxx"
// Return values for initialization of framebuffer window // Return values for initialization of framebuffer window
enum class FBInitStatus { enum class FBInitStatus {
Success, Success,
@ -39,47 +41,50 @@ enum class MessagePosition {
BottomRight BottomRight
}; };
// TODO - make this 'enum class'
// Colors indices to use for the various GUI elements // Colors indices to use for the various GUI elements
enum { // Abstract away what a color actually is, so we can easily change it in
// the future, if necessary
using ColorId = uInt32;
static constexpr ColorId
kColor = 256, kColor = 256,
kBGColor, kBGColor = 257,
kBGColorLo, kBGColorLo = 258,
kBGColorHi, kBGColorHi = 259,
kShadowColor, kShadowColor = 260,
kTextColor, kTextColor = 261,
kTextColorHi, kTextColorHi = 262,
kTextColorEm, kTextColorEm = 263,
kTextColorInv, kTextColorInv = 264,
kDlgColor, kDlgColor = 265,
kWidColor, kWidColor = 266,
kWidColorHi, kWidColorHi = 267,
kWidFrameColor, kWidFrameColor = 268,
kBtnColor, kBtnColor = 269,
kBtnColorHi, kBtnColorHi = 270,
kBtnBorderColor, kBtnBorderColor = 271,
kBtnBorderColorHi, kBtnBorderColorHi = 272,
kBtnTextColor, kBtnTextColor = 273,
kBtnTextColorHi, kBtnTextColorHi = 274,
kCheckColor, kCheckColor = 275,
kScrollColor, kScrollColor = 276,
kScrollColorHi, kScrollColorHi = 277,
kSliderColor, kSliderColor = 278,
kSliderColorHi, kSliderColorHi = 279,
kSliderBGColor, kSliderBGColor = 280,
kSliderBGColorHi, kSliderBGColorHi = 281,
kSliderBGColorLo, kSliderBGColorLo = 282,
kDbgChangedColor, kDbgChangedColor = 283,
kDbgChangedTextColor, kDbgChangedTextColor = 284,
kDbgColorHi, kDbgColorHi = 285,
kDbgColorRed, kDbgColorRed = 286,
kColorInfo, kColorInfo = 287,
kColorTitleBar, kColorTitleBar = 288,
kColorTitleText, kColorTitleText = 289,
kColorTitleBarLo, kColorTitleBarLo = 290,
kColorTitleTextLo, kColorTitleTextLo = 291,
kNumColors kNumColors = 292,
}; kNone = 0 // placeholder to represent default/no color
;
// Text alignment modes for drawString() // Text alignment modes for drawString()
enum class TextAlign { enum class TextAlign {

View File

@ -95,7 +95,6 @@ OSystem::OSystem()
mySettings = MediaFactory::createSettings(*this); mySettings = MediaFactory::createSettings(*this);
myAudioSettings = AudioSettings(mySettings.get()); myAudioSettings = AudioSettings(mySettings.get());
myRandom = make_unique<Random>(*this);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -158,8 +157,8 @@ bool OSystem::create()
// a real serial port on the system // a real serial port on the system
mySerialPort = MediaFactory::createSerialPort(); mySerialPort = MediaFactory::createSerialPort();
// Re-initialize random seed // Create random number generator
myRandom->initSeed(); myRandom = make_unique<Random>(uInt32(getTicks()));
// Create PNG handler // Create PNG handler
myPNGLib = make_unique<PNGLibrary>(*this); myPNGLib = make_unique<PNGLibrary>(*this);

View File

@ -149,7 +149,7 @@ void PointingDevice::updateDirection(int counter, float& counterRemainder,
scanCount = INT_MAX; scanCount = INT_MAX;
// Define offset factor for first change, move randomly forward by up to 1/8th // Define offset factor for first change, move randomly forward by up to 1/8th
firstScanOffset = (((firstScanOffset << 3) + rand() % firstScanOffset = (((firstScanOffset << 3) + mySystem.randGenerator().next() %
(1 << 12)) >> 3) & ((1 << 12) - 1); (1 << 12)) >> 3) & ((1 << 12) - 1);
} }
} }

View File

@ -19,7 +19,6 @@
#define RANDOM_HXX #define RANDOM_HXX
#include "bspf.hxx" #include "bspf.hxx"
#include "OSystem.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"
/** /**
@ -35,15 +34,15 @@ class Random : public Serializable
/** /**
Create a new random number generator Create a new random number generator
*/ */
Random(const OSystem& osystem) : myOSystem(osystem) { initSeed(); } Random(uInt32 seed) { initSeed(seed); }
/** /**
Re-initialize the random number generator with a new seed, Re-initialize the random number generator with a new seed,
to generate a different set of random numbers. to generate a different set of random numbers.
*/ */
void initSeed() void initSeed(uInt32 seed)
{ {
myValue = uInt32(myOSystem.getTicks()); myValue = seed;
} }
/** /**
@ -110,9 +109,6 @@ class Random : public Serializable
string name() const override { return "Random"; } string name() const override { return "Random"; }
private: private:
// Set the OSystem we're using
const OSystem& myOSystem;
// Indicates the next random number // Indicates the next random number
// We make this mutable, since it's not immediately obvious that // We make this mutable, since it's not immediately obvious that
// calling next() should change internal state (ie, the *logical* // calling next() should change internal state (ie, the *logical*

View File

@ -39,7 +39,7 @@ System::System(const OSystem& osystem, M6502& m6502, M6532& m6532,
mySystemInAutodetect(false) mySystemInAutodetect(false)
{ {
// Re-initialize random generator // Re-initialize random generator
randGenerator().initSeed(); randGenerator().initSeed(uInt32(myOSystem.getTicks()));
// Initialize page access table // Initialize page access table
PageAccess access(&myNullDevice, System::PA_READ); PageAccess access(&myNullDevice, System::PA_READ);

View File

@ -27,6 +27,7 @@ class NullDevice;
#include "bspf.hxx" #include "bspf.hxx"
#include "Device.hxx" #include "Device.hxx"
#include "NullDev.hxx" #include "NullDev.hxx"
#include "OSystem.hxx"
#include "Random.hxx" #include "Random.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"

View File

@ -65,8 +65,6 @@ void Ball::enabl(uInt8 value)
myTIA->flushLineCache(); myTIA->flushLineCache();
updateEnabled(); updateEnabled();
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
} }
} }
@ -245,7 +243,7 @@ void Ball::updateEnabled()
myIsEnabled = !myIsSuppressed && (myIsDelaying ? myIsEnabledOld : myIsEnabledNew); myIsEnabled = !myIsSuppressed && (myIsDelaying ? myIsEnabledOld : myIsEnabledNew);
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled; collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision(); myTIA->scheduleCollisionUpdate();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -260,7 +260,7 @@ void Missile::updateEnabled()
myIsEnabled = !myIsSuppressed && myEnam && !myResmp; myIsEnabled = !myIsSuppressed && myEnam && !myResmp;
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled; collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision(); myTIA->scheduleCollisionUpdate();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -385,7 +385,7 @@ void Player::updatePattern()
if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) { if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) {
collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled; collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision(); myTIA->scheduleCollisionUpdate();
} }
} }

View File

@ -200,7 +200,7 @@ void TIA::frameReset()
memset(myBackBuffer, 0, 160 * TIAConstants::frameBufferHeight); memset(myBackBuffer, 0, 160 * TIAConstants::frameBufferHeight);
memset(myFrontBuffer, 0, 160 * TIAConstants::frameBufferHeight); memset(myFrontBuffer, 0, 160 * TIAConstants::frameBufferHeight);
memset(myFramebuffer, 0, 160 * TIAConstants::frameBufferHeight); memset(myFramebuffer, 0, 160 * TIAConstants::frameBufferHeight);
enableColorLoss(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss"); enableColorLoss(mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss"));
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -266,6 +266,7 @@ bool TIA::save(Serializer& out) const
out.putInt(myXAtRenderingStart); out.putInt(myXAtRenderingStart);
out.putBool(myCollisionUpdateRequired); out.putBool(myCollisionUpdateRequired);
out.putBool(myCollisionUpdateScheduled);
out.putInt(myCollisionMask); out.putInt(myCollisionMask);
out.putInt(myMovementClock); out.putInt(myMovementClock);
@ -337,6 +338,7 @@ bool TIA::load(Serializer& in)
myXAtRenderingStart = in.getInt(); myXAtRenderingStart = in.getInt();
myCollisionUpdateRequired = in.getBool(); myCollisionUpdateRequired = in.getBool();
myCollisionUpdateScheduled = in.getBool();
myCollisionMask = in.getInt(); myCollisionMask = in.getInt();
myMovementClock = in.getInt(); myMovementClock = in.getInt();
@ -971,18 +973,16 @@ bool TIA::toggleCollisions()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool TIA::enableFixedColors(bool enable) bool TIA::enableFixedColors(bool enable)
{ {
// This will be called during reset at a point where no frame manager int timing = consoleTiming() == ConsoleTiming::ntsc ? 0
// instance is available, so we guard aginst this here. : consoleTiming() == ConsoleTiming::pal ? 1 : 2;
int layout = 0;
if (myFrameManager) layout = myFrameManager->layout() == FrameLayout::pal ? 1 : 0;
myMissile0.setDebugColor(myFixedColorPalette[layout][FixedObject::M0]); myMissile0.setDebugColor(myFixedColorPalette[timing][FixedObject::M0]);
myMissile1.setDebugColor(myFixedColorPalette[layout][FixedObject::M1]); myMissile1.setDebugColor(myFixedColorPalette[timing][FixedObject::M1]);
myPlayer0.setDebugColor(myFixedColorPalette[layout][FixedObject::P0]); myPlayer0.setDebugColor(myFixedColorPalette[timing][FixedObject::P0]);
myPlayer1.setDebugColor(myFixedColorPalette[layout][FixedObject::P1]); myPlayer1.setDebugColor(myFixedColorPalette[timing][FixedObject::P1]);
myBall.setDebugColor(myFixedColorPalette[layout][FixedObject::BL]); myBall.setDebugColor(myFixedColorPalette[timing][FixedObject::BL]);
myPlayfield.setDebugColor(myFixedColorPalette[layout][FixedObject::PF]); myPlayfield.setDebugColor(myFixedColorPalette[timing][FixedObject::PF]);
myBackground.setDebugColor(FixedColor::BK_GREY); myBackground.setDebugColor(myFixedColorPalette[timing][FixedObject::BK]);
myMissile0.enableDebugColors(enable); myMissile0.enableDebugColors(enable);
myMissile1.enableDebugColors(enable); myMissile1.enableDebugColors(enable);
@ -1011,35 +1011,44 @@ bool TIA::setFixedColorPalette(const string& colors)
case 'r': case 'r':
myFixedColorPalette[0][i] = FixedColor::NTSC_RED; myFixedColorPalette[0][i] = FixedColor::NTSC_RED;
myFixedColorPalette[1][i] = FixedColor::PAL_RED; myFixedColorPalette[1][i] = FixedColor::PAL_RED;
myFixedColorPalette[2][i] = FixedColor::SECAM_RED;
myFixedColorNames[i] = "Red "; myFixedColorNames[i] = "Red ";
break; break;
case 'o': case 'o':
myFixedColorPalette[0][i] = FixedColor::NTSC_ORANGE; myFixedColorPalette[0][i] = FixedColor::NTSC_ORANGE;
myFixedColorPalette[1][i] = FixedColor::PAL_ORANGE; myFixedColorPalette[1][i] = FixedColor::PAL_ORANGE;
myFixedColorPalette[2][i] = FixedColor::SECAM_ORANGE;
myFixedColorNames[i] = "Orange"; myFixedColorNames[i] = "Orange";
break; break;
case 'y': case 'y':
myFixedColorPalette[0][i] = FixedColor::NTSC_YELLOW; myFixedColorPalette[0][i] = FixedColor::NTSC_YELLOW;
myFixedColorPalette[1][i] = FixedColor::PAL_YELLOW; myFixedColorPalette[1][i] = FixedColor::PAL_YELLOW;
myFixedColorPalette[2][i] = FixedColor::SECAM_YELLOW;
myFixedColorNames[i] = "Yellow"; myFixedColorNames[i] = "Yellow";
break; break;
case 'g': case 'g':
myFixedColorPalette[0][i] = FixedColor::NTSC_GREEN; myFixedColorPalette[0][i] = FixedColor::NTSC_GREEN;
myFixedColorPalette[1][i] = FixedColor::PAL_GREEN; myFixedColorPalette[1][i] = FixedColor::PAL_GREEN;
myFixedColorPalette[2][i] = FixedColor::SECAM_GREEN;
myFixedColorNames[i] = "Green "; myFixedColorNames[i] = "Green ";
break; break;
case 'b': case 'b':
myFixedColorPalette[0][i] = FixedColor::NTSC_BLUE; myFixedColorPalette[0][i] = FixedColor::NTSC_BLUE;
myFixedColorPalette[1][i] = FixedColor::PAL_BLUE; myFixedColorPalette[1][i] = FixedColor::PAL_BLUE;
myFixedColorPalette[2][i] = FixedColor::SECAM_BLUE;
myFixedColorNames[i] = "Blue "; myFixedColorNames[i] = "Blue ";
break; break;
case 'p': case 'p':
myFixedColorPalette[0][i] = FixedColor::NTSC_PURPLE; myFixedColorPalette[0][i] = FixedColor::NTSC_PURPLE;
myFixedColorPalette[1][i] = FixedColor::PAL_PURPLE; myFixedColorPalette[1][i] = FixedColor::PAL_PURPLE;
myFixedColorPalette[2][i] = FixedColor::SECAM_PURPLE;
myFixedColorNames[i] = "Purple"; myFixedColorNames[i] = "Purple";
break; break;
} }
} }
myFixedColorPalette[0][TIA::BK] = FixedColor::NTSC_GREY;
myFixedColorPalette[1][TIA::BK] = FixedColor::PAL_GREY;
myFixedColorPalette[2][TIA::BK] = FixedColor::SECAM_GREY;
// If already in fixed debug colours mode, update the current palette // If already in fixed debug colours mode, update the current palette
if(usingFixedColors()) if(usingFixedColors())
@ -1216,7 +1225,8 @@ void TIA::cycle(uInt32 colorClocks)
[this] (uInt8 address, uInt8 value) {delayedWrite(address, value);} [this] (uInt8 address, uInt8 value) {delayedWrite(address, value);}
); );
myCollisionUpdateRequired = false; myCollisionUpdateRequired = myCollisionUpdateScheduled;
myCollisionUpdateScheduled = false;
if (myLinesSinceChange < 2) { if (myLinesSinceChange < 2) {
tickMovement(); tickMovement();
@ -1351,6 +1361,12 @@ void TIA::cloneLastLine()
memcpy(buffer + y * 160, buffer + (y-1) * 160, 160); memcpy(buffer + y * 160, buffer + (y-1) * 160, 160);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::scheduleCollisionUpdate()
{
myCollisionUpdateScheduled = true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::updateCollision() void TIA::updateCollision()
{ {

View File

@ -73,22 +73,31 @@ class TIA : public Device
* Possible palette entries for objects in "fixed debug color mode". * Possible palette entries for objects in "fixed debug color mode".
*/ */
enum FixedColor { enum FixedColor {
NTSC_RED = 0x30, NTSC_RED = 0x30,
NTSC_ORANGE = 0x38, NTSC_ORANGE = 0x38,
NTSC_YELLOW = 0x1c, NTSC_YELLOW = 0x1c,
NTSC_GREEN = 0xc4, NTSC_GREEN = 0xc4,
NTSC_BLUE = 0x9e, NTSC_BLUE = 0x9c,
NTSC_PURPLE = 0x66, NTSC_PURPLE = 0x66,
NTSC_GREY = 0x04,
PAL_RED = 0x62, PAL_RED = 0x62,
PAL_ORANGE = 0x4a, PAL_ORANGE = 0x4a,
PAL_YELLOW = 0x2e, PAL_YELLOW = 0x2e,
PAL_GREEN = 0x34, PAL_GREEN = 0x34,
PAL_BLUE = 0xbc, PAL_BLUE = 0xbc,
PAL_PURPLE = 0xa6, PAL_PURPLE = 0xa6,
PAL_GREY = 0x06,
BK_GREY = 0x0a, SECAM_RED = 0x04,
HBLANK_WHITE = 0x0e SECAM_ORANGE = 0x06, // purple
SECAM_YELLOW = 0x0c,
SECAM_GREEN = 0x08,
SECAM_BLUE = 0x02,
SECAM_PURPLE = 0x0a, // cyan
SECAM_GREY = 0x00,
HBLANK_WHITE = 0x0e
}; };
public: public:
@ -448,9 +457,9 @@ class TIA : public Device
void flushLineCache(); void flushLineCache();
/** /**
* Update the collision bitfield. Schedule a collision update
*/ */
void updateCollision(); void scheduleCollisionUpdate();
/** /**
Create a new delayQueueIterator for the debugger. Create a new delayQueueIterator for the debugger.
@ -500,9 +509,9 @@ class TIA : public Device
/** /**
* Palette and indices for fixed debug colors. * Palette and indices for fixed debug colors.
*/ */
enum FixedObject { P0, M0, P1, M1, PF, BL }; enum FixedObject { P0, M0, P1, M1, PF, BL, BK };
FixedColor myFixedColorPalette[2][6]; FixedColor myFixedColorPalette[3][7];
string myFixedColorNames[6]; string myFixedColorNames[7];
private: private:
@ -543,6 +552,11 @@ class TIA : public Device
*/ */
void tickHframe(); void tickHframe();
/**
* Update the collision bitfield.
*/
void updateCollision();
/** /**
* Execute a RSYNC. * Execute a RSYNC.
*/ */
@ -815,6 +829,9 @@ class TIA : public Device
bool myEnableJitter; bool myEnableJitter;
uInt8 myJitterFactor; uInt8 myJitterFactor;
// Force schedule a collision update
bool myCollisionUpdateScheduled;
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
// The arrays containing information about every byte of TIA // The arrays containing information about every byte of TIA
// indicating whether and how (RW) it is used. // indicating whether and how (RW) it is used.

View File

@ -169,7 +169,7 @@ void AboutDialog::displayInfo()
{ {
const char* str = myDescStr[i].c_str(); const char* str = myDescStr[i].c_str();
TextAlign align = TextAlign::Center; TextAlign align = TextAlign::Center;
uInt32 color = kTextColor; ColorId color = kTextColor;
while (str[0] == '\\') while (str[0] == '\\')
{ {

View File

@ -112,7 +112,7 @@ void CheckListWidget::drawWidget(bool hilite)
_checkList[i]->draw(); _checkList[i]->draw();
const int y = _y + 2 + _fontHeight * i + 2; const int y = _y + 2 + _fontHeight * i + 2;
uInt32 textColor = kTextColor; ColorId textColor = kTextColor;
GUI::Rect r(getEditRect()); GUI::Rect r(getEditRect());
@ -137,7 +137,8 @@ void CheckListWidget::drawWidget(bool hilite)
TextAlign::Left, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
} }
else else
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), onTop ? textColor : kColor); s.drawString(_font, _list[pos], _x + r.left, y, r.width(),
onTop ? textColor : kColor);
} }
// Only draw the caret while editing, and if it's in the current viewport // Only draw the caret while editing, and if it's in the current viewport

View File

@ -28,7 +28,7 @@ ColorWidget::ColorWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int cmd) int x, int y, int w, int h, int cmd)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_color(0), _color(kNone),
_cmd(cmd), _cmd(cmd),
_crossGrid(false) _crossGrid(false)
{ {
@ -36,7 +36,7 @@ ColorWidget::ColorWidget(GuiObject* boss, const GUI::Font& font,
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ColorWidget::setColor(int color) void ColorWidget::setColor(ColorId color)
{ {
_color = color; _color = color;
setDirty(); setDirty();
@ -52,7 +52,7 @@ void ColorWidget::drawWidget(bool hilite)
s.frameRect(_x, _y, _w, _h + 1, kColor); s.frameRect(_x, _y, _w, _h + 1, kColor);
// Show the currently selected color // Show the currently selected color
s.fillRect(_x+1, _y+1, _w-2, _h-1, onTop ? isEnabled() ? _color : kWidColor : kDlgColor); s.fillRect(_x+1, _y+1, _w-2, _h-1, onTop ? isEnabled() ? _color : kWidColor : kBGColorLo);
// Cross out the grid? // Cross out the grid?
if(_crossGrid) if(_crossGrid)

View File

@ -39,8 +39,8 @@ class ColorWidget : public Widget, public CommandSender
int x, int y, int w, int h, int cmd = 0); int x, int y, int w, int h, int cmd = 0);
virtual ~ColorWidget() = default; virtual ~ColorWidget() = default;
void setColor(int color); void setColor(ColorId color);
int getColor() const { return _color; } ColorId getColor() const { return _color; }
void setCrossed(bool enable) { _crossGrid = enable; } void setCrossed(bool enable) { _crossGrid = enable; }
@ -48,7 +48,7 @@ class ColorWidget : public Widget, public CommandSender
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
protected: protected:
int _color; ColorId _color;
int _cmd; int _cmd;
bool _crossGrid; bool _crossGrid;

View File

@ -118,7 +118,7 @@ class ContextMenu : public Dialog, public CommandSender
int _selectedOffset, _selectedItem; int _selectedOffset, _selectedItem;
bool _showScroll; bool _showScroll;
bool _isScrolling; bool _isScrolling;
uInt32 _scrollUpColor, _scrollDnColor; ColorId _scrollUpColor, _scrollDnColor;
int _cmd; int _cmd;

View File

@ -1090,7 +1090,7 @@ void DeveloperDialog::handleDebugColours(int idx, int color)
return; return;
} }
static constexpr int dbg_color[2][DEBUG_COLORS] = { static constexpr ColorId dbg_color[3][DEBUG_COLORS] = {
{ {
TIA::FixedColor::NTSC_RED, TIA::FixedColor::NTSC_RED,
TIA::FixedColor::NTSC_ORANGE, TIA::FixedColor::NTSC_ORANGE,
@ -1106,11 +1106,21 @@ void DeveloperDialog::handleDebugColours(int idx, int color)
TIA::FixedColor::PAL_GREEN, TIA::FixedColor::PAL_GREEN,
TIA::FixedColor::PAL_PURPLE, TIA::FixedColor::PAL_PURPLE,
TIA::FixedColor::PAL_BLUE TIA::FixedColor::PAL_BLUE
},
{
TIA::FixedColor::SECAM_RED,
TIA::FixedColor::SECAM_ORANGE,
TIA::FixedColor::SECAM_YELLOW,
TIA::FixedColor::SECAM_GREEN,
TIA::FixedColor::SECAM_PURPLE,
TIA::FixedColor::SECAM_BLUE
} }
}; };
int mode = instance().console().tia().frameLayout() == FrameLayout::ntsc ? 0 : 1; int timing = instance().console().tia().consoleTiming() == ConsoleTiming::ntsc ? 0
myDbgColourSwatch[idx]->setColor(dbg_color[mode][color]); : instance().console().tia().consoleTiming() == ConsoleTiming::pal ? 1 : 2;
myDbgColourSwatch[idx]->setColor(dbg_color[timing][color]);
myDbgColour[idx]->setSelectedIndex(color); myDbgColour[idx]->setSelectedIndex(color);
// make sure the selected debug colors are all different // make sure the selected debug colors are all different
@ -1122,7 +1132,7 @@ void DeveloperDialog::handleDebugColours(int idx, int color)
usedCol[i] = false; usedCol[i] = false;
for(int j = 0; j < DEBUG_COLORS; ++j) for(int j = 0; j < DEBUG_COLORS; ++j)
{ {
if(myDbgColourSwatch[j]->getColor() == dbg_color[mode][i]) if(myDbgColourSwatch[j]->getColor() == dbg_color[timing][i])
{ {
usedCol[i] = true; usedCol[i] = true;
break; break;
@ -1132,14 +1142,14 @@ void DeveloperDialog::handleDebugColours(int idx, int color)
// check if currently changed color was used somewhere else // check if currently changed color was used somewhere else
for(int i = 0; i < DEBUG_COLORS; ++i) for(int i = 0; i < DEBUG_COLORS; ++i)
{ {
if (i != idx && myDbgColourSwatch[i]->getColor() == dbg_color[mode][color]) if (i != idx && myDbgColourSwatch[i]->getColor() == dbg_color[timing][color])
{ {
// if already used, change the other color to an unused one // if already used, change the other color to an unused one
for(int j = 0; j < DEBUG_COLORS; ++j) for(int j = 0; j < DEBUG_COLORS; ++j)
{ {
if(!usedCol[j]) if(!usedCol[j])
{ {
myDbgColourSwatch[i]->setColor(dbg_color[mode][j]); myDbgColourSwatch[i]->setColor(dbg_color[timing][j]);
myDbgColour[i]->setSelectedIndex(j); myDbgColour[i]->setSelectedIndex(j);
break; break;
} }
@ -1155,12 +1165,12 @@ void DeveloperDialog::handleDebugColours(const string& colors)
{ {
switch(colors[i]) switch(colors[i])
{ {
case 'r': handleDebugColours(i, 0); break; case 'r': handleDebugColours(i, 0); break;
case 'o': handleDebugColours(i, 1); break; case 'o': handleDebugColours(i, 1); break;
case 'y': handleDebugColours(i, 2); break; case 'y': handleDebugColours(i, 2); break;
case 'g': handleDebugColours(i, 3); break; case 'g': handleDebugColours(i, 3); break;
case 'p': handleDebugColours(i, 4); break; case 'p': handleDebugColours(i, 4); break;
case 'b': handleDebugColours(i, 5); break; case 'b': handleDebugColours(i, 5); break;
default: break; default: break;
} }
} }

View File

@ -55,7 +55,7 @@ class Dialog : public GuiObject
void close(); void close();
bool isVisible() const override { return _visible; } bool isVisible() const override { return _visible; }
bool isOnTop() { return _onTop; } bool isOnTop() const { return _onTop; }
virtual void center(); virtual void center();
virtual void drawDialog(); virtual void drawDialog();

View File

@ -95,7 +95,7 @@ void EditTextWidget::drawWidget(bool hilite)
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(), s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(),
_changed && onTop _changed && onTop
? uInt32(kDbgChangedTextColor) ? kDbgChangedTextColor
: onTop ? _textcolor : kColor, : onTop ? _textcolor : kColor,
TextAlign::Left, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);

View File

@ -206,7 +206,7 @@ void PopUpWidget::drawWidget(bool hilite)
// Draw the label, if any // Draw the label, if any
if(_labelWidth > 0) if(_labelWidth > 0)
s.drawString(_font, _label, _x, _y + myTextY, _labelWidth, s.drawString(_font, _label, _x, _y + myTextY, _labelWidth,
isEnabled() && onTop ? _textcolor : uInt32(kColor), TextAlign::Left); isEnabled() && onTop ? _textcolor : kColor, TextAlign::Left);
// Draw a thin frame around us. // Draw a thin frame around us.
s.frameRect(x, _y, w, _h, isEnabled() && hilite ? kWidColorHi : kColor); s.frameRect(x, _y, w, _h, isEnabled() && hilite ? kWidColorHi : kColor);

View File

@ -164,7 +164,7 @@ void RadioButtonWidget::drawWidget(bool hilite)
// Draw the inner bounding circle with enabled color // Draw the inner bounding circle with enabled color
s.drawBitmap(radio_img_innercircle, _x + 1, _y + _boxY + 1, isEnabled() s.drawBitmap(radio_img_innercircle, _x + 1, _y + _boxY + 1, isEnabled()
? _bgcolor : uInt32(kColor), 12, 12); ? _bgcolor : kColor, 12, 12);
// draw state // draw state
if(_state) if(_state)

View File

@ -261,14 +261,18 @@ void ScrollBarWidget::drawWidget(bool hilite)
// Up arrow // Up arrow
if(hilite && _part == kUpArrowPart) if(hilite && _part == kUpArrowPart)
s.fillRect(_x + 1, _y + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor); s.fillRect(_x + 1, _y + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
s.drawBitmap(up_arrow, _x+4, _y+5, isSinglePage ? kColor : s.drawBitmap(up_arrow, _x+4, _y+5,
(hilite && _part == kUpArrowPart) ? kWidColor : kTextColor, 8); onTop
? isSinglePage ? kColor : (hilite && _part == kUpArrowPart) ? kWidColor : kTextColor
: kColor, 8);
// Down arrow // Down arrow
if(hilite && _part == kDownArrowPart) if(hilite && _part == kDownArrowPart)
s.fillRect(_x + 1, bottomY - UP_DOWN_BOX_HEIGHT + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor); s.fillRect(_x + 1, bottomY - UP_DOWN_BOX_HEIGHT + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
s.drawBitmap(down_arrow, _x+4, bottomY - UP_DOWN_BOX_HEIGHT + 5, isSinglePage ? kColor : s.drawBitmap(down_arrow, _x+4, bottomY - UP_DOWN_BOX_HEIGHT + 5,
(hilite && _part == kDownArrowPart) ? kWidColor : kTextColor, 8); onTop
? isSinglePage ? kColor : (hilite && _part == kDownArrowPart) ? kWidColor : kTextColor
: kColor, 8);
// Slider // Slider
if(!isSinglePage) if(!isSinglePage)

View File

@ -62,16 +62,16 @@ void StringListWidget::drawWidget(bool hilite)
int i, pos, len = int(_list.size()); int i, pos, len = int(_list.size());
// Draw a thin frame around the list. // Draw a thin frame around the list.
s.frameRect(_x, _y, _w + 1, _h, hilite && _hilite ? kWidColorHi : kColor); s.frameRect(_x, _y, _w + 1, _h, onTop && hilite && _hilite ? kWidColorHi : kColor);
// Draw the list items // Draw the list items
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++) for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++)
{ {
const int y = _y + 2 + _fontHeight * i; const int y = _y + 2 + _fontHeight * i;
uInt32 textColor = onTop ? kTextColor : kShadowColor; ColorId textColor = onTop ? kTextColor : kShadowColor;
// Draw the selected item inverted, on a highlighted background. // Draw the selected item inverted, on a highlighted background.
if (_selectedItem == pos && _hilite) if (onTop && _selectedItem == pos && _hilite)
{ {
if(_hasFocus && !_editMode) if(_hasFocus && !_editMode)
{ {

View File

@ -268,7 +268,7 @@ void TabWidget::drawWidget(bool hilite)
int i, x = _x + kTabLeftOffset; int i, x = _x + kTabLeftOffset;
for (i = 0; i < int(_tabs.size()); ++i) for (i = 0; i < int(_tabs.size()); ++i)
{ {
uInt32 fontcolor = _tabs[i].enabled && onTop? kTextColor : kColor; ColorId fontcolor = _tabs[i].enabled && onTop? kTextColor : kColor;
int yOffset = (i == _activeTab) ? 0 : 1; int yOffset = (i == _activeTab) ? 0 : 1;
s.fillRect(x, _y + 1, _tabWidth, _tabHeight - 1, s.fillRect(x, _y + 1, _tabWidth, _tabHeight - 1,
(i == _activeTab) (i == _activeTab)

View File

@ -181,7 +181,7 @@ void TimeLineWidget::drawWidget(bool hilite)
if(idx > 1) if(idx > 1)
{ {
int xt = x + valueToPos(idx - 1); int xt = x + valueToPos(idx - 1);
uInt32 color; ColorId color = kNone;
if(isEnabled()) if(isEnabled())
{ {

View File

@ -307,7 +307,7 @@ void Widget::setDirtyInChain(Widget* start)
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& text, TextAlign align, const string& text, TextAlign align,
uInt32 shadowColor) ColorId shadowColor)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
_align(align) _align(align)
{ {
@ -326,7 +326,7 @@ StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int x, int y,
const string& text, TextAlign align, const string& text, TextAlign align,
uInt32 shadowColor) ColorId shadowColor)
: StaticTextWidget(boss, font, x, y, font.getStringWidth(text), font.getLineHeight(), : StaticTextWidget(boss, font, x, y, font.getStringWidth(text), font.getLineHeight(),
text, align, shadowColor) text, align, shadowColor)
{ {
@ -356,7 +356,7 @@ void StaticTextWidget::drawWidget(bool hilite)
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
bool onTop = _boss->dialog().isOnTop(); bool onTop = _boss->dialog().isOnTop();
s.drawString(_font, _label, _x, _y, _w, s.drawString(_font, _label, _x, _y, _w,
isEnabled() && onTop ? _textcolor : uInt32(kColor), _align, 0, true, _shadowcolor); isEnabled() && onTop ? _textcolor : kColor, _align, 0, true, _shadowcolor);
setDirty(); setDirty();
} }
@ -645,8 +645,9 @@ void CheckboxWidget::drawWidget(bool hilite)
if(_drawBox) if(_drawBox)
s.frameRect(_x, _y + _boxY, 14, 14, onTop && hilite && isEnabled() && isEditable() ? kWidColorHi : kColor); s.frameRect(_x, _y + _boxY, 14, 14, onTop && hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
// Do we draw a square or cross? // Do we draw a square or cross?
s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? onTop ? uInt32(kDbgChangedColor) : kDlgColor s.fillRect(_x + 1, _y + _boxY + 1, 12, 12,
: isEnabled() ? onTop ? _bgcolor : kDlgColor : uInt32(kColor)); _changed ? onTop ? kDbgChangedColor : kDlgColor :
isEnabled() ? onTop ? _bgcolor : kDlgColor : kColor);
if(_state) if(_state)
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, onTop && isEnabled() ? hilite && isEditable() ? kWidColorHi : kCheckColor s.drawBitmap(_img, _x + 2, _y + _boxY + 2, onTop && isEnabled() ? hilite && isEditable() ? kWidColorHi : kCheckColor
: kColor, 10); : kColor, 10);
@ -867,7 +868,7 @@ void SliderWidget::drawWidget(bool hilite)
for(int i = 1; i < _numIntervals; ++i) for(int i = 1; i < _numIntervals; ++i)
{ {
int xt = x + (_w - _labelWidth - _valueLabelGap - _valueLabelWidth) * i / _numIntervals - 1; int xt = x + (_w - _labelWidth - _valueLabelGap - _valueLabelWidth) * i / _numIntervals - 1;
uInt32 color; ColorId color = kNone;
if(isEnabled()) if(isEnabled())
{ {

View File

@ -109,11 +109,11 @@ class Widget : public GuiObject
virtual const GUI::Font& font() const { return _font; } virtual const GUI::Font& font() const { return _font; }
void setTextColor(uInt32 color) { _textcolor = color; setDirty(); } void setTextColor(ColorId color) { _textcolor = color; setDirty(); }
void setTextColorHi(uInt32 color) { _textcolorhi = color; setDirty(); } void setTextColorHi(ColorId color) { _textcolorhi = color; setDirty(); }
void setBGColor(uInt32 color) { _bgcolor = color; setDirty(); } void setBGColor(ColorId color) { _bgcolor = color; setDirty(); }
void setBGColorHi(uInt32 color) { _bgcolorhi = color; setDirty(); } void setBGColorHi(ColorId color) { _bgcolorhi = color; setDirty(); }
void setShadowColor(uInt32 color) { _shadowcolor = color; setDirty(); } void setShadowColor(ColorId color) { _shadowcolor = color; setDirty(); }
virtual void loadConfig() { } virtual void loadConfig() { }
@ -140,13 +140,13 @@ class Widget : public GuiObject
bool _hasFocus; bool _hasFocus;
int _fontWidth; int _fontWidth;
int _fontHeight; int _fontHeight;
uInt32 _bgcolor; ColorId _bgcolor;
uInt32 _bgcolorhi; ColorId _bgcolorhi;
uInt32 _bgcolorlo; ColorId _bgcolorlo;
uInt32 _textcolor; ColorId _textcolor;
uInt32 _textcolorhi; ColorId _textcolorhi;
uInt32 _textcolorlo; ColorId _textcolorlo;
uInt32 _shadowcolor; ColorId _shadowcolor;
public: public:
static Widget* findWidgetInChain(Widget* start, int x, int y); static Widget* findWidgetInChain(Widget* start, int x, int y);
@ -183,11 +183,11 @@ class StaticTextWidget : public Widget
StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& text = "", TextAlign align = TextAlign::Left, const string& text = "", TextAlign align = TextAlign::Left,
uInt32 shadowColor = 0); ColorId shadowColor = kNone);
StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int x, int y,
const string& text = "", TextAlign align = TextAlign::Left, const string& text = "", TextAlign align = TextAlign::Left,
uInt32 shadowColor = 0); ColorId shadowColor = kNone);
void setValue(int value); void setValue(int value);
void setLabel(const string& label); void setLabel(const string& label);
void setAlign(TextAlign align) { _align = align; setDirty(); } void setAlign(TextAlign align) { _align = align; setDirty(); }
@ -293,7 +293,7 @@ class CheckboxWidget : public ButtonWidget
bool _changed; bool _changed;
uInt32* _img; uInt32* _img;
uInt32 _fillColor; ColorId _fillColor;
int _boxY; int _boxY;
int _textY; int _textY;

View File

@ -53,7 +53,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>StLa</string> <string>StLa</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>5.1</string> <string>6.0</string>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
<string>public.app-category.games</string> <string>public.app-category.games</string>
<key>LSMinimumSystemVersionByArchitecture</key> <key>LSMinimumSystemVersionByArchitecture</key>

View File

@ -635,6 +635,8 @@
E034A5EF209FB25D00C89E9E /* EmulationTiming.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E034A5ED209FB25C00C89E9E /* EmulationTiming.hxx */; }; E034A5EF209FB25D00C89E9E /* EmulationTiming.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E034A5ED209FB25C00C89E9E /* EmulationTiming.hxx */; };
E0406FB61F81A85400A82AE0 /* AbstractFrameManager.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E0DFDD781F81A358000F3505 /* AbstractFrameManager.cxx */; }; E0406FB61F81A85400A82AE0 /* AbstractFrameManager.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E0DFDD781F81A358000F3505 /* AbstractFrameManager.cxx */; };
E0406FB81F81A85400A82AE0 /* FrameManager.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E0DFDD7B1F81A358000F3505 /* FrameManager.cxx */; }; E0406FB81F81A85400A82AE0 /* FrameManager.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E0DFDD7B1F81A358000F3505 /* FrameManager.cxx */; };
E0893AF2211B9842008B170D /* HighPass.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E0893AF0211B9841008B170D /* HighPass.cxx */; };
E0893AF3211B9842008B170D /* HighPass.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E0893AF1211B9841008B170D /* HighPass.hxx */; };
E09F413B201E901D004A3391 /* AudioQueue.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E09F4139201E901C004A3391 /* AudioQueue.hxx */; }; E09F413B201E901D004A3391 /* AudioQueue.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E09F4139201E901C004A3391 /* AudioQueue.hxx */; };
E09F413C201E901D004A3391 /* AudioQueue.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E09F413A201E901D004A3391 /* AudioQueue.cxx */; }; E09F413C201E901D004A3391 /* AudioQueue.cxx in Sources */ = {isa = PBXBuildFile; fileRef = E09F413A201E901D004A3391 /* AudioQueue.cxx */; };
E09F4141201E9050004A3391 /* Audio.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E09F413D201E904F004A3391 /* Audio.hxx */; }; E09F4141201E9050004A3391 /* Audio.hxx in Headers */ = {isa = PBXBuildFile; fileRef = E09F413D201E904F004A3391 /* Audio.hxx */; };
@ -1330,6 +1332,8 @@
E0306E0B1F93E916003DDD52 /* JitterEmulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JitterEmulation.hxx; sourceTree = "<group>"; }; E0306E0B1F93E916003DDD52 /* JitterEmulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JitterEmulation.hxx; sourceTree = "<group>"; };
E034A5EC209FB25C00C89E9E /* EmulationTiming.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulationTiming.cxx; sourceTree = "<group>"; }; E034A5EC209FB25C00C89E9E /* EmulationTiming.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulationTiming.cxx; sourceTree = "<group>"; };
E034A5ED209FB25C00C89E9E /* EmulationTiming.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = EmulationTiming.hxx; sourceTree = "<group>"; }; E034A5ED209FB25C00C89E9E /* EmulationTiming.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = EmulationTiming.hxx; sourceTree = "<group>"; };
E0893AF0211B9841008B170D /* HighPass.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HighPass.cxx; path = audio/HighPass.cxx; sourceTree = "<group>"; };
E0893AF1211B9841008B170D /* HighPass.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HighPass.hxx; path = audio/HighPass.hxx; sourceTree = "<group>"; };
E09F4139201E901C004A3391 /* AudioQueue.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AudioQueue.hxx; sourceTree = "<group>"; }; E09F4139201E901C004A3391 /* AudioQueue.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AudioQueue.hxx; sourceTree = "<group>"; };
E09F413A201E901D004A3391 /* AudioQueue.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioQueue.cxx; sourceTree = "<group>"; }; E09F413A201E901D004A3391 /* AudioQueue.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioQueue.cxx; sourceTree = "<group>"; };
E09F413D201E904F004A3391 /* Audio.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Audio.hxx; sourceTree = "<group>"; }; E09F413D201E904F004A3391 /* Audio.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Audio.hxx; sourceTree = "<group>"; };
@ -2076,6 +2080,8 @@
DCC6A4AD20A2620D00863C59 /* audio */ = { DCC6A4AD20A2620D00863C59 /* audio */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E0893AF0211B9841008B170D /* HighPass.cxx */,
E0893AF1211B9841008B170D /* HighPass.hxx */,
E0DCD3A620A64E96000B614E /* ConvolutionBuffer.cxx */, E0DCD3A620A64E96000B614E /* ConvolutionBuffer.cxx */,
E0DCD3A520A64E96000B614E /* ConvolutionBuffer.hxx */, E0DCD3A520A64E96000B614E /* ConvolutionBuffer.hxx */,
E0DCD3A420A64E95000B614E /* LanczosResampler.cxx */, E0DCD3A420A64E95000B614E /* LanczosResampler.cxx */,
@ -2235,6 +2241,7 @@
DCACBAD11C54296300703A9B /* CartCVPlusWidget.hxx in Headers */, DCACBAD11C54296300703A9B /* CartCVPlusWidget.hxx in Headers */,
DC1B2EC81E50036100F62837 /* TrakBall.hxx in Headers */, DC1B2EC81E50036100F62837 /* TrakBall.hxx in Headers */,
2D9173E709BA90380026E9FF /* M6532.hxx in Headers */, 2D9173E709BA90380026E9FF /* M6532.hxx in Headers */,
E0893AF3211B9842008B170D /* HighPass.hxx in Headers */,
2D9173E809BA90380026E9FF /* MD5.hxx in Headers */, 2D9173E809BA90380026E9FF /* MD5.hxx in Headers */,
2D9173EA09BA90380026E9FF /* Paddles.hxx in Headers */, 2D9173EA09BA90380026E9FF /* Paddles.hxx in Headers */,
2D9173EB09BA90380026E9FF /* Props.hxx in Headers */, 2D9173EB09BA90380026E9FF /* Props.hxx in Headers */,
@ -2797,6 +2804,7 @@
DCF3A6EF1DFC75E3008A8AF3 /* DrawCounterDecodes.cxx in Sources */, DCF3A6EF1DFC75E3008A8AF3 /* DrawCounterDecodes.cxx in Sources */,
DC5AAC2C1FCB24DF00C420A6 /* RadioButtonWidget.cxx in Sources */, DC5AAC2C1FCB24DF00C420A6 /* RadioButtonWidget.cxx in Sources */,
DC9EA8870F729A36000452B5 /* KidVid.cxx in Sources */, DC9EA8870F729A36000452B5 /* KidVid.cxx in Sources */,
E0893AF2211B9842008B170D /* HighPass.cxx in Sources */,
DCF467C20F939A1400B25D7A /* CartEF.cxx in Sources */, DCF467C20F939A1400B25D7A /* CartEF.cxx in Sources */,
DCF467C40F939A1400B25D7A /* CartEFSC.cxx in Sources */, DCF467C40F939A1400B25D7A /* CartEFSC.cxx in Sources */,
DCF7B0DD10A762FC007A2870 /* CartF0.cxx in Sources */, DCF7B0DD10A762FC007A2870 /* CartF0.cxx in Sources */,

View File

@ -233,6 +233,7 @@
<ClCompile Include="..\common\AudioQueue.cxx" /> <ClCompile Include="..\common\AudioQueue.cxx" />
<ClCompile Include="..\common\AudioSettings.cxx" /> <ClCompile Include="..\common\AudioSettings.cxx" />
<ClCompile Include="..\common\audio\ConvolutionBuffer.cxx" /> <ClCompile Include="..\common\audio\ConvolutionBuffer.cxx" />
<ClCompile Include="..\common\audio\HighPass.cxx" />
<ClCompile Include="..\common\audio\LanczosResampler.cxx" /> <ClCompile Include="..\common\audio\LanczosResampler.cxx" />
<ClCompile Include="..\common\audio\SimpleResampler.cxx" /> <ClCompile Include="..\common\audio\SimpleResampler.cxx" />
<ClCompile Include="..\common\Base.cxx" /> <ClCompile Include="..\common\Base.cxx" />
@ -526,6 +527,7 @@
<ClInclude Include="..\common\AudioQueue.hxx" /> <ClInclude Include="..\common\AudioQueue.hxx" />
<ClInclude Include="..\common\AudioSettings.hxx" /> <ClInclude Include="..\common\AudioSettings.hxx" />
<ClInclude Include="..\common\audio\ConvolutionBuffer.hxx" /> <ClInclude Include="..\common\audio\ConvolutionBuffer.hxx" />
<ClInclude Include="..\common\audio\HighPass.hxx" />
<ClInclude Include="..\common\audio\LanczosResampler.hxx" /> <ClInclude Include="..\common\audio\LanczosResampler.hxx" />
<ClInclude Include="..\common\audio\Resampler.hxx" /> <ClInclude Include="..\common\audio\Resampler.hxx" />
<ClInclude Include="..\common\audio\SimpleResampler.hxx" /> <ClInclude Include="..\common\audio\SimpleResampler.hxx" />

View File

@ -936,6 +936,9 @@
<ClCompile Include="..\common\FpsMeter.cxx"> <ClCompile Include="..\common\FpsMeter.cxx">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\common\audio\HighPass.cxx">
<Filter>Source Files\audio</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\common\bspf.hxx"> <ClInclude Include="..\common\bspf.hxx">
@ -1913,6 +1916,9 @@
<ClInclude Include="..\common\FpsMeter.hxx"> <ClInclude Include="..\common\FpsMeter.hxx">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\common\audio\HighPass.hxx">
<Filter>Header Files\audio</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="stella.ico"> <None Include="stella.ico">