Second pass at optimizing header files, to eliminate cascaded compiles.

This commit is contained in:
Stephen Anthony 2017-11-16 13:31:20 -03:30
parent 838b277c0a
commit a7f1764411
27 changed files with 307 additions and 115 deletions

View File

@ -19,6 +19,7 @@
#include "bspf.hxx" #include "bspf.hxx"
#include "System.hxx" #include "System.hxx"
#include "M6502.hxx"
#include "FSNode.hxx" #include "FSNode.hxx"
#include "DiStella.hxx" #include "DiStella.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"

View File

@ -21,6 +21,10 @@
class Settings; class Settings;
class CartDebugWidget; class CartDebugWidget;
// Function type for CartDebug instance methods
class CartDebug;
using CartMethod = int (CartDebug::*)();
#include <map> #include <map>
#include <set> #include <set>
#include <list> #include <list>
@ -28,10 +32,6 @@ class CartDebugWidget;
#include "bspf.hxx" #include "bspf.hxx"
#include "DebuggerSystem.hxx" #include "DebuggerSystem.hxx"
// Function type for CartDebug instance methods
class CartDebug;
using CartMethod = int (CartDebug::*)();
class CartState : public DebuggerState class CartState : public DebuggerState
{ {
public: public:

View File

@ -18,6 +18,7 @@
#include <sstream> #include <sstream>
#include "M6502.hxx" #include "M6502.hxx"
#include "System.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"
#include "CartDebug.hxx" #include "CartDebug.hxx"
#include "TIADebug.hxx" #include "TIADebug.hxx"
@ -69,6 +70,78 @@ void CpuDebug::saveOldState()
Debugger::set_bits(myOldState.PS, myOldState.PSbits); Debugger::set_bits(myOldState.PS, myOldState.PSbits);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::pc() const
{
return mySystem.m6502().PC;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::sp() const
{
return mySystem.m6502().SP;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::a() const
{
return mySystem.m6502().A;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::x() const
{
return mySystem.m6502().X;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::y() const
{
return mySystem.m6502().Y;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::n() const
{
return mySystem.m6502().N;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::v() const
{
return mySystem.m6502().V;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::b() const
{
return mySystem.m6502().B;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::d() const
{
return mySystem.m6502().D;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::i() const
{
return mySystem.m6502().I;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::z() const
{
return !mySystem.m6502().notZ;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::c() const
{
return mySystem.m6502().C;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CpuDebug::setPC(int pc) void CpuDebug::setPC(int pc)
{ {

View File

@ -18,13 +18,15 @@
#ifndef CPU_DEBUG_HXX #ifndef CPU_DEBUG_HXX
#define CPU_DEBUG_HXX #define CPU_DEBUG_HXX
#include "M6502.hxx" class M6502;
#include "System.hxx" class System;
#include "DebuggerSystem.hxx"
// Function type for CpuDebug instance methods // Function type for CpuDebug instance methods
class CpuDebug;
using CpuMethod = int (CpuDebug::*)() const; using CpuMethod = int (CpuDebug::*)() const;
#include "DebuggerSystem.hxx"
class CpuState : public DebuggerState class CpuState : public DebuggerState
{ {
public: public:
@ -44,23 +46,20 @@ class CpuDebug : public DebuggerSystem
void saveOldState() override; void saveOldState() override;
string toString() override { return EmptyString; } // Not needed, since CPU stuff is always visible string toString() override { return EmptyString; } // Not needed, since CPU stuff is always visible
// I know, we ain't supposed to do this... int pc() const;
M6502& m6502() const { return mySystem.m6502(); } int sp() const;
int a() const;
int pc() const { return mySystem.m6502().PC; } int x() const;
int sp() const { return mySystem.m6502().SP; } int y() const;
int a() const { return mySystem.m6502().A; }
int x() const { return mySystem.m6502().X; }
int y() const { return mySystem.m6502().Y; }
// These return int, not boolean! // These return int, not boolean!
int n() const { return mySystem.m6502().N; } int n() const;
int v() const { return mySystem.m6502().V; } int v() const;
int b() const { return mySystem.m6502().B; } int b() const;
int d() const { return mySystem.m6502().D; } int d() const;
int i() const { return mySystem.m6502().I; } int i() const;
int z() const { return !mySystem.m6502().notZ; } int z() const;
int c() const { return mySystem.m6502().C; } int c() const;
void setPC(int pc); void setPC(int pc);
void setSP(int sp); void setSP(int sp);

View File

@ -83,6 +83,11 @@ Debugger::Debugger(OSystem& osystem, Console& console)
myStaticDebugger = this; myStaticDebugger = this;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Debugger::~Debugger()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::initialize() void Debugger::initialize()
{ {

View File

@ -31,6 +31,7 @@ class TrapArray;
class PromptWidget; class PromptWidget;
class ButtonWidget; class ButtonWidget;
class M6502;
class CartDebug; class CartDebug;
class CpuDebug; class CpuDebug;
class RiotDebug; class RiotDebug;
@ -43,6 +44,7 @@ class RewindManager;
#include "Base.hxx" #include "Base.hxx"
#include "DialogContainer.hxx" #include "DialogContainer.hxx"
#include "DebuggerDialog.hxx" #include "DebuggerDialog.hxx"
#include "FrameBufferConstants.hxx"
#include "System.hxx" #include "System.hxx"
#include "bspf.hxx" #include "bspf.hxx"
@ -69,7 +71,7 @@ class Debugger : public DialogContainer
Create a new debugger parent object Create a new debugger parent object
*/ */
Debugger(OSystem& osystem, Console& console); Debugger(OSystem& osystem, Console& console);
virtual ~Debugger() = default; virtual ~Debugger();
public: public:
/** /**
@ -217,6 +219,9 @@ class Debugger : public DialogContainer
mySystem.poke(addr, value, flags); mySystem.poke(addr, value, flags);
} }
/** Convenience method to access the 6502 from System */
M6502& m6502() const { return mySystem.m6502(); }
/** These are now exposed so Expressions can use them. */ /** These are now exposed so Expressions can use them. */
int peekAsInt(int addr, uInt8 flags = 0) { int peekAsInt(int addr, uInt8 flags = 0) {
return mySystem.peek(uInt16(addr), flags); return mySystem.peek(uInt16(addr), flags);

View File

@ -30,6 +30,7 @@
#include "M6502.hxx" #include "M6502.hxx"
#include "Expression.hxx" #include "Expression.hxx"
#include "FSNode.hxx" #include "FSNode.hxx"
#include "Settings.hxx"
#include "PromptWidget.hxx" #include "PromptWidget.hxx"
#include "RomWidget.hxx" #include "RomWidget.hxx"
#include "ProgressDialog.hxx" #include "ProgressDialog.hxx"
@ -565,7 +566,7 @@ string DebuggerParser::eval()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerParser::listTraps(bool listCond) void DebuggerParser::listTraps(bool listCond)
{ {
StringList names = debugger.cpuDebug().m6502().getCondTrapNames(); StringList names = debugger.m6502().getCondTrapNames();
commandResult << (listCond ? "trapifs:" : "traps:") << endl; commandResult << (listCond ? "trapifs:" : "traps:") << endl;
for(uInt32 i = 0; i < names.size(); i++) for(uInt32 i = 0; i < names.size(); i++)
@ -648,11 +649,11 @@ string DebuggerParser::saveScriptFile(string file)
if(debugger.breakPoint(i)) if(debugger.breakPoint(i))
out << "break " << Base::toString(i) << endl; out << "break " << Base::toString(i) << endl;
StringList conds = debugger.cpuDebug().m6502().getCondBreakNames(); StringList conds = debugger.m6502().getCondBreakNames();
for(const auto& cond : conds) for(const auto& cond : conds)
out << "breakif {" << cond << "}" << endl; out << "breakif {" << cond << "}" << endl;
StringList names = debugger.cpuDebug().m6502().getCondTrapNames(); StringList names = debugger.m6502().getCondTrapNames();
for(uInt32 i = 0; i < myTraps.size(); ++i) for(uInt32 i = 0; i < myTraps.size(); ++i)
{ {
bool read = myTraps[i]->read; bool read = myTraps[i]->read;
@ -745,7 +746,7 @@ void DebuggerParser::executeBreakif()
int res = YaccParser::parse(argStrings[0].c_str()); int res = YaccParser::parse(argStrings[0].c_str());
if(res == 0) if(res == 0)
{ {
uInt32 ret = debugger.cpuDebug().m6502().addCondBreak( uInt32 ret = debugger.m6502().addCondBreak(
YaccParser::getResult(), argStrings[0] ); YaccParser::getResult(), argStrings[0] );
commandResult << "Added breakif " << Base::toString(ret); commandResult << "Added breakif " << Base::toString(ret);
} }
@ -793,7 +794,7 @@ void DebuggerParser::executeCheat()
void DebuggerParser::executeClearbreaks() void DebuggerParser::executeClearbreaks()
{ {
debugger.clearAllBreakPoints(); debugger.clearAllBreakPoints();
debugger.cpuDebug().m6502().clearCondBreaks(); debugger.m6502().clearCondBreaks();
commandResult << "all breakpoints cleared"; commandResult << "all breakpoints cleared";
} }
@ -812,7 +813,7 @@ void DebuggerParser::executeClearconfig()
void DebuggerParser::executeCleartraps() void DebuggerParser::executeCleartraps()
{ {
debugger.clearAllTraps(); debugger.clearAllTraps();
debugger.cpuDebug().m6502().clearCondTraps(); debugger.m6502().clearCondTraps();
myTraps.clear(); myTraps.clear();
commandResult << "all traps cleared"; commandResult << "all traps cleared";
} }
@ -916,7 +917,7 @@ void DebuggerParser::executeDefine()
// "delbreakif" // "delbreakif"
void DebuggerParser::executeDelbreakif() void DebuggerParser::executeDelbreakif()
{ {
if (debugger.cpuDebug().m6502().delCondBreak(args[0])) if (debugger.m6502().delCondBreak(args[0]))
commandResult << "removed breakif " << Base::toString(args[0]); commandResult << "removed breakif " << Base::toString(args[0]);
else else
commandResult << red("no such breakif"); commandResult << red("no such breakif");
@ -938,7 +939,7 @@ void DebuggerParser::executeDeltrap()
{ {
int index = args[0]; int index = args[0];
if(debugger.cpuDebug().m6502().delCondTrap(index)) if(debugger.m6502().delCondTrap(index))
{ {
for(uInt32 addr = myTraps[index]->begin; addr <= myTraps[index]->end; ++addr) for(uInt32 addr = myTraps[index]->begin; addr <= myTraps[index]->end; ++addr)
executeTrapRW(addr, myTraps[index]->read, myTraps[index]->write, false); executeTrapRW(addr, myTraps[index]->read, myTraps[index]->write, false);
@ -1170,7 +1171,7 @@ void DebuggerParser::executeListbreaks()
if(count) if(count)
commandResult << "breaks:" << endl << buf.str(); commandResult << "breaks:" << endl << buf.str();
StringList conds = debugger.cpuDebug().m6502().getCondBreakNames(); StringList conds = debugger.m6502().getCondBreakNames();
if(conds.size() > 0) if(conds.size() > 0)
{ {
if(count) if(count)
@ -1216,7 +1217,7 @@ void DebuggerParser::executeListfunctions()
// "listtraps" // "listtraps"
void DebuggerParser::executeListtraps() void DebuggerParser::executeListtraps()
{ {
StringList names = debugger.cpuDebug().m6502().getCondTrapNames(); StringList names = debugger.m6502().getCondTrapNames();
if(myTraps.size() != names.size()) if(myTraps.size() != names.size())
{ {
@ -1691,7 +1692,7 @@ void DebuggerParser::executeTraps(bool read, bool write, const string& command,
myTraps[i]->read == read && myTraps[i]->write == write && myTraps[i]->read == read && myTraps[i]->write == write &&
myTraps[i]->condition == condition) myTraps[i]->condition == condition)
{ {
if(debugger.cpuDebug().m6502().delCondTrap(i)) if(debugger.m6502().delCondTrap(i))
{ {
add = false; add = false;
// @sa666666: please check this: // @sa666666: please check this:
@ -1705,7 +1706,7 @@ void DebuggerParser::executeTraps(bool read, bool write, const string& command,
} }
if(add) if(add)
{ {
uInt32 ret = debugger.cpuDebug().m6502().addCondTrap( uInt32 ret = debugger.m6502().addCondTrap(
YaccParser::getResult(), hasCond ? argStrings[0] : ""); YaccParser::getResult(), hasCond ? argStrings[0] : "");
commandResult << "Added trap " << Base::toString(ret); commandResult << "Added trap " << Base::toString(ret);

View File

@ -23,12 +23,11 @@
#include <set> #include <set>
class Debugger; class Debugger;
class Settings;
class FilesystemNode; class FilesystemNode;
struct Command; struct Command;
#include "bspf.hxx" #include "bspf.hxx"
#include "FrameBuffer.hxx"
#include "Settings.hxx"
class DebuggerParser class DebuggerParser
{ {

View File

@ -19,6 +19,7 @@
#include "System.hxx" #include "System.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"
#include "TIA.hxx" #include "TIA.hxx"
#include "DelayQueueIterator.hxx"
#include "TIADebug.hxx" #include "TIADebug.hxx"
@ -688,6 +689,66 @@ void TIADebug::setENABLOld(bool b)
myTIA.myBall.setENABLOld(b); myTIA.myBall.setENABLOld(b);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeWsync()
{
mySystem.poke(WSYNC, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeRsync()
{
mySystem.poke(RSYNC, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeResP0()
{
mySystem.poke(RESP0, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeResP1()
{
mySystem.poke(RESP1, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeResM0()
{
mySystem.poke(RESM0, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeResM1()
{
mySystem.poke(RESM1, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeResBL()
{
mySystem.poke(RESBL, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeHmove()
{
mySystem.poke(HMOVE, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeHmclr()
{
mySystem.poke(HMCLR, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIADebug::strobeCxclr()
{
mySystem.poke(CXCLR, 0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int TIADebug::frameCount() const int TIADebug::frameCount() const
{ {

View File

@ -19,17 +19,16 @@
#define TIA_DEBUG_HXX #define TIA_DEBUG_HXX
class Debugger; class Debugger;
class TiaDebug;
class TIA; class TIA;
class DelayQueueIterator;
#include "DebuggerSystem.hxx"
#include "DelayQueueIterator.hxx"
#include "bspf.hxx"
// Function type for TIADebug instance methods // Function type for TIADebug instance methods
class TIADebug; class TIADebug;
using TiaMethod = int (TIADebug::*)() const; using TiaMethod = int (TIADebug::*)() const;
#include "DebuggerSystem.hxx"
#include "bspf.hxx"
// Indices for various IntArray in TiaState // Indices for various IntArray in TiaState
enum { enum {
P0, P1, M0, M1, BL P0, P1, M0, M1, BL
@ -144,16 +143,16 @@ class TIADebug : public DebuggerSystem
bool collM0_M1() const { return collision(Cx_M0M1); } bool collM0_M1() const { return collision(Cx_M0M1); }
// TIA strobe registers // TIA strobe registers
void strobeWsync() { mySystem.poke(WSYNC, 0); } void strobeWsync();
void strobeRsync() { mySystem.poke(RSYNC, 0); } void strobeRsync();
void strobeResP0() { mySystem.poke(RESP0, 0); } void strobeResP0();
void strobeResP1() { mySystem.poke(RESP1, 0); } void strobeResP1();
void strobeResM0() { mySystem.poke(RESM0, 0); } void strobeResM0();
void strobeResM1() { mySystem.poke(RESM1, 0); } void strobeResM1();
void strobeResBL() { mySystem.poke(RESBL, 0); } void strobeResBL();
void strobeHmove() { mySystem.poke(HMOVE, 0); } void strobeHmove();
void strobeHmclr() { mySystem.poke(HMCLR, 0); } void strobeHmclr();
void strobeCxclr() { mySystem.poke(CXCLR, 0); } void strobeCxclr();
// Read-only internal TIA state // Read-only internal TIA state
int scanlines() const; int scanlines() const;

View File

@ -22,6 +22,7 @@ class GuiObject;
class ButtonWidget; class ButtonWidget;
#include "Widget.hxx" #include "Widget.hxx"
#include "Console.hxx"
#include "Command.hxx" #include "Command.hxx"

View File

@ -15,8 +15,10 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include "Cart.hxx"
#include "Widget.hxx" #include "Widget.hxx"
#include "Dialog.hxx" #include "Dialog.hxx"
#include "Settings.hxx"
#include "TabWidget.hxx" #include "TabWidget.hxx"
#include "TiaInfoWidget.hxx" #include "TiaInfoWidget.hxx"
#include "TiaOutputWidget.hxx" #include "TiaOutputWidget.hxx"

View File

@ -34,9 +34,12 @@ class TiaZoomWidget;
class CartDebugWidget; class CartDebugWidget;
class CartRamWidget; class CartRamWidget;
namespace GUI {
class MessageBox;
struct Rect;
}
#include "Dialog.hxx" #include "Dialog.hxx"
#include "MessageBox.hxx"
#include "Rect.hxx"
class DebuggerDialog : public Dialog class DebuggerDialog : public Dialog
{ {

View File

@ -16,6 +16,7 @@
//============================================================================ //============================================================================
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Settings.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "Dialog.hxx" #include "Dialog.hxx"
#include "DialogContainer.hxx" #include "DialogContainer.hxx"

View File

@ -17,6 +17,7 @@
#include <sstream> #include <sstream>
#include "Settings.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"
#include "CartDebug.hxx" #include "CartDebug.hxx"
#include "DiStella.hxx" #include "DiStella.hxx"

View File

@ -25,6 +25,7 @@
#include "TiaZoomWidget.hxx" #include "TiaZoomWidget.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"
#include "DebuggerParser.hxx" #include "DebuggerParser.hxx"
#include "PNGLibrary.hxx"
#include "TIADebug.hxx" #include "TIADebug.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "TIA.hxx" #include "TIA.hxx"

View File

@ -19,12 +19,12 @@
#define TIA_OUTPUT_WIDGET_HXX #define TIA_OUTPUT_WIDGET_HXX
class GuiObject; class GuiObject;
class FBSurface; class ContextMenu;
class TiaZoomWidget; class TiaZoomWidget;
class FBSurface;
#include "Widget.hxx" #include "Widget.hxx"
#include "Command.hxx" #include "Command.hxx"
#include "ContextMenu.hxx"
class TiaOutputWidget : public Widget, public CommandSender class TiaOutputWidget : public Widget, public CommandSender
{ {

View File

@ -42,6 +42,7 @@
#include "Switches.hxx" #include "Switches.hxx"
#include "M6532.hxx" #include "M6532.hxx"
#include "MouseControl.hxx" #include "MouseControl.hxx"
#include "PNGLibrary.hxx"
#include "Version.hxx" #include "Version.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"
@ -81,6 +82,11 @@ EventHandler::EventHandler(OSystem& osystem)
myJoyHandler = make_unique<JoystickHandler>(osystem); myJoyHandler = make_unique<JoystickHandler>(osystem);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandler::~EventHandler()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::initialize() void EventHandler::initialize()
{ {

View File

@ -22,12 +22,13 @@
class Console; class Console;
class OSystem; class OSystem;
class MouseControl;
class DialogContainer; class DialogContainer;
class EventMappingWidget; class EventMappingWidget;
#include "Event.hxx" #include "Event.hxx"
#include "Control.hxx"
#include "StellaKeys.hxx" #include "StellaKeys.hxx"
#include "MouseControl.hxx"
#include "Variant.hxx" #include "Variant.hxx"
#include "bspf.hxx" #include "bspf.hxx"
@ -82,7 +83,7 @@ class EventHandler
Create a new event handler object Create a new event handler object
*/ */
EventHandler(OSystem& osystem); EventHandler(OSystem& osystem);
virtual ~EventHandler() = default; virtual ~EventHandler();
// Enumeration representing the different states of operation // Enumeration representing the different states of operation
enum State { enum State {

View File

@ -34,57 +34,9 @@ namespace GUI {
#include "FBSurface.hxx" #include "FBSurface.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "TIAConstants.hxx" #include "TIAConstants.hxx"
#include "FrameBufferConstants.hxx"
#include "bspf.hxx" #include "bspf.hxx"
// Return values for initialization of framebuffer window
enum FBInitStatus {
kSuccess,
kFailComplete,
kFailTooLarge,
kFailNotSupported
};
// Positions for onscreen/overlaid messages
enum MessagePosition {
kTopLeft,
kTopCenter,
kTopRight,
kMiddleLeft,
kMiddleCenter,
kMiddleRight,
kBottomLeft,
kBottomCenter,
kBottomRight
};
// Colors indices to use for the various GUI elements
enum {
kColor = 256,
kBGColor,
kBGColorLo,
kBGColorHi,
kShadowColor,
kTextColor,
kTextColorHi,
kTextColorEm,
kDlgColor,
kWidColor,
kWidFrameColor,
kBtnColor,
kBtnColorHi,
kBtnTextColor,
kBtnTextColorHi,
kCheckColor,
kScrollColor,
kScrollColorHi,
kSliderColor,
kSliderColorHi,
kDbgChangedColor,
kDbgChangedTextColor,
kDbgColorHi,
kNumColors
};
// Contains all relevant info for the dimensions of a video screen // Contains all relevant info for the dimensions of a video screen
// Also takes care of the case when the image should be 'centered' // Also takes care of the case when the image should be 'centered'
// within the given screen: // within the given screen:

View File

@ -0,0 +1,72 @@
//============================================================================
//
// 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-2017 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.
//============================================================================
// FIXME - perhaps add to namespace or something
#ifndef FRAMEBUFFER_CONSTANTS_HXX
#define FRAMEBUFFER_CONSTANTS_HXX
// Return values for initialization of framebuffer window
enum FBInitStatus {
kSuccess,
kFailComplete,
kFailTooLarge,
kFailNotSupported
};
// Positions for onscreen/overlaid messages
enum MessagePosition {
kTopLeft,
kTopCenter,
kTopRight,
kMiddleLeft,
kMiddleCenter,
kMiddleRight,
kBottomLeft,
kBottomCenter,
kBottomRight
};
// Colors indices to use for the various GUI elements
enum {
kColor = 256,
kBGColor,
kBGColorLo,
kBGColorHi,
kShadowColor,
kTextColor,
kTextColorHi,
kTextColorEm,
kDlgColor,
kWidColor,
kWidFrameColor,
kBtnColor,
kBtnColorHi,
kBtnTextColor,
kBtnTextColorHi,
kCheckColor,
kScrollColor,
kScrollColorHi,
kSliderColor,
kSliderColorHi,
kDbgChangedColor,
kDbgChangedTextColor,
kDbgColorHi,
kNumColors
};
#endif // FRAMEBUFFER_CONSTANTS_HXX

View File

@ -41,12 +41,14 @@
#include "MD5.hxx" #include "MD5.hxx"
#include "Cart.hxx" #include "Cart.hxx"
#include "CartDetector.hxx" #include "CartDetector.hxx"
#include "FrameBuffer.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "PropsSet.hxx" #include "PropsSet.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"
#include "Menu.hxx" #include "Menu.hxx"
#include "CommandMenu.hxx" #include "CommandMenu.hxx"
#include "Launcher.hxx" #include "Launcher.hxx"
#include "PNGLibrary.hxx"
#include "Widget.hxx" #include "Widget.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "Random.hxx" #include "Random.hxx"

View File

@ -26,6 +26,8 @@ class Console;
class Debugger; class Debugger;
class Launcher; class Launcher;
class Menu; class Menu;
class FrameBuffer;
class PNGLibrary;
class Properties; class Properties;
class PropertiesSet; class PropertiesSet;
class Random; class Random;
@ -35,10 +37,9 @@ class Sound;
class StateManager; class StateManager;
class VideoDialog; class VideoDialog;
#include "Cart.hxx" #include "EventHandler.hxx"
#include "FSNode.hxx" #include "FSNode.hxx"
#include "FrameBuffer.hxx" #include "FrameBufferConstants.hxx"
#include "PNGLibrary.hxx"
#include "bspf.hxx" #include "bspf.hxx"
struct TimingInfo { struct TimingInfo {

View File

@ -15,6 +15,8 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <climits>
#include "Control.hxx" #include "Control.hxx"
#include "Event.hxx" #include "Event.hxx"
#include "System.hxx" #include "System.hxx"

View File

@ -18,6 +18,7 @@
#include "bspf.hxx" #include "bspf.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Console.hxx"
#include "Joystick.hxx" #include "Joystick.hxx"
#include "Paddles.hxx" #include "Paddles.hxx"
#include "PointingDevice.hxx" #include "PointingDevice.hxx"

View File

@ -18,6 +18,9 @@
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "Props.hxx"
#include "PNGLibrary.hxx"
#include "Rect.hxx"
#include "Widget.hxx" #include "Widget.hxx"
#include "TIAConstants.hxx" #include "TIAConstants.hxx"

View File

@ -18,15 +18,15 @@
#ifndef ROM_INFO_WIDGET_HXX #ifndef ROM_INFO_WIDGET_HXX
#define ROM_INFO_WIDGET_HXX #define ROM_INFO_WIDGET_HXX
#include <fstream> class FBSurface;
class Properties;
namespace GUI {
struct Size;
}
#include "Props.hxx"
#include "Widget.hxx" #include "Widget.hxx"
#include "Command.hxx"
#include "Rect.hxx"
#include "bspf.hxx" #include "bspf.hxx"
class RomInfoWidget : public Widget class RomInfoWidget : public Widget
{ {
public: public: