From 6dbf16210bce88270d34cb77c56bcdbb7c93247f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 4 Jul 2016 19:19:07 -0400 Subject: [PATCH] Switched protocol to meaningful name and corrected its omission from the repository. --- OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj | 4 ++-- .../Mac/Clock Signal/ClockSignal-Bridging-Header.h | 2 +- .../Mac/Clock Signal/Documents/MachineDocument.swift | 8 ++++---- OSBindings/Mac/Clock Signal/Machine/CSFastLoading.h | 11 +++++++++++ .../Mac/Clock Signal/Machine/Wrappers/CSElectron.h | 4 ++-- .../Mac/Clock Signal/Machine/Wrappers/CSVic20.h | 4 ++-- 6 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 OSBindings/Mac/Clock Signal/Machine/CSFastLoading.h diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 0d67069b2..b4c059c73 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -684,7 +684,7 @@ 4BB73ECF1B587A6700552FC2 /* Clock Signal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Clock Signal.entitlements"; sourceTree = ""; }; 4BBB142F1CD2CECE00BDB55C /* IntermediateShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntermediateShader.cpp; sourceTree = ""; }; 4BBB14301CD2CECE00BDB55C /* IntermediateShader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = IntermediateShader.hpp; sourceTree = ""; }; - 4BBC34241D2208B100FFC9DF /* CSCommonOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSCommonOptions.h; sourceTree = ""; }; + 4BBC34241D2208B100FFC9DF /* CSFastLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSFastLoading.h; sourceTree = ""; }; 4BBF99081C8FBA6F0075DAFB /* CRTInputBufferBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CRTInputBufferBuilder.cpp; sourceTree = ""; }; 4BBF99091C8FBA6F0075DAFB /* CRTInputBufferBuilder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CRTInputBufferBuilder.hpp; sourceTree = ""; }; 4BBF990A1C8FBA6F0075DAFB /* CRTOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CRTOpenGL.cpp; sourceTree = ""; }; @@ -806,7 +806,7 @@ 4B2A53921D117D36003C6002 /* Machine */ = { isa = PBXGroup; children = ( - 4BBC34241D2208B100FFC9DF /* CSCommonOptions.h */, + 4BBC34241D2208B100FFC9DF /* CSFastLoading.h */, 4B2A53931D117D36003C6002 /* CSKeyboardMachine.h */, 4B2A53941D117D36003C6002 /* CSMachine+Subclassing.h */, 4B2A53951D117D36003C6002 /* CSMachine.h */, diff --git a/OSBindings/Mac/Clock Signal/ClockSignal-Bridging-Header.h b/OSBindings/Mac/Clock Signal/ClockSignal-Bridging-Header.h index 20dce5f51..09487f836 100644 --- a/OSBindings/Mac/Clock Signal/ClockSignal-Bridging-Header.h +++ b/OSBindings/Mac/Clock Signal/ClockSignal-Bridging-Header.h @@ -4,7 +4,7 @@ #import "CSMachine.h" #import "CSKeyboardMachine.h" -#import "CSCommonOptions.h" +#import "CSFastLoading.h" #import "CSAtari2600.h" #import "CSElectron.h" diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index 2098b9f62..82c9f2499 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -184,9 +184,9 @@ class MachineDocument: @IBOutlet var fastLoadingButton: NSButton! @IBAction func setFastLoading(sender: NSButton!) { - if let commonOptionsMachine = machine as? CSCommonOptions { + if let fastLoadingMachine = machine as? CSFastLoading { let useFastLoadingHack = sender.state == NSOnState - commonOptionsMachine.useFastLoadingHack = useFastLoadingHack + fastLoadingMachine.useFastLoadingHack = useFastLoadingHack NSUserDefaults.standardUserDefaults().setBool(useFastLoadingHack, forKey: fastLoadingUserDefaultsKey) } } @@ -197,9 +197,9 @@ class MachineDocument: fastLoadingUserDefaultsKey: true ]) - if let commonOptionsMachine = machine as? CSCommonOptions { + if let fastLoadingMachine = machine as? CSFastLoading { let useFastLoadingHack = standardUserDefaults.boolForKey(self.fastLoadingUserDefaultsKey) - commonOptionsMachine.useFastLoadingHack = useFastLoadingHack + fastLoadingMachine.useFastLoadingHack = useFastLoadingHack self.fastLoadingButton.state = useFastLoadingHack ? NSOnState : NSOffState } } diff --git a/OSBindings/Mac/Clock Signal/Machine/CSFastLoading.h b/OSBindings/Mac/Clock Signal/Machine/CSFastLoading.h new file mode 100644 index 000000000..3c41389a0 --- /dev/null +++ b/OSBindings/Mac/Clock Signal/Machine/CSFastLoading.h @@ -0,0 +1,11 @@ +// +// CSFastLoading.h +// Clock Signal +// +// Created by Thomas Harte on 05/06/2016. +// Copyright © 2016 Thomas Harte. All rights reserved. +// + +@protocol CSFastLoading +@property (nonatomic, assign) BOOL useFastLoadingHack; +@end diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSElectron.h b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSElectron.h index 0d911dccb..4d23a3536 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSElectron.h +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSElectron.h @@ -8,9 +8,9 @@ #import "CSMachine.h" #import "CSKeyboardMachine.h" -#import "CSCommonOptions.h" +#import "CSFastLoading.h" -@interface CSElectron : CSMachine +@interface CSElectron : CSMachine - (void)setOSROM:(nonnull NSData *)rom; - (void)setBASICROM:(nonnull NSData *)rom; diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h index 9aa0a638a..ef04a1f78 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSVic20.h @@ -8,9 +8,9 @@ #import "CSMachine.h" #import "CSKeyboardMachine.h" -#import "CSCommonOptions.h" +#import "CSFastLoading.h" -@interface CSVic20 : CSMachine +@interface CSVic20 : CSMachine - (void)setKernelROM:(nonnull NSData *)rom; - (void)setBASICROM:(nonnull NSData *)rom;