GUI support is now conditional in Stella. This is enabled by default for all ports except libretro.

- When disabled, it also disables the debugger and cheatcode support
- UI-wise, this reverts Stella to 1.x functionality (before any internal UI was added)
- Eliminates 47000 lines of code for those ports (like libretro) that don't need it.
This commit is contained in:
Stephen Anthony 2019-05-02 17:58:39 -02:30
parent 5a7d18159b
commit 83a3bdd6cd
63 changed files with 361 additions and 414 deletions

View File

@ -70,6 +70,10 @@
* PNG/ZIP image support is now conditionally compiled into Stella.
All major ports (Linux/macOS/Windows) have it enabled by default.
* SDL/GUI support is now conditionally compiled into Stella. All major
ports (Linux/macOS/Windows) have it enabled by default. This is
currently used only by the libretro port.
-Have fun!

View File

@ -150,13 +150,12 @@ MODULES := $(MODULES)
# After the game specific modules follow the shared modules
MODULES += \
src/common \
src/common/audio \
src/common/tv_filters \
src/emucore \
src/emucore/tia \
src/emucore/tia/frame-manager \
src/gui \
src/common \
src/common/tv_filters \
src/common/audio
src/emucore/tia/frame-manager
######################################################################
# The build rules follow - normally you should have no need to

26
configure vendored
View File

@ -14,6 +14,7 @@
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
# default option behaviour yes/no
_build_gui=yes
_build_windowed=yes
_build_sound=yes
_build_debugger=yes
@ -190,9 +191,11 @@ Installation directories:
--datadir=DIR directory to install icons/data files [PREFIX/share]
Optional Features:
--enable-gui enable/disable the entire built-in UI [enabled]
--disable-gui
--enable-sound enable/disable sound support [enabled]
--disable-sound
--enable-debugger enable/disable all debugger options [disabled]
--enable-debugger enable/disable all debugger options [enabled]
--disable-debugger
--enable-joystick enable/disable joystick support [enabled]
--disable-joystick
@ -235,6 +238,8 @@ done # for parm in ...
for ac_option in $@; do
case "$ac_option" in
--enable-gui) _build_gui=yes ;;
--disable-gui) _build_gui=no ;;
--enable-sound) _build_sound=yes ;;
--disable-sound) _build_sound=no ;;
--enable-debugger) _build_debugger=yes ;;
@ -530,6 +535,7 @@ if test -n "$_host"; then
case "$_host" in
retron77)
echo "Compiling for $_host, disabling windowed mode, debugger and cheats."
_build_gui=yes
_build_windowed=no
_build_debugger=no
_build_cheats=no
@ -686,6 +692,16 @@ echo
echo_n "Summary:"
echo
if test "$_build_gui" = "yes" ; then
echo_n " GUI enabled"
echo
else
echo_n " GUI disabled"
echo
_build_debugger=no
_build_cheats=no
fi
if test "$_build_sound" = "yes" ; then
echo_n " Sound support enabled"
echo
@ -797,7 +813,7 @@ LIBPNG="$SRC/libpng"
ZLIB="$SRC/zlib"
SQLITE="$SRC/common/repository/sqlite"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA -I$TIA_FRAME_MANAGER"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$TIA -I$TIA_FRAME_MANAGER"
INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
if test "$_build_static" = yes ; then
@ -838,6 +854,12 @@ case $_host_os in
;;
esac
if test "$_build_gui" = yes ; then
DEFINES="$DEFINES -DGUI_SUPPORT"
MODULES="$MODULES $GUI"
INCLUDES="$INCLUDES -I$GUI"
fi
if test "$_build_windowed" = yes ; then
DEFINES="$DEFINES -DWINDOWED_SUPPORT"
fi

View File

@ -77,13 +77,13 @@ uInt32 FBSurfaceSDL2::height() const
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const GUI::Rect& FBSurfaceSDL2::srcRect() const
const Common::Rect& FBSurfaceSDL2::srcRect() const
{
return mySrcGUIR;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const GUI::Rect& FBSurfaceSDL2::dstRect() const
const Common::Rect& FBSurfaceSDL2::dstRect() const
{
return myDstGUIR;
}

View File

@ -45,8 +45,8 @@ class FBSurfaceSDL2 : public FBSurface
uInt32 width() const override;
uInt32 height() const override;
const GUI::Rect& srcRect() const override;
const GUI::Rect& dstRect() const override;
const Common::Rect& srcRect() const override;
const Common::Rect& dstRect() const override;
void setSrcPos(uInt32 x, uInt32 y) override;
void setSrcSize(uInt32 w, uInt32 h) override;
void setDstPos(uInt32 x, uInt32 y) override;
@ -92,7 +92,7 @@ class FBSurfaceSDL2 : public FBSurface
unique_ptr<uInt32[]> myStaticData; // The data to use when the buffer contents are static
uInt32 myStaticPitch; // The number of bytes in a row of static data
GUI::Rect mySrcGUIR, myDstGUIR;
Common::Rect mySrcGUIR, myDstGUIR;
};
#endif

View File

@ -20,15 +20,13 @@
#include "Logger.hxx"
#include "Console.hxx"
#include "Font.hxx"
#include "OSystem.hxx"
#include "Settings.hxx"
#include "ThreadDebugging.hxx"
#include "FBSurfaceSDL2.hxx"
#include "FrameBufferSDL2.hxx"
#include "ThreadDebugging.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBufferSDL2::FrameBufferSDL2(OSystem& osystem)
: FrameBuffer(osystem),
@ -83,8 +81,8 @@ FrameBufferSDL2::~FrameBufferSDL2()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::queryHardware(vector<GUI::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes,
void FrameBufferSDL2::queryHardware(vector<Common::Size>& fullscreenRes,
vector<Common::Size>& windowedRes,
VariantList& renderers)
{
ASSERT_MAIN_THREAD;
@ -377,7 +375,7 @@ unique_ptr<FBSurface>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::readPixels(uInt8* pixels, uInt32 pitch,
const GUI::Rect& rect) const
const Common::Rect& rect) const
{
ASSERT_MAIN_THREAD;

View File

@ -95,7 +95,7 @@ class FrameBufferSDL2 : public FrameBuffer
@param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer
*/
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override;
void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const override;
/**
Clear the frame buffer
@ -115,8 +115,8 @@ class FrameBufferSDL2 : public FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name)
*/
void queryHardware(vector<GUI::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes,
void queryHardware(vector<Common::Size>& fullscreenRes,
vector<Common::Size>& windowedRes,
VariantList& renderers) override;
/**

View File

@ -21,9 +21,12 @@
#include "Joystick.hxx"
#include "Settings.hxx"
#include "EventHandler.hxx"
#include "DialogContainer.hxx"
#include "PJoystickHandler.hxx"
#ifdef GUI_SUPPORT
#include "DialogContainer.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::PhysicalJoystickHandler(
OSystem& system, EventHandler& handler, Event& event)
@ -565,7 +568,9 @@ void PhysicalJoystickHandler::handleAxisEvent(int stick, int axis, int value)
// (only pass on the event if the state has changed)
if(value != j->axisLastValue[axis])
{
#ifdef GUI_SUPPORT
myHandler.overlay().handleJoyAxisEvent(stick, axis, value);
#endif
j->axisLastValue[axis] = value;
}
}
@ -608,8 +613,10 @@ void PhysicalJoystickHandler::handleBtnEvent(int stick, int button, bool pressed
// Determine which mode we're in, then send the event to the appropriate place
if(myHandler.state() == EventHandlerState::EMULATION)
myHandler.handleEvent(j->btnTable[button][kEmulationMode], pressed);
#ifdef GUI_SUPPORT
else if(myHandler.hasOverlay())
myHandler.overlay().handleJoyBtnEvent(stick, button, pressed);
#endif
break; // Regular button
// These events don't have to pass through handleEvent, since
@ -671,6 +678,7 @@ void PhysicalJoystickHandler::handleHatEvent(int stick, int hat, int value)
myHandler.handleEvent(j->hatTable[hat][int(JoyHat::LEFT)][kEmulationMode],
value & EVENT_HATLEFT_M);
}
#ifdef GUI_SUPPORT
else if(myHandler.hasOverlay())
{
if(value == EVENT_HATCENTER_M)
@ -687,6 +695,7 @@ void PhysicalJoystickHandler::handleHatEvent(int stick, int hat, int value)
myHandler.overlay().handleJoyHatEvent(stick, hat, JoyHat::LEFT);
}
}
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -25,12 +25,14 @@
#include "StellaKeys.hxx"
#include "TIASurface.hxx"
#include "PNGLibrary.hxx"
#include "DialogContainer.hxx"
#include "PKeyboardHandler.hxx"
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#ifdef GUI_SUPPORT
#include "DialogContainer.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalKeyboardHandler::PhysicalKeyboardHandler(
@ -337,8 +339,10 @@ void PhysicalKeyboardHandler::handleEvent(StellaKey key, StellaMod mod, bool pre
break;
default:
#ifdef GUI_SUPPORT
if(myHandler.hasOverlay())
myHandler.overlay().handleKeyEvent(key, mod, pressed);
#endif
break;
}
}

View File

@ -131,7 +131,7 @@ void PNGLibrary::saveImage(const string& filename, const VariantList& comments)
throw runtime_error("ERROR: Couldn't create snapshot file");
const FrameBuffer& fb = myOSystem.frameBuffer();
const GUI::Rect& rect = fb.imageRect();
const Common::Rect& rect = fb.imageRect();
png_uint_32 width = rect.width(), height = rect.height();
// Get framebuffer pixel data (we get ABGR format)
@ -149,7 +149,7 @@ void PNGLibrary::saveImage(const string& filename, const VariantList& comments)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PNGLibrary::saveImage(const string& filename, const FBSurface& surface,
const GUI::Rect& rect, const VariantList& comments)
const Common::Rect& rect, const VariantList& comments)
{
ofstream out(filename, std::ios_base::binary);
if(!out.is_open())
@ -347,7 +347,7 @@ void PNGLibrary::takeSnapshot(uInt32 number)
string message = "Snapshot saved";
try
{
GUI::Rect rect;
Common::Rect rect;
const FBSurface& surface = myOSystem.frameBuffer().tiaSurface().baseSurface(rect);
myOSystem.png().saveImage(filename, surface, rect, comments);
}

View File

@ -15,11 +15,11 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================
#if defined(PNG_SUPPORT)
#ifndef PNGLIBRARY_HXX
#define PNGLIBRARY_HXX
#if defined(PNG_SUPPORT)
#include <png.h>
class OSystem;
@ -82,7 +82,7 @@ class PNGLibrary
more detailed error message.
*/
void saveImage(const string& filename, const FBSurface& surface,
const GUI::Rect& rect = GUI::EmptyRect,
const Common::Rect& rect = Common::EmptyRect,
const VariantList& comments = EmptyVarList);
/**
@ -199,6 +199,6 @@ class PNGLibrary
PNGLibrary& operator=(PNGLibrary&&) = delete;
};
#endif // PNG_SUPPORT
#endif
#endif // PNG_SUPPORT

View File

@ -25,7 +25,7 @@
#include "bspf.hxx"
namespace GUI {
namespace Common {
/*
This small class is an helper for position and size values.
@ -163,6 +163,6 @@ struct Rect
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Rect EmptyRect;
} // End of namespace GUI
} // End of namespace Common
#endif

View File

@ -52,7 +52,7 @@ class Variant
Variant(float f) { buf().str(""); buf() << f; data = buf().str(); }
Variant(double d) { buf().str(""); buf() << d; data = buf().str(); }
Variant(bool b) { buf().str(""); buf() << b; data = buf().str(); }
Variant(const GUI::Size& s) { buf().str(""); buf() << s; data = buf().str(); }
Variant(const Common::Size& s) { buf().str(""); buf() << s; data = buf().str(); }
// Conversion methods
const string& toString() const { return data; }
@ -72,7 +72,7 @@ class Variant
return parsed;
}
const bool toBool() const { return data == "1" || data == "true"; }
const GUI::Size toSize() const { return GUI::Size(data); }
const Common::Size toSize() const { return Common::Size(data); }
// Comparison
bool operator==(const Variant& v) const { return data == v.data; }

View File

@ -91,8 +91,8 @@ Debugger::~Debugger()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::initialize()
{
const GUI::Size& s = myOSystem.settings().getSize("dbg.res");
const GUI::Size& d = myOSystem.frameBuffer().desktopSize();
const Common::Size& s = myOSystem.settings().getSize("dbg.res");
const Common::Size& d = myOSystem.frameBuffer().desktopSize();
myWidth = s.w; myHeight = s.h;
// The debugger dialog is resizable, within certain bounds
@ -102,7 +102,7 @@ void Debugger::initialize()
myWidth = std::min(myWidth, uInt32(d.w));
myHeight = std::min(myHeight, uInt32(d.h));
myOSystem.settings().setValue("dbg.res", GUI::Size(myWidth, myHeight));
myOSystem.settings().setValue("dbg.res", Common::Size(myWidth, myHeight));
delete myBaseDialog; myBaseDialog = myDialog = nullptr;
myDialog = new DebuggerDialog(myOSystem, *this, 0, 0, myWidth, myHeight);

View File

@ -668,9 +668,9 @@ void DataGridWidget::drawWidget(bool hilite)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DataGridWidget::getEditRect() const
Common::Rect DataGridWidget::getEditRect() const
{
GUI::Rect r(1, 0, _colWidth, _rowHeight);
Common::Rect r(1, 0, _colWidth, _rowHeight);
const int rowoffset = _currentRow * _rowHeight;
const int coloffset = _currentCol * _colWidth + 4;
r.top += rowoffset;

View File

@ -92,7 +92,7 @@ class DataGridWidget : public EditableWidget
void endEditMode() override;
void abortEditMode() override;
GUI::Rect getEditRect() const override;
Common::Rect getEditRect() const override;
void receivedFocusWidget() override;
void lostFocusWidget() override;

View File

@ -430,7 +430,7 @@ void DebuggerDialog::showFatalMessage(const string& msg)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::addTiaArea()
{
const GUI::Rect& r = getTiaBounds();
const Common::Rect& r = getTiaBounds();
myTiaOutput =
new TiaOutputWidget(this, *myNFont, r.left, r.top, r.width(), r.height());
}
@ -438,7 +438,7 @@ void DebuggerDialog::addTiaArea()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::addTabArea()
{
const GUI::Rect& r = getTabBounds();
const Common::Rect& r = getTabBounds();
const int vBorder = 4;
// The tab widget
@ -488,7 +488,7 @@ void DebuggerDialog::addTabArea()
void DebuggerDialog::addStatusArea()
{
const int lineHeight = myLFont->getLineHeight();
const GUI::Rect& r = getStatusBounds();
const Common::Rect& r = getStatusBounds();
int xpos, ypos;
xpos = r.left; ypos = r.top;
@ -540,7 +540,7 @@ void DebuggerDialog::addRomArea()
0b0100000
};
const GUI::Rect& r = getRomBounds();
const Common::Rect& r = getRomBounds();
const int VBORDER = 4;
WidgetArray wid1, wid2;
ButtonWidget* b;
@ -681,47 +681,47 @@ void DebuggerDialog::addRomArea()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getTiaBounds() const
Common::Rect DebuggerDialog::getTiaBounds() const
{
// The area showing the TIA image (NTSC and PAL supported, up to 260 lines)
GUI::Rect r(0, 0, 320, std::max(260, int(_h * 0.35)));
Common::Rect r(0, 0, 320, std::max(260, int(_h * 0.35)));
return r;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getRomBounds() const
Common::Rect DebuggerDialog::getRomBounds() const
{
// The ROM area is the full area to the right of the tabs
const GUI::Rect& status = getStatusBounds();
GUI::Rect r(status.right + 1, 0, _w, _h);
const Common::Rect& status = getStatusBounds();
Common::Rect r(status.right + 1, 0, _w, _h);
return r;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getStatusBounds() const
Common::Rect DebuggerDialog::getStatusBounds() const
{
// The status area is the full area to the right of the TIA image
// extending as far as necessary
// 30% of any space above 1030 pixels will be allocated to this area
const GUI::Rect& tia = getTiaBounds();
const Common::Rect& tia = getTiaBounds();
int x1 = tia.right + 1;
int y1 = 0;
int x2 = tia.right + 225 + (_w > 1030 ? int(0.35 * (_w - 1030)) : 0);
int y2 = tia.bottom;
GUI::Rect r(x1, y1, x2, y2);
Common::Rect r(x1, y1, x2, y2);
return r;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getTabBounds() const
Common::Rect DebuggerDialog::getTabBounds() const
{
// The tab area is the full area below the TIA image
const GUI::Rect& tia = getTiaBounds();
const GUI::Rect& status = getStatusBounds();
GUI::Rect r(0, tia.bottom + 1, status.right + 1, _h);
const Common::Rect& tia = getTiaBounds();
const Common::Rect& status = getStatusBounds();
Common::Rect r(0, tia.bottom + 1, status.right + 1, _h);
return r;
}

View File

@ -98,10 +98,10 @@ class DebuggerDialog : public Dialog
void addStatusArea();
void addRomArea();
GUI::Rect getTiaBounds() const;
GUI::Rect getRomBounds() const;
GUI::Rect getStatusBounds() const;
GUI::Rect getTabBounds() const;
Common::Rect getTiaBounds() const;
Common::Rect getRomBounds() const;
Common::Rect getStatusBounds() const;
Common::Rect getTabBounds() const;
private:
enum {

View File

@ -102,7 +102,7 @@ void RomListSettings::center()
{
// Make sure the menu is exactly where it should be, in case the image
// offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect();
const Common::Rect& image = instance().frameBuffer().imageRect();
uInt32 x = image.x() + _xorig;
uInt32 y = image.y() + _yorig;
uInt32 tx = image.x() + image.width();

View File

@ -469,8 +469,8 @@ void RomListWidget::drawWidget(bool hilite)
int i, pos, xpos, ypos, len = int(dlist.size());
ColorId textColor = onTop ? kTextColor : kColor;
const GUI::Rect& r = getEditRect();
const GUI::Rect& l = getLineRect();
const Common::Rect& r = getEditRect();
const Common::Rect& l = getLineRect();
// Draw a thin frame around the list and to separate columns
s.frameRect(_x, _y, _w + 1, _h, hilite ? kWidColorHi : kColor);
@ -568,9 +568,9 @@ void RomListWidget::drawWidget(bool hilite)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect RomListWidget::getLineRect() const
Common::Rect RomListWidget::getLineRect() const
{
GUI::Rect r(2, 1, _w, _fontHeight);
Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight,
xoffset = CheckboxWidget::boxSize() + 10;
r.top += yoffset;
@ -582,9 +582,9 @@ GUI::Rect RomListWidget::getLineRect() const
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect RomListWidget::getEditRect() const
Common::Rect RomListWidget::getEditRect() const
{
GUI::Rect r(2, 1, _w, _fontHeight);
Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight;
r.top += yoffset;
r.bottom += yoffset;

View File

@ -70,8 +70,8 @@ class RomListWidget : public EditableWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
void drawWidget(bool hilite) override;
GUI::Rect getLineRect() const;
GUI::Rect getEditRect() const override;
Common::Rect getLineRect() const;
Common::Rect getEditRect() const override;
int findItem(int x, int y) const;
void recalc();

View File

@ -81,7 +81,7 @@ void TiaOutputWidget::saveSnapshot(int execDepth, const string& execPrefix)
// to skip borders, add 1 to origin
int x = _x + 1, y = _y + 1;
GUI::Rect rect(x, y, x + width*2, y + height);
Common::Rect rect(x, y, x + width*2, y + height);
string message = "Snapshot saved";
try
{

View File

@ -27,7 +27,9 @@ class GuiObject;
#include "bspf.hxx"
#include "Device.hxx"
#include "Settings.hxx"
#ifdef DEBUGGER_SUPPORT
#include "Font.hxx"
#endif
/**
A cartridge is a device which contains the machine code for a
@ -199,6 +201,7 @@ class Cartridge : public Device
*/
virtual uInt32 thumbCallback(uInt8 function, uInt32 value1, uInt32 value2) { return 0; }
#ifdef DEBUGGER_SUPPORT
/**
Get optional debugger widget responsible for displaying info about the cart.
This can be used when the debugWidget runs out of space.
@ -220,6 +223,7 @@ class Cartridge : public Device
{
return nullptr;
}
#endif
protected:
/**

View File

@ -50,8 +50,6 @@
#include "FrameBuffer.hxx"
#include "TIASurface.hxx"
#include "OSystem.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Serializable.hxx"
#include "Serializer.hxx"
#include "TimerManager.hxx"
@ -64,13 +62,12 @@
#include "frame-manager/FrameLayoutDetector.hxx"
#include "frame-manager/YStartDetector.hxx"
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#ifdef CHEATCODE_SUPPORT
#include "CheatManager.hxx"
#endif
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#include "Console.hxx"

View File

@ -22,23 +22,16 @@
#include "Logger.hxx"
#include "Base.hxx"
#include "CommandMenu.hxx"
#include "Console.hxx"
#include "DialogContainer.hxx"
#include "Event.hxx"
#include "FrameBuffer.hxx"
#include "FSNode.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "Menu.hxx"
#include "OSystem.hxx"
#include "Joystick.hxx"
#include "Paddles.hxx"
#include "PJoystickHandler.hxx"
#include "PointingDevice.hxx"
#include "PropsSet.hxx"
#include "ListWidget.hxx"
#include "ScrollBarWidget.hxx"
#include "Settings.hxx"
#include "Sound.hxx"
#include "StateManager.hxx"
@ -58,6 +51,15 @@
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#ifdef GUI_SUPPORT
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "DialogContainer.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "ListWidget.hxx"
#include "ScrollBarWidget.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandler::EventHandler(OSystem& osystem)
@ -100,11 +102,13 @@ void EventHandler::initialize()
Paddles::setMouseSensitivity(myOSystem.settings().getInt("msense"));
PointingDevice::setSensitivity(myOSystem.settings().getInt("tsense"));
#ifdef GUI_SUPPORT
// Set quick select delay when typing characters in listwidgets
ListWidget::setQuickSelectDelay(myOSystem.settings().getInt("listdelay"));
// Set number of lines a mousewheel will scroll
ScrollBarWidget::setWheelLines(myOSystem.settings().getInt("mwheel"));
#endif
// Integer to string conversions (for HEX) use upper or lower-case
Common::Base::setHexUppercase(myOSystem.settings().getBool("dbg.uhex"));
@ -230,9 +234,11 @@ void EventHandler::poll(uInt64 time)
}
else if(myOverlay)
{
#ifdef GUI_SUPPORT
// Update the current dialog container at regular intervals
// Used to implement continuous events
myOverlay->updateTime(time);
#endif
}
// Turn off all mouse-related items; if they haven't been taken care of
@ -244,9 +250,11 @@ void EventHandler::poll(uInt64 time)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::handleTextEvent(char text)
{
#ifdef GUI_SUPPORT
// Text events are only used in GUI mode
if(myOverlay)
myOverlay->handleTextEvent(text);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -262,8 +270,10 @@ void EventHandler::handleMouseMotionEvent(int x, int y, int xrel, int yrel)
}
mySkipMouseMotion = false;
}
#ifdef GUI_SUPPORT
else if(myOverlay)
myOverlay->handleMouseMotionEvent(x, y);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -285,8 +295,10 @@ void EventHandler::handleMouseButtonEvent(MouseButton b, bool pressed,
return;
}
}
#ifdef GUI_SUPPORT
else if(myOverlay)
myOverlay->handleMouseButtonEvent(b, pressed, x, y);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1121,16 +1133,20 @@ void EventHandler::setMouseControllerMode(const string& enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::enterMenuMode(EventHandlerState state)
{
#ifdef GUI_SUPPORT
setState(state);
myOverlay->reStack();
myOSystem.sound().mute(true);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::leaveMenuMode()
{
#ifdef GUI_SUPPORT
setState(EventHandlerState::EMULATION);
myOSystem.sound().mute(false);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1187,6 +1203,7 @@ void EventHandler::leaveDebugMode()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind)
{
#ifdef GUI_SUPPORT
// add one extra state if we are in Time Machine mode
// TODO: maybe remove this state if we leave the menu at this new state
myOSystem.state().addExtraState("enter Time Machine dialog"); // force new state
@ -1196,6 +1213,7 @@ void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind)
myOSystem.timeMachine().setEnterWinds(unwind ? numWinds : -numWinds);
enterMenuMode(EventHandlerState::TIMEMACHINE);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1224,6 +1242,7 @@ void EventHandler::setState(EventHandlerState state)
enableTextEvents(false);
break;
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU:
myOverlay = &myOSystem.menu();
enableTextEvents(true);
@ -1244,15 +1263,17 @@ void EventHandler::setState(EventHandlerState state)
myOverlay = &myOSystem.launcher();
enableTextEvents(true);
break;
#endif
case EventHandlerState::DEBUGGER:
#ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER:
myOverlay = &myOSystem.debugger();
enableTextEvents(true);
#endif
break;
#endif
case EventHandlerState::NONE:
default:
break;
}

View File

@ -17,11 +17,14 @@
#include <cmath>
#include "Font.hxx"
#include "Rect.hxx"
#include "FrameBuffer.hxx"
#include "FBSurface.hxx"
#ifdef GUI_SUPPORT
#include "Font.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FBSurface::FBSurface()
: myPixels(nullptr),
@ -37,7 +40,7 @@ FBSurface::FBSurface()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const
void FBSurface::readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const
{
uInt8* src = reinterpret_cast<uInt8*>(myPixels + rect.y() * myPitch + rect.x());
@ -166,6 +169,7 @@ void FBSurface::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
uInt32 tx, uInt32 ty, ColorId color, ColorId shadowColor)
{
#ifdef GUI_SUPPORT
if(shadowColor != kNone)
{
drawChar(font, chr, tx + 1, ty + 0, shadowColor);
@ -220,6 +224,7 @@ void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
buffer += myPitch;
}
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -310,6 +315,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
ColorId color, TextAlign align,
int deltax, bool useEllipsis, ColorId shadowColor)
{
#ifdef GUI_SUPPORT
const string ELLIPSIS = "\x1d"; // "..."
const int leftX = x, rightX = x + w;
uInt32 i;
@ -358,6 +364,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
x += w;
}
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -23,6 +23,8 @@ class TIASurface;
namespace GUI {
class Font;
}
namespace Common {
struct Rect;
}
@ -63,7 +65,7 @@ class FBSurface
@param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer
*/
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const;
void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const;
//////////////////////////////////////////////////////////////////////////
// Note: The drawing primitives below will work, but do not take
@ -238,8 +240,8 @@ class FBSurface
These methods answer the current *rendering* dimensions of the
specified surface.
*/
virtual const GUI::Rect& srcRect() const = 0;
virtual const GUI::Rect& dstRect() const = 0;
virtual const Common::Rect& srcRect() const = 0;
virtual const Common::Rect& dstRect() const = 0;
/**
These methods set the origin point and width/height for the

View File

@ -21,15 +21,6 @@
#include "Console.hxx"
#include "EventHandler.hxx"
#include "Event.hxx"
#include "Font.hxx"
#include "StellaFont.hxx"
#include "StellaMediumFont.hxx"
#include "StellaLargeFont.hxx"
#include "ConsoleFont.hxx"
#include "Launcher.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "TimeMachine.hxx"
#include "OSystem.hxx"
#include "Settings.hxx"
#include "TIA.hxx"
@ -42,6 +33,17 @@
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#ifdef GUI_SUPPORT
#include "Font.hxx"
#include "StellaFont.hxx"
#include "StellaMediumFont.hxx"
#include "StellaLargeFont.hxx"
#include "ConsoleFont.hxx"
#include "Launcher.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "TimeMachine.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBuffer::FrameBuffer(OSystem& osystem)
@ -64,13 +66,13 @@ FrameBuffer::~FrameBuffer()
bool FrameBuffer::initialize()
{
// Get desktop resolution and supported renderers
vector<GUI::Size> windowedDisplays;
vector<Common::Size> windowedDisplays;
queryHardware(myFullscreenDisplays, windowedDisplays, myRenderers);
uInt32 query_w = windowedDisplays[0].w, query_h = windowedDisplays[0].h;
// Check the 'maxres' setting, which is an undocumented developer feature
// that specifies the desktop size (not normally set)
const GUI::Size& s = myOSystem.settings().getSize("maxres");
const Common::Size& s = myOSystem.settings().getSize("maxres");
if(s.valid())
{
query_w = s.w;
@ -80,6 +82,7 @@ bool FrameBuffer::initialize()
myDesktopSize.w = std::max(query_w, FBMinimum::Width);
myDesktopSize.h = std::max(query_h, FBMinimum::Height);
#ifdef GUI_SUPPORT
////////////////////////////////////////////////////////////////////
// Create fonts to draw text
// NOTE: the logic determining appropriate font sizes is done here,
@ -115,6 +118,7 @@ bool FrameBuffer::initialize()
myLauncherFont = make_unique<GUI::Font>(GUI::stellaMediumDesc);
else
myLauncherFont = make_unique<GUI::Font>(GUI::stellaLargeDesc);
#endif
// Determine possible TIA windowed zoom levels
uInt32 maxZoom = maxWindowSizeForScreen(
@ -236,6 +240,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
else
return FBInitStatus::FailTooLarge;
#ifdef GUI_SUPPORT
// Erase any messages from a previous run
myMsg.counter = 0;
@ -254,6 +259,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
if(!myMsg.surface)
myMsg.surface = allocateSurface(FBMinimum::Width, font().getFontHeight()+10);
#endif
// Print initial usage message, but only print it later if the status has changed
if(myInitializedCount == 1)
@ -311,6 +317,7 @@ void FrameBuffer::update(bool force)
break; // EventHandlerState::PAUSE
}
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU:
{
force |= myOSystem.menu().needsRedraw();
@ -349,14 +356,17 @@ void FrameBuffer::update(bool force)
force |= myOSystem.launcher().draw(force);
break; // EventHandlerState::LAUNCHER
}
#endif
#ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER:
{
#ifdef DEBUGGER_SUPPORT
force |= myOSystem.debugger().draw(force);
#endif
break; // EventHandlerState::DEBUGGER
}
#endif
default:
break;
}
// Draw any pending messages
@ -403,6 +413,7 @@ void FrameBuffer::updateInEmulationMode(float framesPerSecond)
void FrameBuffer::showMessage(const string& message, MessagePosition position,
bool force)
{
#ifdef GUI_SUPPORT
// Only show messages if they've been enabled
if(myMsg.surface == nullptr || !(force || myOSystem.settings().getBool("uimessages")))
return;
@ -419,11 +430,13 @@ void FrameBuffer::showMessage(const string& message, MessagePosition position,
myMsg.surface->setDstSize(myMsg.w, myMsg.h);
myMsg.position = position;
myMsg.enabled = true;
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::drawFrameStats(float framesPerSecond)
{
#ifdef GUI_SUPPORT
const ConsoleInfo& info = myOSystem.console().about();
int xPos = 2, yPos = 0;
const int dy = font().getFontHeight() + 2;
@ -469,6 +482,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond)
myStatsMsg.surface->setDstPos(myImageRect.x() + 10, myImageRect.y() + 8);
myStatsMsg.surface->render();
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -508,6 +522,7 @@ void FrameBuffer::enableMessages(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inline bool FrameBuffer::drawMessage()
{
#ifdef GUI_SUPPORT
// Either erase the entire message (when time is reached),
// or show again this frame
if(myMsg.counter == 0)
@ -522,7 +537,7 @@ inline bool FrameBuffer::drawMessage()
}
// Draw the bounded box and text
const GUI::Rect& dst = myMsg.surface->dstRect();
const Common::Rect& dst = myMsg.surface->dstRect();
switch(myMsg.position)
{
@ -579,6 +594,7 @@ inline bool FrameBuffer::drawMessage()
myMsg.w, myMsg.color, TextAlign::Left);
myMsg.surface->render();
myMsg.counter--;
#endif
return true;
}
@ -956,8 +972,8 @@ FrameBuffer::VideoMode::VideoMode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh,
ih = std::min(ih, sh);
int ix = (sw - iw) >> 1;
int iy = (sh - ih) >> 1;
image = GUI::Rect(ix, iy, ix+iw, iy+ih);
screen = GUI::Size(sw, sh);
image = Common::Rect(ix, iy, ix+iw, iy+ih);
screen = Common::Size(sw, sh);
// Now resize based on windowed/fullscreen mode and stretch factor
iw = image.width();

View File

@ -59,8 +59,8 @@ class FrameBuffer
{
enum class Stretch { Preserve, Fill };
GUI::Rect image;
GUI::Size screen;
Common::Rect image;
Common::Size screen;
Stretch stretch;
string description;
uInt32 zoom;
@ -169,19 +169,19 @@ class FrameBuffer
Note that this will take into account the current scaling (if any)
as well as image 'centering'.
*/
const GUI::Rect& imageRect() const { return myImageRect; }
const Common::Rect& imageRect() const { return myImageRect; }
/**
Returns the current dimensions of the framebuffer window.
This is the entire area containing the framebuffer image as well as any
'unusable' area.
*/
const GUI::Size& screenSize() const { return myScreenSize; }
const Common::Size& screenSize() const { return myScreenSize; }
/**
Returns the current dimensions of the users' desktop.
*/
const GUI::Size& desktopSize() const { return myDesktopSize; }
const Common::Size& desktopSize() const { return myDesktopSize; }
/**
Get the supported renderers for the video hardware.
@ -195,14 +195,6 @@ class FrameBuffer
*/
const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; }
/**
Get the font object(s) of the framebuffer
*/
const GUI::Font& font() const { return *myFont; }
const GUI::Font& infoFont() const { return *myInfoFont; }
const GUI::Font& smallFont() const { return *mySmallFont; }
const GUI::Font& launcherFont() const { return *myLauncherFont; }
/**
Get the TIA surface associated with the framebuffer.
*/
@ -263,6 +255,16 @@ class FrameBuffer
*/
void stateChanged(EventHandlerState state);
#ifdef GUI_SUPPORT
/**
Get the font object(s) of the framebuffer
*/
const GUI::Font& font() const { return *myFont; }
const GUI::Font& infoFont() const { return *myInfoFont; }
const GUI::Font& smallFont() const { return *mySmallFont; }
const GUI::Font& launcherFont() const { return *myLauncherFont; }
#endif
//////////////////////////////////////////////////////////////////////
// The following methods are system-specific and can/must be
// implemented in derived classes.
@ -314,7 +316,7 @@ class FrameBuffer
@param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer
*/
virtual void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const = 0;
virtual void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const = 0;
/**
Clear the framebuffer.
@ -331,8 +333,8 @@ class FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name)
*/
virtual void queryHardware(vector<GUI::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes,
virtual void queryHardware(vector<Common::Size>& fullscreenRes,
vector<Common::Size>& windowedRes,
VariantList& renderers) = 0;
virtual Int32 getCurrentDisplayIndex() = 0;
@ -490,22 +492,23 @@ class FrameBuffer
// Dimensions of the actual image, after zooming, and taking into account
// any image 'centering'
GUI::Rect myImageRect;
Common::Rect myImageRect;
// Dimensions of the main window (not always the same as the image)
GUI::Size myScreenSize;
Common::Size myScreenSize;
// Maximum dimensions of the desktop area
GUI::Size myDesktopSize;
Common::Size myDesktopSize;
// The resolution of the attached displays in fullscreen mode
// The primary display is typically the first in the array
// Windowed modes use myDesktopSize directly
vector<GUI::Size> myFullscreenDisplays;
vector<Common::Size> myFullscreenDisplays;
// Supported renderers
VariantList myRenderers;
#ifdef GUI_SUPPORT
// The font object to use for the normal in-game GUI
unique_ptr<GUI::Font> myFont;
@ -517,6 +520,7 @@ class FrameBuffer
// The font object to use for the ROM launcher
unique_ptr<GUI::Font> myLauncherFont;
#endif
// The TIASurface class takes responsibility for TIA rendering
unique_ptr<TIASurface> myTIASurface;

View File

@ -46,12 +46,7 @@
#include "Settings.hxx"
#include "PropsSet.hxx"
#include "EventHandler.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "PNGLibrary.hxx"
#include "Widget.hxx"
#include "Console.hxx"
#include "Random.hxx"
#include "StateManager.hxx"
@ -64,6 +59,13 @@
#include "repository/KeyValueRepositoryNoop.hxx"
#include "repository/KeyValueRepositoryConfigfile.hxx"
#ifdef GUI_SUPPORT
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "Widget.hxx"
#endif
#include "OSystem.hxx"
@ -156,16 +158,6 @@ bool OSystem::create()
myEventHandler = MediaFactory::createEventHandler(*this);
myEventHandler->initialize();
#ifdef CHEATCODE_SUPPORT
myCheatManager = make_unique<CheatManager>(*this);
myCheatManager->loadCheatDatabase();
#endif
// Create various subsystems (menu and launcher GUI objects, etc)
myMenu = make_unique<Menu>(*this);
myCommandMenu = make_unique<CommandMenu>(*this);
myTimeMachine = make_unique<TimeMachine>(*this);
myLauncher = make_unique<Launcher>(*this);
myStateManager = make_unique<StateManager>(*this);
myTimerManager = make_unique<TimerManager>();
myAudioSettings = make_unique<AudioSettings>(*mySettings);
@ -178,6 +170,19 @@ bool OSystem::create()
// Create random number generator
myRandom = make_unique<Random>(uInt32(TimerManager::getTicks()));
#ifdef CHEATCODE_SUPPORT
myCheatManager = make_unique<CheatManager>(*this);
myCheatManager->loadCheatDatabase();
#endif
#ifdef GUI_SUPPORT
// Create various subsystems (menu and launcher GUI objects, etc)
myMenu = make_unique<Menu>(*this);
myCommandMenu = make_unique<CommandMenu>(*this);
myTimeMachine = make_unique<TimeMachine>(*this);
myLauncher = make_unique<Launcher>(*this);
#endif
#ifdef PNG_SUPPORT
// Create PNG handler
myPNGLib = make_unique<PNGLibrary>(*this);
@ -299,26 +304,31 @@ FBInitStatus OSystem::createFrameBuffer()
{
case EventHandlerState::EMULATION:
case EventHandlerState::PAUSE:
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU:
case EventHandlerState::CMDMENU:
case EventHandlerState::TIMEMACHINE:
#endif
if((fbstatus = myConsole->initializeVideo()) != FBInitStatus::Success)
return fbstatus;
break;
#ifdef GUI_SUPPORT
case EventHandlerState::LAUNCHER:
if((fbstatus = myLauncher->initializeVideo()) != FBInitStatus::Success)
return fbstatus;
break;
#endif
case EventHandlerState::DEBUGGER:
#ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER:
if((fbstatus = myDebugger->initializeVideo()) != FBInitStatus::Success)
return fbstatus;
#endif
break;
#endif
case EventHandlerState::NONE: // Should never happen
default:
Logger::log("ERROR: Unknown emulation state in createFrameBuffer()", 0);
break;
}
@ -430,6 +440,7 @@ bool OSystem::hasConsole() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool OSystem::createLauncher(const string& startdir)
{
#ifdef GUI_SUPPORT
closeConsole();
if(mySound)
@ -451,6 +462,9 @@ bool OSystem::createLauncher(const string& startdir)
myLauncherUsed = myLauncherUsed || status;
return status;
#else
return false;
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,12 +18,6 @@
#ifndef OSYSTEM_HXX
#define OSYSTEM_HXX
#ifdef PNG_SUPPORT
class PNGLibrary;
#endif
#ifdef CHEATCODE_SUPPORT
class CheatManager;
#endif
class CommandMenu;
class Console;
class Debugger;
@ -41,6 +35,13 @@ class TimerManager;
class VideoDialog;
class EmulationWorker;
class AudioSettings;
class SettingsDb;
#ifdef PNG_SUPPORT
class PNGLibrary;
#endif
#ifdef CHEATCODE_SUPPORT
class CheatManager;
#endif
#include <chrono>
@ -52,10 +53,6 @@ class AudioSettings;
#include "bspf.hxx"
#include "repository/KeyValueRepository.hxx"
#ifdef SQLITE_SUPPORT
#include "SettingsDb.hxx"
#endif
/**
This class provides an interface for accessing operating system specific
functions. It also comprises an overall parent object, to which all the
@ -138,34 +135,6 @@ class OSystem
*/
AudioSettings& audioSettings() { return *myAudioSettings; }
/**
Get the settings menu of the system.
@return The settings menu object
*/
Menu& menu() const { return *myMenu; }
/**
Get the command menu of the system.
@return The command menu object
*/
CommandMenu& commandMenu() const { return *myCommandMenu; }
/**
Get the ROM launcher of the system.
@return The launcher object
*/
Launcher& launcher() const { return *myLauncher; }
/**
Get the time machine of the system (manages state files).
@return The time machine object
*/
TimeMachine& timeMachine() const { return *myTimeMachine; }
/**
Get the state manager of the system.
@ -221,6 +190,36 @@ class OSystem
PNGLibrary& png() const { return *myPNGLib; }
#endif
#ifdef GUI_SUPPORT
/**
Get the settings menu of the system.
@return The settings menu object
*/
Menu& menu() const { return *myMenu; }
/**
Get the command menu of the system.
@return The command menu object
*/
CommandMenu& commandMenu() const { return *myCommandMenu; }
/**
Get the ROM launcher of the system.
@return The launcher object
*/
Launcher& launcher() const { return *myLauncher; }
/**
Get the time machine of the system (manages state files).
@return The time machine object
*/
TimeMachine& timeMachine() const { return *myTimeMachine; }
#endif
/**
Set all config file paths for the OSystem.
*/
@ -473,6 +472,7 @@ class OSystem
// Pointer to audio settings object
unique_ptr<AudioSettings> myAudioSettings;
#ifdef GUI_SUPPORT
// Pointer to the Menu object
unique_ptr<Menu> myMenu;
@ -481,10 +481,10 @@ class OSystem
// Pointer to the Launcher object
unique_ptr<Launcher> myLauncher;
bool myLauncherUsed;
// Pointer to the TimeMachine object
unique_ptr<TimeMachine> myTimeMachine;
#endif
#ifdef DEBUGGER_SUPPORT
// Pointer to the Debugger object
@ -510,6 +510,9 @@ class OSystem
// The list of log messages
string myLogMessages;
// Indicates whether ROM launcher was ever opened during this run
bool myLauncherUsed;
// Indicates whether to stop the main loop
bool myQuitLoop;

View File

@ -106,7 +106,7 @@ Settings::Settings()
// ROM browser options
setPermanent("exitlauncher", "false");
setPermanent("launcherres", GUI::Size(900, 600));
setPermanent("launcherres", Common::Size(900, 600));
setPermanent("launcherfont", "medium");
setPermanent("launcherroms", "true");
setPermanent("romviewer", "1");
@ -115,7 +115,7 @@ Settings::Settings()
// UI-related options
#ifdef DEBUGGER_SUPPORT
setPermanent("dbg.res",
GUI::Size(DebuggerDialog::kMediumFontMinW,
Common::Size(DebuggerDialog::kMediumFontMinW,
DebuggerDialog::kMediumFontMinH));
#endif
setPermanent("uipalette", "standard");

View File

@ -100,7 +100,7 @@ class Settings
float getFloat(const string& key) const { return value(key).toFloat(); }
bool getBool(const string& key) const { return value(key).toBool(); }
const string& getString(const string& key) const { return value(key).toString(); }
const GUI::Size getSize(const string& key) const { return value(key).toSize(); }
const Common::Size getSize(const string& key) const { return value(key).toSize(); }
protected:
/**

View File

@ -124,7 +124,7 @@ void TIASurface::setPalette(const uInt32* tia_palette, const uInt32* rgb_palette
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const FBSurface& TIASurface::baseSurface(GUI::Rect& rect) const
const FBSurface& TIASurface::baseSurface(Common::Rect& rect) const
{
uInt32 tiaw = myTIA->width(), width = tiaw * 2, height = myTIA->height();
rect.setBounds(0, 0, width, height);

View File

@ -69,7 +69,7 @@ class TIASurface
/**
Get the TIA base surface for use in saving to a PNG image.
*/
const FBSurface& baseSurface(GUI::Rect& rect) const;
const FBSurface& baseSurface(Common::Rect& rect) const;
/**
Use the palette to map a single indexed pixel color. This is used by the TIA output widget.

View File

@ -113,7 +113,7 @@ void CheckListWidget::drawWidget(bool hilite)
const int y = _y + 2 + _fontHeight * i + 2;
ColorId textColor = kTextColor;
GUI::Rect r(getEditRect());
Common::Rect r(getEditRect());
// Draw the selected item inverted, on a highlighted background.
if (_selectedItem == pos)
@ -147,9 +147,9 @@ void CheckListWidget::drawWidget(bool hilite)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect CheckListWidget::getEditRect() const
Common::Rect CheckListWidget::getEditRect() const
{
GUI::Rect r(2, 1, _w, _fontHeight);
Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight,
xoffset = CheckboxWidget::boxSize() + 10;
r.top += yoffset;

View File

@ -51,7 +51,7 @@ class CheckListWidget : public ListWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
void drawWidget(bool hilite) override;
GUI::Rect getEditRect() const override;
Common::Rect getEditRect() const override;
protected:
BoolArray _stateList;

View File

@ -84,7 +84,7 @@ void ContextMenu::center()
{
// Make sure the menu is exactly where it should be, in case the image
// offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect();
const Common::Rect& image = instance().frameBuffer().imageRect();
recalc(image);
uInt32 x = image.x() + _xorig;
uInt32 y = image.y() + _yorig;
@ -97,7 +97,7 @@ void ContextMenu::center()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ContextMenu::recalc(const GUI::Rect& image)
void ContextMenu::recalc(const Common::Rect& image)
{
// Now is the time to adjust the height
// If it's higher than the screen, we need to scroll through

View File

@ -94,7 +94,7 @@ class ContextMenu : public Dialog, public CommandSender
void drawDialog() override;
void recalc(const GUI::Rect& image);
void recalc(const Common::Rect& image);
int findItem(int x, int y) const;
void drawCurrentSelection(int item);

View File

@ -488,7 +488,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();
int xpos, ypos, pwidth;
const GUI::Size& ds = instance().frameBuffer().desktopSize();
const Common::Size& ds = instance().frameBuffer().desktopSize();
xpos = HBORDER;
ypos = VBORDER;
@ -809,7 +809,7 @@ void DeveloperDialog::loadConfig()
uInt32 w, h;
// Debugger size
const GUI::Size& ds = instance().settings().getSize("dbg.res");
const Common::Size& ds = instance().settings().getSize("dbg.res");
w = ds.w; h = ds.h;
myDebuggerWidthSlider->setValue(w);
@ -887,7 +887,7 @@ void DeveloperDialog::saveConfig()
myDebuggerFontStyle->getSelectedTag().toString());
// Debugger size
instance().settings().setValue("dbg.res",
GUI::Size(myDebuggerWidthSlider->getValue(),
Common::Size(myDebuggerWidthSlider->getValue(),
myDebuggerHeightSlider->getValue()));
// Debugger font size
instance().settings().setValue("dbg.fontsize", myDebuggerFontSize->getSelectedTag().toString());

View File

@ -162,8 +162,8 @@ void Dialog::center()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Dialog::positionAt(uInt32 pos)
{
const GUI::Size& screen = instance().frameBuffer().screenSize();
const GUI::Rect& dst = _surface->dstRect();
const Common::Size& screen = instance().frameBuffer().screenSize();
const Common::Rect& dst = _surface->dstRect();
int top = std::min(screen.h - dst.height(), screen.h >> 5);
int btm = std::min(screen.h - dst.height(), screen.h - dst.height() - (screen.h >> 5));
@ -869,7 +869,7 @@ Widget* Dialog::TabFocus::getNewFocus()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Dialog::getDynamicBounds(uInt32& w, uInt32& h) const
{
const GUI::Rect& r = instance().frameBuffer().imageRect();
const Common::Rect& r = instance().frameBuffer().imageRect();
if(r.width() <= FBMinimum::Width || r.height() <= FBMinimum::Height)
{

View File

@ -128,7 +128,7 @@ bool DialogContainer::needsRedraw() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DialogContainer::addDialog(Dialog* d)
{
const GUI::Rect& r = myOSystem.frameBuffer().imageRect();
const Common::Rect& r = myOSystem.frameBuffer().imageRect();
if(uInt32(d->getWidth()) > r.width() || uInt32(d->getHeight()) > r.height())
myOSystem.frameBuffer().showMessage(
"Unable to show dialog box; FIX THE CODE");

View File

@ -104,9 +104,9 @@ void EditTextWidget::drawWidget(bool hilite)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect EditTextWidget::getEditRect() const
Common::Rect EditTextWidget::getEditRect() const
{
GUI::Rect r(2, 1, _w - 2, _h);
Common::Rect r(2, 1, _w - 2, _h);
return r;
}

View File

@ -40,7 +40,7 @@ class EditTextWidget : public EditableWidget
void endEditMode() override;
void abortEditMode() override;
GUI::Rect getEditRect() const override;
Common::Rect getEditRect() const override;
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
void handleMouseEntered() override;

View File

@ -202,7 +202,7 @@ void EditableWidget::drawCaret()
if (!_editable || !isVisible() || !_boss->isVisible() || !_hasFocus)
return;
const GUI::Rect& editRect = getEditRect();
const Common::Rect& editRect = getEditRect();
int x = editRect.left;
int y = editRect.top;

View File

@ -68,7 +68,7 @@ class EditableWidget : public Widget, public CommandSender
virtual void endEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); }
virtual void abortEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); }
virtual GUI::Rect getEditRect() const = 0;
virtual Common::Rect getEditRect() const = 0;
virtual int getCaretOffset() const;
void drawCaret();
bool setCaretPos(int newPos);

View File

@ -133,7 +133,7 @@ void InputTextDialog::center()
{
// Make sure the menu is exactly where it should be, in case the image
// offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect();
const Common::Rect& image = instance().frameBuffer().imageRect();
uInt32 x = image.x() + myXOrig;
uInt32 y = image.y() + myYOrig;
uInt32 tx = image.x() + image.width();

View File

@ -29,8 +29,8 @@
Launcher::Launcher(OSystem& osystem)
: DialogContainer(osystem)
{
const GUI::Size& s = myOSystem.settings().getSize("launcherres");
const GUI::Size& d = myOSystem.frameBuffer().desktopSize();
const Common::Size& s = myOSystem.settings().getSize("launcherres");
const Common::Size& d = myOSystem.frameBuffer().desktopSize();
myWidth = s.w; myHeight = s.h;
// The launcher dialog is resizable, within certain bounds
@ -40,7 +40,7 @@ Launcher::Launcher(OSystem& osystem)
myWidth = std::min(myWidth, uInt32(d.w));
myHeight = std::min(myHeight, uInt32(d.h));
myOSystem.settings().setValue("launcherres", GUI::Size(myWidth, myHeight));
myOSystem.settings().setValue("launcherres", Common::Size(myWidth, myHeight));
myBaseDialog = new LauncherDialog(myOSystem, *this, 0, 0, myWidth, myHeight);
}

View File

@ -76,7 +76,7 @@ class ListWidget : public EditableWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
virtual void drawWidget(bool hilite) override = 0;
virtual GUI::Rect getEditRect() const override = 0;
virtual Common::Rect getEditRect() const override = 0;
int findItem(int x, int y) const;
void recalc();

View File

@ -119,8 +119,8 @@ void PopUpWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount)
if(isEnabled() && !myMenu->isVisible())
{
// Add menu just underneath parent widget
const GUI::Rect& image = instance().frameBuffer().imageRect();
const GUI::Rect& srect = dialog().surface().dstRect();
const Common::Rect& image = instance().frameBuffer().imageRect();
const Common::Rect& srect = dialog().surface().dstRect();
uInt32 tx = srect.x(), ty = srect.y();
tx += getAbsX() + _labelWidth - image.x();
ty += getAbsY() + getHeight() - image.y();

View File

@ -36,8 +36,8 @@ RomInfoWidget::RomInfoWidget(GuiObject* boss, const GUI::Font& font,
mySurfaceIsValid(false),
myHaveProperties(false),
myAvail(w > 400 ?
GUI::Size(TIAConstants::viewableWidth*2, TIAConstants::viewableHeight*2) :
GUI::Size(TIAConstants::viewableWidth, TIAConstants::viewableHeight))
Common::Size(TIAConstants::viewableWidth*2, TIAConstants::viewableHeight*2) :
Common::Size(TIAConstants::viewableWidth, TIAConstants::viewableHeight))
{
_flags = Widget::FLAG_ENABLED;
_bgcolor = kDlgColor;
@ -109,7 +109,7 @@ void RomInfoWidget::parseProperties(const FilesystemNode& node)
instance().png().loadImage(filename, *mySurface);
// Scale surface to available image area
const GUI::Rect& src = mySurface->srcRect();
const Common::Rect& src = mySurface->srcRect();
float scale = std::min(float(myAvail.w) / src.width(), float(myAvail.h) / src.height());
mySurface->setDstSize(uInt32(src.width() * scale), uInt32(src.height() * scale));
mySurfaceIsValid = true;
@ -178,13 +178,13 @@ void RomInfoWidget::drawWidget(bool hilite)
if(mySurfaceIsValid)
{
const GUI::Rect& dst = mySurface->dstRect();
const Common::Rect& dst = mySurface->dstRect();
uInt32 x = _x + ((_w - dst.width()) >> 1);
uInt32 y = _y + ((yoff - dst.height()) >> 1);
// Make sure when positioning the snapshot surface that we take
// the dialog surface position into account
const GUI::Rect& s_dst = s.dstRect();
const Common::Rect& s_dst = s.dstRect();
mySurface->setDstPos(x + s_dst.x(), y + s_dst.y());
}
else if(mySurfaceErrorMsg != "")

View File

@ -64,7 +64,7 @@ class RomInfoWidget : public Widget
string mySurfaceErrorMsg;
// How much space available for the PNG image
GUI::Size myAvail;
Common::Size myAvail;
private:
// Following constructors and assignment operators not supported

View File

@ -82,7 +82,7 @@ void StringListWidget::drawWidget(bool hilite)
s.frameRect(_x + 1, _y + 1 + _fontHeight * i, _w - 1, _fontHeight, onTop ? kWidColorHi : kBGColorLo);
}
GUI::Rect r(getEditRect());
Common::Rect r(getEditRect());
if (_selectedItem == pos && _editMode)
{
adjustOffset();
@ -101,9 +101,9 @@ void StringListWidget::drawWidget(bool hilite)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect StringListWidget::getEditRect() const
Common::Rect StringListWidget::getEditRect() const
{
GUI::Rect r(2, 1, _w - 2, _fontHeight);
Common::Rect r(2, 1, _w - 2, _fontHeight);
const int offset = std::max(0, (_selectedItem - _currentPos) * _fontHeight);
r.top += offset;
r.bottom += offset;

View File

@ -35,7 +35,7 @@ class StringListWidget : public ListWidget
void handleMouseEntered() override;
void handleMouseLeft() override;
void drawWidget(bool hilite) override;
GUI::Rect getEditRect() const override;
Common::Rect getEditRect() const override;
protected:
bool _hilite;

View File

@ -242,8 +242,8 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
void TimeMachineDialog::center()
{
// Place on the bottom of the screen, centered horizontally
const GUI::Size& screen = instance().frameBuffer().screenSize();
const GUI::Rect& dst = surface().dstRect();
const Common::Size& screen = instance().frameBuffer().screenSize();
const Common::Rect& dst = surface().dstRect();
surface().setDstPos((screen.w - dst.width()) >> 1, screen.h - dst.height() - 10);
}

View File

@ -57,7 +57,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
int lwidth, pwidth, bwidth;
WidgetArray wid;
VariantList items;
const GUI::Size& ds = instance().frameBuffer().desktopSize();
const Common::Size& ds = instance().frameBuffer().desktopSize();
// Set real dimensions
setSize(64 * fontWidth + HBORDER * 2, 11 * (lineHeight + V_GAP) + V_GAP * 9 + VBORDER + _th,
@ -246,7 +246,7 @@ void UIDialog::loadConfig()
myRomPath->setText(settings.getString("romdir"));
// Launcher size
const GUI::Size& ls = settings.getSize("launcherres");
const Common::Size& ls = settings.getSize("launcherres");
uInt32 w = ls.w, h = ls.h;
w = std::max(w, FBMinimum::Width);
@ -302,7 +302,7 @@ void UIDialog::saveConfig()
// Launcher size
settings.setValue("launcherres",
GUI::Size(myLauncherWidthSlider->getValue(),
Common::Size(myLauncherWidthSlider->getValue(),
myLauncherHeightSlider->getValue()));
// Launcher font

View File

@ -42,8 +42,8 @@ class FBSurfaceLIBRETRO : public FBSurface
uInt32 width() const override { return myWidth; }
uInt32 height() const override { return myHeight; }
const GUI::Rect& srcRect() const override { return mySrcGUIR; }
const GUI::Rect& dstRect() const override { return myDstGUIR; }
const Common::Rect& srcRect() const override { return mySrcGUIR; }
const Common::Rect& dstRect() const override { return myDstGUIR; }
void setSrcPos(uInt32 x, uInt32 y) override { }
void setSrcSize(uInt32 w, uInt32 h) override { }
void setDstPos(uInt32 x, uInt32 y) override { }
@ -73,7 +73,7 @@ class FBSurfaceLIBRETRO : public FBSurface
private:
FrameBufferLIBRETRO& myFB;
GUI::Rect mySrcGUIR, myDstGUIR;
Common::Rect mySrcGUIR, myDstGUIR;
private:
unique_ptr<uInt32[]> myPixelData;

View File

@ -30,8 +30,8 @@ FrameBufferLIBRETRO::FrameBufferLIBRETRO(OSystem& osystem)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferLIBRETRO::queryHardware(vector<GUI::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes,
void FrameBufferLIBRETRO::queryHardware(vector<Common::Size>& fullscreenRes,
vector<Common::Size>& windowedRes,
VariantList& renderers)
{
fullscreenRes.emplace_back(1920, 1080);

View File

@ -91,7 +91,7 @@ class FrameBufferLIBRETRO : public FrameBuffer
@param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer
*/
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override { }
void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const override { }
/**
Clear the frame buffer
@ -111,8 +111,8 @@ class FrameBufferLIBRETRO : public FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name)
*/
void queryHardware(vector<GUI::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes,
void queryHardware(vector<Common::Size>& fullscreenRes,
vector<Common::Size>& windowedRes,
VariantList& renderers) override;
/**

View File

@ -1,5 +1,5 @@
LIBRETRO_COMM_DIR = $(CORE_DIR)/../libretro-common
INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters -I$(CORE_DIR)/gui
INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters
ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
@ -31,7 +31,6 @@ SOURCES_CXX := \
$(CORE_DIR)/common/repository/KeyValueRepositoryConfigfile.cxx \
$(CORE_DIR)/common/tv_filters/AtariNTSC.cxx \
$(CORE_DIR)/common/tv_filters/NTSCFilter.cxx \
$(CORE_DIR)/common/ZipHandler.cxx \
$(CORE_DIR)/emucore/Bankswitch.cxx \
$(CORE_DIR)/emucore/Cart3EPlus.cxx \
$(CORE_DIR)/emucore/Cart4KSC.cxx \
@ -76,18 +75,6 @@ SOURCES_CXX := \
$(CORE_DIR)/emucore/tia/Player.cxx \
$(CORE_DIR)/emucore/tia/Playfield.cxx \
$(CORE_DIR)/emucore/tia/TIA.cxx \
$(CORE_DIR)/gui/ColorWidget.cxx \
$(CORE_DIR)/gui/DeveloperDialog.cxx \
$(CORE_DIR)/gui/FileListWidget.cxx \
$(CORE_DIR)/gui/JoystickDialog.cxx \
$(CORE_DIR)/gui/LoggerDialog.cxx \
$(CORE_DIR)/gui/MinUICommandDialog.cxx \
$(CORE_DIR)/gui/RadioButtonWidget.cxx \
$(CORE_DIR)/gui/SnapshotDialog.cxx \
$(CORE_DIR)/gui/TimeLineWidget.cxx \
$(CORE_DIR)/gui/TimeMachine.cxx \
$(CORE_DIR)/gui/TimeMachineDialog.cxx \
$(CORE_DIR)/common/PNGLibrary.cxx \
$(CORE_DIR)/emucore/AtariVox.cxx \
$(CORE_DIR)/emucore/Booster.cxx \
$(CORE_DIR)/emucore/Cart.cxx \
@ -140,43 +127,6 @@ SOURCES_CXX := \
$(CORE_DIR)/emucore/Settings.cxx \
$(CORE_DIR)/emucore/Switches.cxx \
$(CORE_DIR)/emucore/System.cxx \
$(CORE_DIR)/emucore/Thumbulator.cxx \
$(CORE_DIR)/gui/AboutDialog.cxx \
$(CORE_DIR)/gui/AudioDialog.cxx \
$(CORE_DIR)/gui/BrowserDialog.cxx \
$(CORE_DIR)/gui/CheckListWidget.cxx \
$(CORE_DIR)/gui/ComboDialog.cxx \
$(CORE_DIR)/gui/CommandDialog.cxx \
$(CORE_DIR)/gui/CommandMenu.cxx \
$(CORE_DIR)/gui/ContextMenu.cxx \
$(CORE_DIR)/gui/Dialog.cxx \
$(CORE_DIR)/gui/DialogContainer.cxx \
$(CORE_DIR)/gui/EditableWidget.cxx \
$(CORE_DIR)/gui/EditTextWidget.cxx \
$(CORE_DIR)/gui/EventMappingWidget.cxx \
$(CORE_DIR)/gui/Font.cxx \
$(CORE_DIR)/gui/GameInfoDialog.cxx \
$(CORE_DIR)/gui/GameList.cxx \
$(CORE_DIR)/gui/GlobalPropsDialog.cxx \
$(CORE_DIR)/gui/HelpDialog.cxx \
$(CORE_DIR)/gui/InputDialog.cxx \
$(CORE_DIR)/gui/InputTextDialog.cxx \
$(CORE_DIR)/gui/Launcher.cxx \
$(CORE_DIR)/gui/LauncherDialog.cxx \
$(CORE_DIR)/gui/ListWidget.cxx \
$(CORE_DIR)/gui/Menu.cxx \
$(CORE_DIR)/gui/MessageBox.cxx \
$(CORE_DIR)/gui/OptionsDialog.cxx \
$(CORE_DIR)/gui/PopUpWidget.cxx \
$(CORE_DIR)/gui/ProgressDialog.cxx \
$(CORE_DIR)/gui/RomAuditDialog.cxx \
$(CORE_DIR)/gui/RomInfoWidget.cxx \
$(CORE_DIR)/gui/ScrollBarWidget.cxx \
$(CORE_DIR)/gui/StellaSettingsDialog.cxx \
$(CORE_DIR)/gui/StringListWidget.cxx \
$(CORE_DIR)/gui/TabWidget.cxx \
$(CORE_DIR)/gui/UIDialog.cxx \
$(CORE_DIR)/gui/VideoDialog.cxx \
$(CORE_DIR)/gui/Widget.cxx
$(CORE_DIR)/emucore/Thumbulator.cxx
SOURCES_C :=

View File

@ -148,7 +148,6 @@
<ClCompile Include="..\common\AudioSettings.cxx" />
<ClCompile Include="..\common\Base.cxx" />
<ClCompile Include="..\common\FpsMeter.cxx" />
<ClCompile Include="..\common\FSNodeZIP.cxx" />
<ClCompile Include="..\common\MouseControl.cxx" />
<ClCompile Include="..\common\PhysicalJoystick.cxx" />
<ClCompile Include="..\common\PJoystickHandler.cxx" />
@ -161,7 +160,6 @@
<ClCompile Include="..\common\repository\KeyValueRepositoryConfigfile.cxx" />
<ClCompile Include="..\common\tv_filters\AtariNTSC.cxx" />
<ClCompile Include="..\common\tv_filters\NTSCFilter.cxx" />
<ClCompile Include="..\common\ZipHandler.cxx" />
<ClCompile Include="..\emucore\Bankswitch.cxx" />
<ClCompile Include="..\emucore\Cart3EPlus.cxx" />
<ClCompile Include="..\emucore\Cart4KSC.cxx" />
@ -207,19 +205,6 @@
<ClCompile Include="..\emucore\tia\Player.cxx" />
<ClCompile Include="..\emucore\tia\Playfield.cxx" />
<ClCompile Include="..\emucore\tia\TIA.cxx" />
<ClCompile Include="..\gui\ColorWidget.cxx" />
<ClCompile Include="..\gui\DeveloperDialog.cxx" />
<ClCompile Include="..\gui\FileListWidget.cxx" />
<ClCompile Include="..\gui\JoystickDialog.cxx" />
<ClCompile Include="..\gui\LoggerDialog.cxx" />
<ClCompile Include="..\gui\MinUICommandDialog.cxx" />
<ClCompile Include="..\gui\RadioButtonWidget.cxx" />
<ClCompile Include="..\gui\SnapshotDialog.cxx" />
<ClCompile Include="..\gui\StellaSettingsDialog.cxx" />
<ClCompile Include="..\gui\TimeLineWidget.cxx" />
<ClCompile Include="..\gui\TimeMachine.cxx" />
<ClCompile Include="..\gui\TimeMachineDialog.cxx" />
<ClCompile Include="..\common\PNGLibrary.cxx" />
<ClCompile Include="..\emucore\AtariVox.cxx" />
<ClCompile Include="..\emucore\Booster.cxx" />
<ClCompile Include="..\emucore\Cart.cxx" />
@ -273,42 +258,6 @@
<ClCompile Include="..\emucore\Switches.cxx" />
<ClCompile Include="..\emucore\System.cxx" />
<ClCompile Include="..\emucore\Thumbulator.cxx" />
<ClCompile Include="..\gui\AboutDialog.cxx" />
<ClCompile Include="..\gui\AudioDialog.cxx" />
<ClCompile Include="..\gui\BrowserDialog.cxx" />
<ClCompile Include="..\gui\CheckListWidget.cxx" />
<ClCompile Include="..\gui\ComboDialog.cxx" />
<ClCompile Include="..\gui\CommandDialog.cxx" />
<ClCompile Include="..\gui\CommandMenu.cxx" />
<ClCompile Include="..\gui\ContextMenu.cxx" />
<ClCompile Include="..\gui\Dialog.cxx" />
<ClCompile Include="..\gui\DialogContainer.cxx" />
<ClCompile Include="..\gui\EditableWidget.cxx" />
<ClCompile Include="..\gui\EditTextWidget.cxx" />
<ClCompile Include="..\gui\EventMappingWidget.cxx" />
<ClCompile Include="..\gui\Font.cxx" />
<ClCompile Include="..\gui\GameInfoDialog.cxx" />
<ClCompile Include="..\gui\GameList.cxx" />
<ClCompile Include="..\gui\GlobalPropsDialog.cxx" />
<ClCompile Include="..\gui\HelpDialog.cxx" />
<ClCompile Include="..\gui\InputDialog.cxx" />
<ClCompile Include="..\gui\InputTextDialog.cxx" />
<ClCompile Include="..\gui\Launcher.cxx" />
<ClCompile Include="..\gui\LauncherDialog.cxx" />
<ClCompile Include="..\gui\ListWidget.cxx" />
<ClCompile Include="..\gui\Menu.cxx" />
<ClCompile Include="..\gui\MessageBox.cxx" />
<ClCompile Include="..\gui\OptionsDialog.cxx" />
<ClCompile Include="..\gui\PopUpWidget.cxx" />
<ClCompile Include="..\gui\ProgressDialog.cxx" />
<ClCompile Include="..\gui\RomAuditDialog.cxx" />
<ClCompile Include="..\gui\RomInfoWidget.cxx" />
<ClCompile Include="..\gui\ScrollBarWidget.cxx" />
<ClCompile Include="..\gui\StringListWidget.cxx" />
<ClCompile Include="..\gui\TabWidget.cxx" />
<ClCompile Include="..\gui\UIDialog.cxx" />
<ClCompile Include="..\gui\VideoDialog.cxx" />
<ClCompile Include="..\gui\Widget.cxx" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\AudioQueue.hxx" />
@ -317,7 +266,6 @@
<ClInclude Include="..\common\bspf.hxx" />
<ClInclude Include="..\common\FpsMeter.hxx" />
<ClInclude Include="..\common\FSNodeFactory.hxx" />
<ClInclude Include="..\common\FSNodeZIP.hxx" />
<ClInclude Include="..\common\LinkedObjectPool.hxx" />
<ClInclude Include="..\common\Logger.hxx" />
<ClInclude Include="..\common\MediaFactory.hxx" />
@ -325,6 +273,7 @@
<ClInclude Include="..\common\PhysicalJoystick.hxx" />
<ClInclude Include="..\common\PJoystickHandler.hxx" />
<ClInclude Include="..\common\PKeyboardHandler.hxx" />
<ClInclude Include="..\common\Rect.hxx" />
<ClInclude Include="..\common\RewindManager.hxx" />
<ClInclude Include="..\common\StaggeredLogger.hxx" />
<ClInclude Include="..\common\StateManager.hxx" />
@ -336,7 +285,6 @@
<ClInclude Include="..\common\tv_filters\NTSCFilter.hxx" />
<ClInclude Include="..\common\Variant.hxx" />
<ClInclude Include="..\common\Vec.hxx" />
<ClInclude Include="..\common\ZipHandler.hxx" />
<ClInclude Include="..\emucore\AmigaMouse.hxx" />
<ClInclude Include="..\emucore\AtariMouse.hxx" />
<ClInclude Include="..\emucore\Bankswitch.hxx" />
@ -397,22 +345,6 @@
<ClInclude Include="..\emucore\tia\TIA.hxx" />
<ClInclude Include="..\emucore\tia\TIAConstants.hxx" />
<ClInclude Include="..\emucore\TrakBall.hxx" />
<ClInclude Include="..\gui\ColorWidget.hxx" />
<ClInclude Include="..\gui\ConsoleBFont.hxx" />
<ClInclude Include="..\gui\ConsoleMediumBFont.hxx" />
<ClInclude Include="..\gui\ConsoleMediumFont.hxx" />
<ClInclude Include="..\gui\DeveloperDialog.hxx" />
<ClInclude Include="..\gui\FileListWidget.hxx" />
<ClInclude Include="..\gui\JoystickDialog.hxx" />
<ClInclude Include="..\gui\LoggerDialog.hxx" />
<ClInclude Include="..\gui\MinUICommandDialog.hxx" />
<ClInclude Include="..\gui\RadioButtonWidget.hxx" />
<ClInclude Include="..\gui\SnapshotDialog.hxx" />
<ClInclude Include="..\gui\StellaSettingsDialog.hxx" />
<ClInclude Include="..\gui\TimeLineWidget.hxx" />
<ClInclude Include="..\gui\TimeMachine.hxx" />
<ClInclude Include="..\gui\TimeMachineDialog.hxx" />
<ClInclude Include="..\common\PNGLibrary.hxx" />
<ClInclude Include="..\common\Stack.hxx" />
<ClInclude Include="..\common\Version.hxx" />
<ClInclude Include="..\emucore\AtariVox.hxx" />
@ -475,47 +407,6 @@
<ClInclude Include="..\emucore\Switches.hxx" />
<ClInclude Include="..\emucore\System.hxx" />
<ClInclude Include="..\emucore\Thumbulator.hxx" />
<ClInclude Include="..\gui\AboutDialog.hxx" />
<ClInclude Include="..\gui\AudioDialog.hxx" />
<ClInclude Include="..\gui\BrowserDialog.hxx" />
<ClInclude Include="..\gui\CheckListWidget.hxx" />
<ClInclude Include="..\gui\ComboDialog.hxx" />
<ClInclude Include="..\gui\Command.hxx" />
<ClInclude Include="..\gui\CommandDialog.hxx" />
<ClInclude Include="..\gui\CommandMenu.hxx" />
<ClInclude Include="..\gui\ConsoleFont.hxx" />
<ClInclude Include="..\gui\ContextMenu.hxx" />
<ClInclude Include="..\gui\Dialog.hxx" />
<ClInclude Include="..\gui\DialogContainer.hxx" />
<ClInclude Include="..\gui\EditableWidget.hxx" />
<ClInclude Include="..\gui\EditTextWidget.hxx" />
<ClInclude Include="..\gui\EventMappingWidget.hxx" />
<ClInclude Include="..\gui\Font.hxx" />
<ClInclude Include="..\gui\GameInfoDialog.hxx" />
<ClInclude Include="..\gui\GameList.hxx" />
<ClInclude Include="..\gui\GlobalPropsDialog.hxx" />
<ClInclude Include="..\gui\GuiObject.hxx" />
<ClInclude Include="..\gui\HelpDialog.hxx" />
<ClInclude Include="..\gui\InputDialog.hxx" />
<ClInclude Include="..\gui\InputTextDialog.hxx" />
<ClInclude Include="..\gui\Launcher.hxx" />
<ClInclude Include="..\gui\LauncherDialog.hxx" />
<ClInclude Include="..\gui\ListWidget.hxx" />
<ClInclude Include="..\gui\Menu.hxx" />
<ClInclude Include="..\gui\MessageBox.hxx" />
<ClInclude Include="..\gui\OptionsDialog.hxx" />
<ClInclude Include="..\gui\PopUpWidget.hxx" />
<ClInclude Include="..\gui\ProgressDialog.hxx" />
<ClInclude Include="..\gui\Rect.hxx" />
<ClInclude Include="..\gui\RomAuditDialog.hxx" />
<ClInclude Include="..\gui\RomInfoWidget.hxx" />
<ClInclude Include="..\gui\ScrollBarWidget.hxx" />
<ClInclude Include="..\gui\StellaFont.hxx" />
<ClInclude Include="..\gui\StringListWidget.hxx" />
<ClInclude Include="..\gui\TabWidget.hxx" />
<ClInclude Include="..\gui\UIDialog.hxx" />
<ClInclude Include="..\gui\VideoDialog.hxx" />
<ClInclude Include="..\gui\Widget.hxx" />
<ClInclude Include="SoundLIBRETRO.hxx" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -3059,6 +3059,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
SDL_SUPPORT,
GUI_SUPPORT,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
JOYSTICK_SUPPORT,
@ -3115,6 +3116,7 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
SDL_SUPPORT,
GUI_SUPPORT,
CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT,
JOYSTICK_SUPPORT,

View File

@ -157,7 +157,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -193,7 +193,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -226,7 +226,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>
@ -260,7 +260,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>
@ -298,7 +298,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>
@ -335,7 +335,7 @@
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>