Skip to content

Commit 3d1f248

Browse files
committed
Move collision settings back to compatibility panel
1 parent 82dfcbe commit 3d1f248

File tree

6 files changed

+144
-154
lines changed

6 files changed

+144
-154
lines changed

GUI/Defaults.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,6 @@ extension Configuration {
10381038
speedBoost = defaults.get(.AMIGA_SPEED_BOOST)
10391039
vsync = defaults.get(.AMIGA_VSYNC) != 0
10401040
runAhead = defaults.get(.AMIGA_RUN_AHEAD)
1041-
clxSprSpr = defaults.get(.DENISE_CLX_SPR_SPR) != 0
1042-
clxSprPlf = defaults.get(.DENISE_CLX_SPR_PLF) != 0
1043-
clxPlfPlf = defaults.get(.DENISE_CLX_PLF_PLF) != 0
10441041
frameSkipping = defaults.get(.DENISE_FRAME_SKIPPING)
10451042
ciaIdleSleep = defaults.get(.CIA_IDLE_SLEEP) != 0
10461043
audioFastPath = defaults.get(.AUD_FASTPATH) != 0
@@ -1060,9 +1057,6 @@ extension Configuration {
10601057
defaults.set(.AMIGA_VSYNC, vsync)
10611058
defaults.set(.AMIGA_SPEED_BOOST, speedBoost)
10621059
defaults.set(.AMIGA_RUN_AHEAD, runAhead)
1063-
defaults.set(.DENISE_CLX_SPR_SPR, clxSprSpr)
1064-
defaults.set(.DENISE_CLX_SPR_PLF, clxSprPlf)
1065-
defaults.set(.DENISE_CLX_PLF_PLF, clxPlfPlf)
10661060
defaults.set(.DENISE_FRAME_SKIPPING, frameSkipping)
10671061
defaults.set(.CIA_IDLE_SLEEP, [0,1], ciaIdleSleep)
10681062
defaults.set(.AUD_FASTPATH, audioFastPath)
@@ -1096,6 +1090,9 @@ extension DefaultsProxy {
10961090
remove(.DC_AUTO_DSKSYNC)
10971091
remove(.DRIVE_MECHANICS, [ 0, 1, 2, 3])
10981092
remove(.KBD_ACCURACY)
1093+
remove(.DENISE_CLX_PLF_PLF)
1094+
remove(.DENISE_CLX_SPR_PLF)
1095+
remove(.DENISE_CLX_SPR_SPR)
10991096
}
11001097
}
11011098

@@ -1116,6 +1113,9 @@ extension Configuration {
11161113
defaults.set(.DC_AUTO_DSKSYNC, autoDskSync)
11171114
defaults.set(.DRIVE_MECHANICS, [0, 1, 2, 3], driveMechanics)
11181115
defaults.set(.KBD_ACCURACY, accurateKeyboard)
1116+
defaults.set(.DENISE_CLX_SPR_SPR, clxSprSpr)
1117+
defaults.set(.DENISE_CLX_SPR_PLF, clxSprPlf)
1118+
defaults.set(.DENISE_CLX_PLF_PLF, clxPlfPlf)
11191119
defaults.save()
11201120

11211121
amiga.resume()
@@ -1136,6 +1136,9 @@ extension Configuration {
11361136
autoDskSync = defaults.get(.DC_AUTO_DSKSYNC) != 0
11371137
driveMechanics = defaults.get(.DRIVE_MECHANICS, 0)
11381138
accurateKeyboard = defaults.get(.KBD_ACCURACY) != 0
1139+
clxSprSpr = defaults.get(.DENISE_CLX_SPR_SPR) != 0
1140+
clxSprPlf = defaults.get(.DENISE_CLX_SPR_PLF) != 0
1141+
clxPlfPlf = defaults.get(.DENISE_CLX_PLF_PLF) != 0
11391142

11401143
amiga.resume()
11411144
}

GUI/Dialogs/Configuration/CompatibilityConf.swift

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ extension ConfigurationController {
3434
// Keyboard
3535
compAccurateKeyboard.state = config.accurateKeyboard ? .on : .off
3636

37+
// Collision detection
38+
compClxSprSpr.state = config.clxSprSpr ? .on : .off
39+
compClxSprPlf.state = config.clxSprPlf ? .on : .off
40+
compClxPlfPlf.state = config.clxPlfPlf ? .on : .off
41+
3742
// Buttons
3843
compPowerButton.isHidden = !bootable
3944
}
@@ -93,6 +98,25 @@ extension ConfigurationController {
9398
config.accurateKeyboard = sender.state == .on
9499
}
95100

101+
//
102+
// Action methods (collision detection)
103+
//
104+
105+
@IBAction func compClxSprSprAction(_ sender: NSButton!) {
106+
107+
config.clxSprSpr = sender.state == .on
108+
}
109+
110+
@IBAction func compClxSprPlfAction(_ sender: NSButton!) {
111+
112+
config.clxSprPlf = sender.state == .on
113+
}
114+
115+
@IBAction func compClxPlfPlfAction(_ sender: NSButton!) {
116+
117+
config.clxPlfPlf = sender.state == .on
118+
}
119+
96120
@IBAction func compPresetAction(_ sender: NSPopUpButton!) {
97121

98122
let defaults = EmulatorProxy.defaults!
@@ -111,7 +135,9 @@ extension ConfigurationController {
111135
case 1:
112136

113137
// Accurate
114-
break
138+
defaults.set(.DENISE_CLX_SPR_PLF, true)
139+
defaults.set(.DENISE_CLX_SPR_SPR, true)
140+
defaults.set(.DENISE_CLX_PLF_PLF, true)
115141

116142
case 2:
117143

GUI/Dialogs/Configuration/ConfigurationController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ class ConfigurationController: DialogController {
182182
@IBOutlet weak var prfRunAhead: NSSlider!
183183
@IBOutlet weak var prfRunAheadInfo: NSTextField!
184184

185-
// Collision detection
186-
@IBOutlet weak var prfClxSprSpr: NSButton!
187-
@IBOutlet weak var prfClxSprPlf: NSButton!
188-
@IBOutlet weak var prfClxPlfPlf: NSButton!
189-
190185
// Boosters
191186
@IBOutlet weak var prfCiaIdleSleep: NSButton!
192187
@IBOutlet weak var prfFrameSkipping: NSButton!
@@ -229,6 +224,11 @@ class ConfigurationController: DialogController {
229224
// Keyboard
230225
@IBOutlet weak var compAccurateKeyboard: NSButton!
231226

227+
// Collision detection
228+
@IBOutlet weak var compClxSprSpr: NSButton!
229+
@IBOutlet weak var compClxSprPlf: NSButton!
230+
@IBOutlet weak var compClxPlfPlf: NSButton!
231+
232232
// Buttons
233233
@IBOutlet weak var compOKButton: NSButton!
234234
@IBOutlet weak var compPowerButton: NSButton!

GUI/Dialogs/Configuration/PerformanceConf.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ extension ConfigurationController {
2828
prfRunAhead.integerValue = runAhead
2929
prfRunAheadInfo.stringValue = "\(runAhead) frame" + (runAhead == 1 ? "" : "s")
3030

31-
// Collision detection
32-
prfClxSprSpr.state = config.clxSprSpr ? .on : .off
33-
prfClxSprPlf.state = config.clxSprPlf ? .on : .off
34-
prfClxPlfPlf.state = config.clxPlfPlf ? .on : .off
35-
3631
// Boosters
3732
prfCiaIdleSleep.state = config.ciaIdleSleep ? .on : .off
3833
prfFrameSkipping.state = config.frameSkipping > 0 ? .on : .off
@@ -80,24 +75,6 @@ extension ConfigurationController {
8075
config.runAhead = sender.integerValue
8176
}
8277

83-
//
84-
// Action methods (collision detection)
85-
//
86-
87-
@IBAction func prfClxSprSprAction(_ sender: NSButton!) {
88-
89-
config.clxSprSpr = sender.state == .on
90-
}
91-
92-
@IBAction func prfClxSprPlfAction(_ sender: NSButton!) {
93-
94-
config.clxSprPlf = sender.state == .on
95-
}
96-
97-
@IBAction func prfClxPlfPlfAction(_ sender: NSButton!) {
98-
99-
config.clxPlfPlf = sender.state == .on
100-
}
10178

10279
//
10380
// Action methods (performance boosters)

0 commit comments

Comments
 (0)