Skip to content

Commit 31d7e25

Browse files
committed
Collapsed a few simple classes into header files.
1 parent 9ffec29 commit 31d7e25

12 files changed

Lines changed: 32 additions & 189 deletions

src/debugger/gui/AmigaMouseWidget.cxx

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/debugger/gui/AmigaMouseWidget.hxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class AmigaMouseWidget : public PointingDeviceWidget
2626
{
2727
public:
2828
AmigaMouseWidget(GuiObject* boss, const GUI::Font& font, int x, int y,
29-
Controller& controller);
29+
Controller& controller)
30+
: PointingDeviceWidget(boss, font, x, y, controller) { }
3031

3132
~AmigaMouseWidget() override = default;
3233

@@ -35,7 +36,9 @@ class AmigaMouseWidget : public PointingDeviceWidget
3536
0b00, 0b10, 0b11, 0b01
3637
};
3738

38-
uInt8 getGrayCodeTable(int index, int direction) const override;
39+
uInt8 getGrayCodeTable(int index, int /*direction*/) const override {
40+
return myGrayCodeTable[index];
41+
}
3942

4043
// Following constructors and assignment operators not supported
4144
AmigaMouseWidget() = delete;

src/debugger/gui/AtariMouseWidget.cxx

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/debugger/gui/AtariMouseWidget.hxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ class AtariMouseWidget : public PointingDeviceWidget
2626
{
2727
public:
2828
AtariMouseWidget(GuiObject* boss, const GUI::Font& font, int x, int y,
29-
Controller& controller);
29+
Controller& controller)
30+
: PointingDeviceWidget(boss, font, x, y, controller) { }
31+
3032
~AtariMouseWidget() override = default;
3133

3234
private:
3335
static constexpr std::array<uInt8, 4> myGrayCodeTable = {
3436
0b00, 0b01, 0b11, 0b10
3537
};
3638

37-
uInt8 getGrayCodeTable(int index, int direction) const override;
39+
uInt8 getGrayCodeTable(int index, int /*direction*/) const override {
40+
return myGrayCodeTable[index];
41+
}
3842

3943
// Following constructors and assignment operators not supported
4044
AtariMouseWidget() = delete;

src/debugger/gui/AtariVoxWidget.cxx

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/debugger/gui/AtariVoxWidget.hxx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,28 @@
2020

2121
class Controller;
2222

23+
#include "AtariVox.hxx"
2324
#include "FlashWidget.hxx"
2425

2526
class AtariVoxWidget : public FlashWidget
2627
{
2728
public:
2829
AtariVoxWidget(GuiObject* boss, const GUI::Font& font, int x, int y,
29-
Controller& controller, bool embedded = false);
30+
Controller& controller, bool embedded = false)
31+
: FlashWidget(boss, font, x, y, controller) { init(boss, font, x, y, embedded); }
32+
3033
~AtariVoxWidget() override = default;
3134

3235
private:
33-
void eraseCurrent() override;
34-
bool isPageUsed(uInt32 page) override;
36+
void eraseCurrent() override {
37+
auto& avox = static_cast<AtariVox&>(controller());
38+
avox.eraseCurrent();
39+
}
40+
41+
bool isPageUsed(uInt32 page) override {
42+
const auto& avox = static_cast<AtariVox&>(controller());
43+
return avox.isPageUsed(page);
44+
}
3545

3646
// Following constructors and assignment operators not supported
3747
AtariVoxWidget() = delete;

src/debugger/gui/TrakBallWidget.cxx

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/debugger/gui/TrakBallWidget.hxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class TrakBallWidget : public PointingDeviceWidget
2626
{
2727
public:
2828
TrakBallWidget(GuiObject* boss, const GUI::Font& font, int x, int y,
29-
Controller& controller);
29+
Controller& controller)
30+
: PointingDeviceWidget(boss, font, x, y, controller) { }
3031

3132
~TrakBallWidget() override = default;
3233

@@ -35,7 +36,9 @@ class TrakBallWidget : public PointingDeviceWidget
3536
0b00, 0b10, 0b01, 0b11
3637
};
3738

38-
uInt8 getGrayCodeTable(int index, int direction) const override;
39+
uInt8 getGrayCodeTable(int index, int direction) const override {
40+
return myGrayCodeTable[(index & 0b1) + direction * 2];
41+
}
3942

4043
// Following constructors and assignment operators not supported
4144
TrakBallWidget() = delete;

src/debugger/gui/module.mk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
MODULE := src/debugger/gui
22

33
MODULE_OBJS := \
4-
src/debugger/gui/AmigaMouseWidget.o \
5-
src/debugger/gui/AtariMouseWidget.o \
6-
src/debugger/gui/AtariVoxWidget.o \
74
src/debugger/gui/AudioWidget.o \
85
src/debugger/gui/BoosterWidget.o \
96
src/debugger/gui/Cart03E0Widget.o \
@@ -90,8 +87,7 @@ MODULE_OBJS := \
9087
src/debugger/gui/TiaZoomWidget.o \
9188
src/debugger/gui/ToggleBitWidget.o \
9289
src/debugger/gui/TogglePixelWidget.o \
93-
src/debugger/gui/ToggleWidget.o \
94-
src/debugger/gui/TrakBallWidget.o
90+
src/debugger/gui/ToggleWidget.o
9591

9692
MODULE_TEST_OBJS =
9793

src/os/macos/stella.xcodeproj/project.pbxproj

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@
384384
DC5D2C550F117CFD004D1660 /* StellaMediumFont.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC5D2C510F117CFD004D1660 /* StellaMediumFont.hxx */; };
385385
DC5EE7C214F7C165001C628C /* NTSCFilter.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC5EE7C014F7C165001C628C /* NTSCFilter.cxx */; };
386386
DC5EE7C314F7C165001C628C /* NTSCFilter.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC5EE7C114F7C165001C628C /* NTSCFilter.hxx */; };
387-
DC62E6471960E87B007AEF05 /* AtariVoxWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC62E6431960E87B007AEF05 /* AtariVoxWidget.cxx */; };
388387
DC62E6481960E87B007AEF05 /* AtariVoxWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC62E6441960E87B007AEF05 /* AtariVoxWidget.hxx */; };
389388
DC62E6491960E87B007AEF05 /* SaveKeyWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC62E6451960E87B007AEF05 /* SaveKeyWidget.cxx */; };
390389
DC62E64A1960E87B007AEF05 /* SaveKeyWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC62E6461960E87B007AEF05 /* SaveKeyWidget.hxx */; };
@@ -505,15 +504,12 @@
505504
DC932D440F278A5200FEFEFC /* DefProps.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC932D3F0F278A5200FEFEFC /* DefProps.hxx */; };
506505
DC932D450F278A5200FEFEFC /* Serializable.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC932D400F278A5200FEFEFC /* Serializable.hxx */; };
507506
DC932D460F278A5200FEFEFC /* SerialPort.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC932D410F278A5200FEFEFC /* SerialPort.hxx */; };
508-
DC96162C1F817830008A2206 /* AmigaMouseWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC9616221F817830008A2206 /* AmigaMouseWidget.cxx */; };
509507
DC96162D1F817830008A2206 /* AmigaMouseWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC9616231F817830008A2206 /* AmigaMouseWidget.hxx */; };
510-
DC96162E1F817830008A2206 /* AtariMouseWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC9616241F817830008A2206 /* AtariMouseWidget.cxx */; };
511508
DC96162F1F817830008A2206 /* AtariMouseWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC9616251F817830008A2206 /* AtariMouseWidget.hxx */; };
512509
DC9616301F817830008A2206 /* FlashWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC9616261F817830008A2206 /* FlashWidget.cxx */; };
513510
DC9616311F817830008A2206 /* FlashWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC9616271F817830008A2206 /* FlashWidget.hxx */; };
514511
DC9616321F817830008A2206 /* PointingDeviceWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC9616281F817830008A2206 /* PointingDeviceWidget.cxx */; };
515512
DC9616331F817830008A2206 /* PointingDeviceWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC9616291F817830008A2206 /* PointingDeviceWidget.hxx */; };
516-
DC9616341F817830008A2206 /* TrakBallWidget.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC96162A1F817830008A2206 /* TrakBallWidget.cxx */; };
517513
DC9616351F817830008A2206 /* TrakBallWidget.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC96162B1F817830008A2206 /* TrakBallWidget.hxx */; };
518514
DC98F35611F5B56200AA520F /* MessageBox.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC98F35411F5B56200AA520F /* MessageBox.cxx */; };
519515
DC98F35711F5B56200AA520F /* MessageBox.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC98F35511F5B56200AA520F /* MessageBox.hxx */; };
@@ -1271,7 +1267,6 @@
12711267
DC5D2C510F117CFD004D1660 /* StellaMediumFont.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = StellaMediumFont.hxx; sourceTree = "<group>"; };
12721268
DC5EE7C014F7C165001C628C /* NTSCFilter.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NTSCFilter.cxx; sourceTree = "<group>"; };
12731269
DC5EE7C114F7C165001C628C /* NTSCFilter.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = NTSCFilter.hxx; sourceTree = "<group>"; };
1274-
DC62E6431960E87B007AEF05 /* AtariVoxWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtariVoxWidget.cxx; sourceTree = "<group>"; };
12751270
DC62E6441960E87B007AEF05 /* AtariVoxWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AtariVoxWidget.hxx; sourceTree = "<group>"; };
12761271
DC62E6451960E87B007AEF05 /* SaveKeyWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaveKeyWidget.cxx; sourceTree = "<group>"; };
12771272
DC62E6461960E87B007AEF05 /* SaveKeyWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SaveKeyWidget.hxx; sourceTree = "<group>"; };
@@ -1392,15 +1387,12 @@
13921387
DC932D3F0F278A5200FEFEFC /* DefProps.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = DefProps.hxx; sourceTree = "<group>"; };
13931388
DC932D400F278A5200FEFEFC /* Serializable.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Serializable.hxx; sourceTree = "<group>"; };
13941389
DC932D410F278A5200FEFEFC /* SerialPort.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SerialPort.hxx; sourceTree = "<group>"; };
1395-
DC9616221F817830008A2206 /* AmigaMouseWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AmigaMouseWidget.cxx; sourceTree = "<group>"; };
13961390
DC9616231F817830008A2206 /* AmigaMouseWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AmigaMouseWidget.hxx; sourceTree = "<group>"; };
1397-
DC9616241F817830008A2206 /* AtariMouseWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtariMouseWidget.cxx; sourceTree = "<group>"; };
13981391
DC9616251F817830008A2206 /* AtariMouseWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = AtariMouseWidget.hxx; sourceTree = "<group>"; };
13991392
DC9616261F817830008A2206 /* FlashWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlashWidget.cxx; sourceTree = "<group>"; };
14001393
DC9616271F817830008A2206 /* FlashWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = FlashWidget.hxx; sourceTree = "<group>"; };
14011394
DC9616281F817830008A2206 /* PointingDeviceWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointingDeviceWidget.cxx; sourceTree = "<group>"; };
14021395
DC9616291F817830008A2206 /* PointingDeviceWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = PointingDeviceWidget.hxx; sourceTree = "<group>"; };
1403-
DC96162A1F817830008A2206 /* TrakBallWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrakBallWidget.cxx; sourceTree = "<group>"; };
14041396
DC96162B1F817830008A2206 /* TrakBallWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TrakBallWidget.hxx; sourceTree = "<group>"; };
14051397
DC98F35411F5B56200AA520F /* MessageBox.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageBox.cxx; sourceTree = "<group>"; };
14061398
DC98F35511F5B56200AA520F /* MessageBox.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MessageBox.hxx; sourceTree = "<group>"; };
@@ -1825,11 +1817,8 @@
18251817
isa = PBXGroup;
18261818
children = (
18271819
DC9616231F817830008A2206 /* AmigaMouseWidget.hxx */,
1828-
DC9616221F817830008A2206 /* AmigaMouseWidget.cxx */,
18291820
DC9616251F817830008A2206 /* AtariMouseWidget.hxx */,
1830-
DC9616241F817830008A2206 /* AtariMouseWidget.cxx */,
18311821
DC62E6441960E87B007AEF05 /* AtariVoxWidget.hxx */,
1832-
DC62E6431960E87B007AEF05 /* AtariVoxWidget.cxx */,
18331822
2D2331900900B5EF00613B1F /* AudioWidget.hxx */,
18341823
2D23318F0900B5EF00613B1F /* AudioWidget.cxx */,
18351824
DCCF4ACF14B7E6C300814FAB /* BoosterWidget.hxx */,
@@ -2007,7 +1996,6 @@
20071996
2D20FA0108C603EC00A73076 /* ToggleWidget.hxx */,
20081997
2D20FA0008C603EC00A73076 /* ToggleWidget.cxx */,
20091998
DC96162B1F817830008A2206 /* TrakBallWidget.hxx */,
2010-
DC96162A1F817830008A2206 /* TrakBallWidget.cxx */,
20111999
);
20122000
path = gui;
20132001
sourceTree = "<group>";
@@ -3494,7 +3482,6 @@
34943482
DCF3A6FE1DFC75E3008A8AF3 /* TIA.cxx in Sources */,
34953483
2D9174C009BA90380026E9FF /* OSystem.cxx in Sources */,
34963484
DC53B6AE1F3622DA00AA6BFB /* PointingDevice.cxx in Sources */,
3497-
DC96162C1F817830008A2206 /* AmigaMouseWidget.cxx in Sources */,
34983485
2D9174C509BA90380026E9FF /* Font.cxx in Sources */,
34993486
2D9174C609BA90380026E9FF /* Debugger.cxx in Sources */,
35003487
2D9174C709BA90380026E9FF /* DebuggerParser.cxx in Sources */,
@@ -3562,12 +3549,10 @@
35623549
DC47455809C34BFA00EDDA3A /* CheatCodeDialog.cxx in Sources */,
35633550
DC47455A09C34BFA00EDDA3A /* CheatManager.cxx in Sources */,
35643551
DC47455C09C34BFA00EDDA3A /* CheetahCheat.cxx in Sources */,
3565-
DC62E6471960E87B007AEF05 /* AtariVoxWidget.cxx in Sources */,
35663552
DC47455E09C34BFA00EDDA3A /* RamCheat.cxx in Sources */,
35673553
DC3131ED2C540CE2008A1E43 /* CortexM0.cxx in Sources */,
35683554
E0FABEEC20E9948200EB8E28 /* AudioSettings.cxx in Sources */,
35693555
DCD56D380B247D920092F9F8 /* Cart4A50.cxx in Sources */,
3570-
DC96162E1F817830008A2206 /* AtariMouseWidget.cxx in Sources */,
35713556
DC3EE85E1E2C0E6D00905161 /* gzlib.c in Sources */,
35723557
DC8078EA0B4BD697005E9305 /* UIDialog.cxx in Sources */,
35733558
DCEECE560B5E5E540021D754 /* Cart0840.cxx in Sources */,
@@ -3743,7 +3728,6 @@
37433728
DCDE17FC17724E5D00EB1AC6 /* SnapshotDialog.cxx in Sources */,
37443729
DC79F81217A88D9E00288B91 /* Base.cxx in Sources */,
37453730
DCAACAF6188D631500A4D282 /* Cart4KSC.cxx in Sources */,
3746-
DC9616341F817830008A2206 /* TrakBallWidget.cxx in Sources */,
37473731
E07DF4482C0A81ED00E1FB07 /* CartWF8Widget.cxx in Sources */,
37483732
DCAACAF8188D631500A4D282 /* CartBF.cxx in Sources */,
37493733
DCAACAFA188D631500A4D282 /* CartBFSC.cxx in Sources */,

0 commit comments

Comments
 (0)