1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Switched protocol to meaningful name and corrected its omission from the repository.

This commit is contained in:
Thomas Harte 2016-07-04 19:19:07 -04:00
parent 82b0bc9b58
commit 6dbf16210b
6 changed files with 22 additions and 11 deletions

View File

@ -684,7 +684,7 @@
4BB73ECF1B587A6700552FC2 /* Clock Signal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Clock Signal.entitlements"; sourceTree = "<group>"; };
4BBB142F1CD2CECE00BDB55C /* IntermediateShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntermediateShader.cpp; sourceTree = "<group>"; };
4BBB14301CD2CECE00BDB55C /* IntermediateShader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = IntermediateShader.hpp; sourceTree = "<group>"; };
4BBC34241D2208B100FFC9DF /* CSCommonOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSCommonOptions.h; sourceTree = "<group>"; };
4BBC34241D2208B100FFC9DF /* CSFastLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSFastLoading.h; sourceTree = "<group>"; };
4BBF99081C8FBA6F0075DAFB /* CRTInputBufferBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CRTInputBufferBuilder.cpp; sourceTree = "<group>"; };
4BBF99091C8FBA6F0075DAFB /* CRTInputBufferBuilder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CRTInputBufferBuilder.hpp; sourceTree = "<group>"; };
4BBF990A1C8FBA6F0075DAFB /* CRTOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CRTOpenGL.cpp; sourceTree = "<group>"; };
@ -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 */,

View File

@ -4,7 +4,7 @@
#import "CSMachine.h"
#import "CSKeyboardMachine.h"
#import "CSCommonOptions.h"
#import "CSFastLoading.h"
#import "CSAtari2600.h"
#import "CSElectron.h"

View File

@ -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
}
}

View File

@ -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 <NSObject>
@property (nonatomic, assign) BOOL useFastLoadingHack;
@end

View File

@ -8,9 +8,9 @@
#import "CSMachine.h"
#import "CSKeyboardMachine.h"
#import "CSCommonOptions.h"
#import "CSFastLoading.h"
@interface CSElectron : CSMachine <CSKeyboardMachine, CSCommonOptions>
@interface CSElectron : CSMachine <CSKeyboardMachine, CSFastLoading>
- (void)setOSROM:(nonnull NSData *)rom;
- (void)setBASICROM:(nonnull NSData *)rom;

View File

@ -8,9 +8,9 @@
#import "CSMachine.h"
#import "CSKeyboardMachine.h"
#import "CSCommonOptions.h"
#import "CSFastLoading.h"
@interface CSVic20 : CSMachine <CSKeyboardMachine, CSCommonOptions>
@interface CSVic20 : CSMachine <CSKeyboardMachine, CSFastLoading>
- (void)setKernelROM:(nonnull NSData *)rom;
- (void)setBASICROM:(nonnull NSData *)rom;