Changing a few Objective C classes to have their ivars hidden.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87167 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\MaddTheSane_cp 2013-09-13 21:31:56 +00:00
parent 56d5b48198
commit de50d760fd
26 changed files with 785 additions and 1134 deletions

View File

@ -8,16 +8,13 @@
@class PcsxrHexadecimalFormatter;
@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDelegate>
{
IBOutlet NSTableView *cheatView;
IBOutlet NSWindow *editCheatWindow;
IBOutlet NSTableView *editCheatView;
IBOutlet PcsxrHexadecimalFormatter *addressFormatter;
IBOutlet PcsxrHexadecimalFormatter *valueFormatter;
NSMutableArray *tempCheatCodes;
NSMutableArray *cheats;
}
@property (weak) IBOutlet NSTableView *cheatView;
@property (weak) IBOutlet NSWindow *editCheatWindow;
@property (weak) IBOutlet NSTableView *editCheatView;
@property (weak) IBOutlet PcsxrHexadecimalFormatter *addressFormatter;
@property (weak) IBOutlet PcsxrHexadecimalFormatter *valueFormatter;
@property (readwrite, strong) NSMutableArray *tempCheatCodes;
@property (readwrite, strong) NSMutableArray *cheats;

View File

@ -14,10 +14,6 @@
#define kCheatsName @"cheats"
@interface PcsxrCheatTempObject : NSObject <NSCopying>
{
uint32_t address;
uint16_t value;
}
@property (readwrite) uint32_t address;
@property (readwrite, weak) NSNumber* addressNS;
@property (readwrite) uint16_t value;
@ -28,11 +24,6 @@
@end
@interface PcsxrCheatTemp : NSObject
{
NSMutableArray *cheatValues;
NSString *cheatName;
BOOL enabled;
}
@property (readwrite, strong) NSMutableArray *cheatValues;
@property (readwrite, strong) NSString *cheatName;
@property (readwrite, getter = isEnabled) BOOL enabled;
@ -141,8 +132,11 @@
@end
@implementation CheatController
@synthesize tempCheatCodes;
@synthesize cheats;
@synthesize addressFormatter;
@synthesize cheatView;
@synthesize editCheatView;
@synthesize editCheatWindow;
@synthesize valueFormatter;
- (NSString *)windowNibName
{
@ -226,7 +220,7 @@
[saveDlg setPrompt:NSLocalizedString(@"Save Cheats", nil)];
if ([saveDlg runModal] == NSFileHandlingPanelOKButton) {
NSURL *url = [saveDlg URL];
NSString *saveString = [cheats componentsJoinedByString:@"\n"];
NSString *saveString = [self.cheats componentsJoinedByString:@"\n"];
[saveString writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:NULL];
}
}
@ -255,22 +249,23 @@
NSIndexSet *toRemoveIndex = [editCheatView selectedRowIndexes];
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kTempCheatCodesName];
[tempCheatCodes removeObjectsAtIndexes:toRemoveIndex];
[self.tempCheatCodes removeObjectsAtIndexes:toRemoveIndex];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kTempCheatCodesName];
}
- (IBAction)addCheatValue:(id)sender
{
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[tempCheatCodes count]] forKey:kTempCheatCodesName];
[tempCheatCodes addObject:[[PcsxrCheatTempObject alloc] init]];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[tempCheatCodes count] - 1] forKey:kTempCheatCodesName];
NSIndexSet *newSet = [NSIndexSet indexSetWithIndex:[self.tempCheatCodes count]];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kTempCheatCodesName];
[self.tempCheatCodes addObject:[[PcsxrCheatTempObject alloc] init]];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kTempCheatCodesName];
}
- (void)reloadCheats
{
NSFileManager *manager = [NSFileManager defaultManager];
NSURL *tmpURL = [[manager URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:[[NSBundle mainBundle] bundleURL] create:YES error:nil] URLByAppendingPathComponent:@"temp.cht" isDirectory:NO];
NSString *tmpStr = [cheats componentsJoinedByString:@"\n"];
NSString *tmpStr = [self.cheats componentsJoinedByString:@"\n"];
[tmpStr writeToURL:tmpURL atomically:NO encoding:NSUTF8StringEncoding error:NULL];
LoadCheats([[tmpURL path] fileSystemRepresentation]);
[manager removeItemAtURL:tmpURL error:NULL];
@ -279,9 +274,9 @@
- (void)editCheatCodeSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
if (returnCode == NSOKButton) {
PcsxrCheatTemp *tmpCheat = cheats[[cheatView selectedRow]];
if (![tmpCheat.cheatValues isEqualToArray:tempCheatCodes]) {
tmpCheat.cheatValues = tempCheatCodes;
PcsxrCheatTemp *tmpCheat = (self.cheats)[[cheatView selectedRow]];
if (![tmpCheat.cheatValues isEqualToArray:self.tempCheatCodes]) {
tmpCheat.cheatValues = self.tempCheatCodes;
[self setDocumentEdited:YES];
}
}
@ -295,7 +290,7 @@
NSBeep();
return;
}
NSMutableArray *tmpArray = [cheats[[cheatView selectedRow]] cheatValues];
NSMutableArray *tmpArray = [(self.cheats)[[cheatView selectedRow]] cheatValues];
NSMutableArray *newCheats = [[NSMutableArray alloc] initWithArray:tmpArray copyItems:YES];
self.tempCheatCodes = newCheats;
[NSApp beginSheet:editCheatWindow modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(editCheatCodeSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
@ -303,14 +298,15 @@
- (IBAction)addCheat:(id)sender
{
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[cheats count]] forKey:kCheatsName];
NSIndexSet *newSet = [NSIndexSet indexSetWithIndex:[self.cheats count]];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kCheatsName];
PcsxrCheatTemp *tmpCheat = [[PcsxrCheatTemp alloc] init];
tmpCheat.cheatName = NSLocalizedString(@"New Cheat", @"New Cheat Name" );
PcsxrCheatTempObject *tmpObj = [[PcsxrCheatTempObject alloc] initWithAddress:0x10000000 value:0];
NSMutableArray *tmpArray = [NSMutableArray arrayWithObject:tmpObj];
tmpCheat.cheatValues = tmpArray;
[cheats addObject:tmpCheat];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:[cheats count] - 1] forKey:kCheatsName];
[self.cheats addObject:tmpCheat];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kCheatsName];
[self setDocumentEdited:YES];
}
@ -363,7 +359,7 @@
NSIndexSet *toRemoveIndex = [cheatView selectedRowIndexes];
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kCheatsName];
[cheats removeObjectsAtIndexes:toRemoveIndex];
[self.cheats removeObjectsAtIndexes:toRemoveIndex];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kCheatsName];
[self setDocumentEdited:YES];
}

View File

@ -20,34 +20,32 @@ extern NSString *const memCardChangeNumberKey;
IBOutlet PluginController *sio1Plugin;
IBOutlet PcsxrMemCardController *memCardEdit;
IBOutlet id noXaAudioCell;
IBOutlet id sioIrqAlwaysCell;
IBOutlet id bwMdecCell;
IBOutlet id autoVTypeCell;
IBOutlet id vTypePALCell;
IBOutlet id noCDAudioCell;
IBOutlet id usesHleCell;
IBOutlet id usesDynarecCell;
IBOutlet id consoleOutputCell;
IBOutlet id spuIrqAlwaysCell;
IBOutlet id rCountFixCell;
IBOutlet id vSyncWAFixCell;
IBOutlet id noFastBootCell;
IBOutlet id enableNetPlayCell;
IBOutlet id widescreen;
// Hotkeys
IBOutlet HotkeyController *hkController;
IBOutlet NSTabViewItem *hkTab;
NSMutableDictionary *checkBoxDefaults;
IBOutlet NSTabViewItem *hkTab;
}
@property (weak) IBOutlet NSButtonCell *noXaAudioCell;
@property (weak) IBOutlet NSButtonCell *sioIrqAlwaysCell;
@property (weak) IBOutlet NSButtonCell *bwMdecCell;
@property (weak) IBOutlet NSButtonCell *autoVTypeCell;
@property (weak) IBOutlet NSPopUpButton *vTypePALCell;
@property (weak) IBOutlet NSButtonCell *noCDAudioCell;
@property (weak) IBOutlet NSButtonCell *usesHleCell;
@property (weak) IBOutlet NSButtonCell *usesDynarecCell;
@property (weak) IBOutlet NSButtonCell *consoleOutputCell;
@property (weak) IBOutlet NSButtonCell *spuIrqAlwaysCell;
@property (weak) IBOutlet NSButtonCell *rCountFixCell;
@property (weak) IBOutlet NSButtonCell *vSyncWAFixCell;
@property (weak) IBOutlet NSButtonCell *noFastBootCell;
@property (weak) IBOutlet NSButtonCell *enableNetPlayCell;
@property (weak) IBOutlet NSButtonCell *widescreen;
- (IBAction)setCheckbox:(id)sender;
- (IBAction)setCheckboxInverse:(id)sender;
- (IBAction)setVideoType:(id)sender;
- (NSString *)keyForSender:(id)sender;
+ (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile;
+ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL;

View File

@ -10,7 +10,28 @@
NSString *const memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
@interface ConfigurationController ()
@property (strong) NSMutableDictionary *checkBoxDefaults;
- (NSString *)keyForSender:(id)sender;
@end
@implementation ConfigurationController
@synthesize autoVTypeCell;
@synthesize bwMdecCell;
@synthesize checkBoxDefaults = _checkBoxDefaults;
@synthesize consoleOutputCell;
@synthesize enableNetPlayCell;
@synthesize noCDAudioCell;
@synthesize noFastBootCell;
@synthesize noXaAudioCell;
@synthesize rCountFixCell;
@synthesize sioIrqAlwaysCell;
@synthesize spuIrqAlwaysCell;
@synthesize usesDynarecCell;
@synthesize usesHleCell;
@synthesize vSyncWAFixCell;
@synthesize vTypePALCell;
@synthesize widescreen;
+ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL;
{
@ -119,12 +140,13 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
- (IBAction)setVideoType:(id)sender
{
NSInteger tag = [[sender selectedItem] tag];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if (3 == tag) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"AutoDetectVideoType"];
[defaults setBool:YES forKey:@"AutoDetectVideoType"];
} else if (1 == tag || 2 == tag) {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"AutoDetectVideoType"];
[[NSUserDefaults standardUserDefaults] setBool:tag==2 forKey:@"VideoTypePAL"];
[defaults setBool:NO forKey:@"AutoDetectVideoType"];
[defaults setBool:tag==2 forKey:@"VideoTypePAL"];
} else {
return;
}
@ -147,30 +169,30 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
[[self window] center];
// setup checkboxes
checkBoxDefaults = [[NSMutableDictionary alloc] init];
self.checkBoxDefaults = [[NSMutableDictionary alloc] init];
// check that the outlets are active before adding them
if (noXaAudioCell) checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell;
if (enableNetPlayCell) checkBoxDefaults[@"NetPlay"] = enableNetPlayCell;
if (sioIrqAlwaysCell) checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell;
if (bwMdecCell) checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell;
if (autoVTypeCell) checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell;
if (vTypePALCell) checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell;
if (noCDAudioCell) checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell;
if (usesHleCell) checkBoxDefaults[@"UseHLE"] = usesHleCell;
if (usesDynarecCell) checkBoxDefaults[@"NoDynarec"] = usesDynarecCell;
if (consoleOutputCell) checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell;
if (spuIrqAlwaysCell) checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell;
if (rCountFixCell) checkBoxDefaults[@"RootCounterFix"] = rCountFixCell;
if (vSyncWAFixCell) checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell;
if (noFastBootCell) checkBoxDefaults[@"NoFastBoot"] = noFastBootCell;
if (widescreen) checkBoxDefaults[@"Widescreen"] = widescreen;
if (noXaAudioCell) _checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell;
if (enableNetPlayCell) _checkBoxDefaults[@"NetPlay"] = enableNetPlayCell;
if (sioIrqAlwaysCell) _checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell;
if (bwMdecCell) _checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell;
if (autoVTypeCell) _checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell;
if (vTypePALCell) _checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell;
if (noCDAudioCell) _checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell;
if (usesHleCell) _checkBoxDefaults[@"UseHLE"] = usesHleCell;
if (usesDynarecCell) _checkBoxDefaults[@"NoDynarec"] = usesDynarecCell;
if (consoleOutputCell) _checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell;
if (spuIrqAlwaysCell) _checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell;
if (rCountFixCell) _checkBoxDefaults[@"RootCounterFix"] = rCountFixCell;
if (vSyncWAFixCell) _checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell;
if (noFastBootCell) _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell;
if (widescreen) _checkBoxDefaults[@"Widescreen"] = widescreen;
// make the visuals match the defaults
for (NSString* key in checkBoxDefaults) {
for (NSString* key in _checkBoxDefaults) {
if ([defaults integerForKey:key]) {
[checkBoxDefaults[key] setNextState];
[_checkBoxDefaults[key] setNextState];
}
}
@ -214,8 +236,8 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
- (NSString *)keyForSender:(id)sender
{
for (NSString *key in checkBoxDefaults) {
id object = checkBoxDefaults[key];
for (NSString *key in [self.checkBoxDefaults keyEnumerator]) {
id object = (self.checkBoxDefaults)[key];
if ([object isEqual:sender])
return key;
}

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">12E55</string>
<string key="IBDocument.SystemVersion">12F37</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
@ -51,63 +51,6 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="665473807">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{14, 13}, {90, 34}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="678958260"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="300791902">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<object class="NSFont" key="NSSupport" id="867415120">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1558</int>
</object>
<reference key="NSControlView" ref="665473807"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">1</int>
<object class="NSFont" key="NSAlternateImage" id="265803471">
<string key="NSName">Helvetica</string>
<double key="NSSize">13</double>
<int key="NSfFlags">16</int>
</object>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="678958260">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{222, 13}, {90, 34}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="128155738"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="492161327">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Slot 1</string>
<reference key="NSSupport" ref="867415120"/>
<reference key="NSControlView" ref="678958260"/>
<int key="NSButtonFlags">-2035924992</int>
<int key="NSButtonFlags2">1</int>
<reference key="NSAlternateImage" ref="265803471"/>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSImageView" id="762837022">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">268</int>
@ -190,7 +133,7 @@
<string key="NSFrame">{{89, 44}, {310, 34}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="665473807"/>
<reference key="NSNextKeyView" ref="174345602"/>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="878757412">
@ -219,14 +162,14 @@
<string key="NSFrame">{{89, 86}, {310, 17}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="399829104"/>
<reference key="NSNextKeyView" ref="592097419"/>
<string key="NSReuseIdentifierKey">_NS:3944</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="745195555">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Label</string>
<object class="NSFont" key="NSSupport">
<object class="NSFont" key="NSSupport" id="1019985772">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
@ -238,23 +181,25 @@
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="128155738">
<object class="NSButton" id="536694819">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{312, 13}, {90, 34}}</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{326, 13}, {76, 32}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSTag">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="911160075">
<object class="NSButtonCell" key="NSCell" id="451339932">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Slot 2</string>
<reference key="NSSupport" ref="867415120"/>
<reference key="NSControlView" ref="128155738"/>
<int key="NSButtonFlags">-2035924992</int>
<int key="NSButtonFlags2">1</int>
<reference key="NSAlternateImage" ref="265803471"/>
<reference key="NSSupport" ref="1019985772"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="536694819"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
@ -262,6 +207,57 @@
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="174345602">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{250, 13}, {76, 32}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="536694819"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="803063390">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Slot 1</string>
<reference key="NSSupport" ref="1019985772"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="174345602"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="592097419">
<reference key="NSNextResponder" ref="568628114"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{14, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="568628114"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="399829104"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="471405962">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="1019985772"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="592097419"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</array>
<string key="NSFrameSize">{416, 148}</string>
<reference key="NSSuperview"/>
@ -289,22 +285,6 @@
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setMemCard:</string>
<reference key="source" ref="512844837"/>
<reference key="destination" ref="678958260"/>
</object>
<int key="connectionID">100039</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setMemCard:</string>
<reference key="source" ref="512844837"/>
<reference key="destination" ref="128155738"/>
</object>
<int key="connectionID">100040</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">cardPath</string>
@ -313,14 +293,6 @@
</object>
<int key="connectionID">100042</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setMemCard:</string>
<reference key="source" ref="512844837"/>
<reference key="destination" ref="665473807"/>
</object>
<int key="connectionID">100044</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
@ -329,30 +301,6 @@
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
<reference key="source" ref="665473807"/>
<reference key="destination" ref="678958260"/>
</object>
<int key="connectionID">100047</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
<reference key="source" ref="678958260"/>
<reference key="destination" ref="128155738"/>
</object>
<int key="connectionID">100046</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
<reference key="source" ref="128155738"/>
<reference key="destination" ref="665473807"/>
</object>
<int key="connectionID">100038</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@ -388,27 +336,11 @@
<reference key="object" ref="568628114"/>
<array class="NSMutableArray" key="children">
<reference ref="762837022"/>
<object class="IBNSLayoutConstraint" id="837194237">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="128155738"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="746271169">
<reference key="firstItem" ref="128155738"/>
<reference key="firstItem" ref="536694819"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="678958260"/>
<reference key="secondItem" ref="174345602"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
@ -420,43 +352,11 @@
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="160364154">
<reference key="firstItem" ref="128155738"/>
<int key="firstAttribute">3</int>
<int key="relation">0</int>
<reference key="secondItem" ref="678958260"/>
<int key="secondAttribute">3</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
</object>
<object class="IBNSLayoutConstraint" id="779027697">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="128155738"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="197686230">
<object class="IBNSLayoutConstraint" id="837194237">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="678958260"/>
<reference key="secondItem" ref="536694819"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
@ -468,21 +368,37 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="368544597">
<reference key="firstItem" ref="678958260"/>
<int key="firstAttribute">3</int>
<object class="IBNSLayoutConstraint" id="779027697">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="665473807"/>
<int key="secondAttribute">3</int>
<reference key="secondItem" ref="536694819"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="738562603">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="174345602"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="523424939">
<reference key="firstItem" ref="399829104"/>
@ -532,12 +448,12 @@
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="958055674">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">4</int>
<object class="IBNSLayoutConstraint" id="1006935917">
<reference key="firstItem" ref="592097419"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="665473807"/>
<int key="secondAttribute">4</int>
<reference key="secondItem" ref="568628114"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
@ -548,11 +464,11 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="818172259">
<reference key="firstItem" ref="665473807"/>
<int key="firstAttribute">3</int>
<object class="IBNSLayoutConstraint" id="609538770">
<reference key="firstItem" ref="568628114"/>
<int key="firstAttribute">4</int>
<int key="relation">0</int>
<reference key="secondItem" ref="762837022"/>
<reference key="secondItem" ref="592097419"/>
<int key="secondAttribute">4</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
@ -560,22 +476,6 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="1006935917">
<reference key="firstItem" ref="665473807"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="568628114"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
@ -676,6 +576,22 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="260903618">
<reference key="firstItem" ref="762837022"/>
<int key="firstAttribute">3</int>
<int key="relation">0</int>
<reference key="secondItem" ref="568628114"/>
<int key="secondAttribute">3</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">21</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="568628114"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="1046328096">
<reference key="firstItem" ref="762837022"/>
<int key="firstAttribute">5</int>
@ -695,9 +611,9 @@
<reference ref="540719925"/>
<reference ref="141278915"/>
<reference ref="399829104"/>
<reference ref="665473807"/>
<reference ref="128155738"/>
<reference ref="678958260"/>
<reference ref="536694819"/>
<reference ref="174345602"/>
<reference ref="592097419"/>
</array>
<reference key="parent" ref="275939982"/>
</object>
@ -707,72 +623,6 @@
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">100021</int>
<reference key="object" ref="665473807"/>
<array class="NSMutableArray" key="children">
<reference ref="300791902"/>
<object class="IBNSLayoutConstraint" id="373690341">
<reference key="firstItem" ref="665473807"/>
<int key="firstAttribute">8</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">23</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="665473807"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
<object class="IBNSLayoutConstraint" id="137120130">
<reference key="firstItem" ref="665473807"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">78</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="665473807"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="568628114"/>
<string key="objectName">Cancel Button</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">100022</int>
<reference key="object" ref="678958260"/>
<array class="NSMutableArray" key="children">
<reference ref="492161327"/>
<object class="IBNSLayoutConstraint" id="178654933">
<reference key="firstItem" ref="678958260"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">78</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="678958260"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="568628114"/>
<string key="objectName">Slot 1 Button</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">100023</int>
<reference key="object" ref="762837022"/>
@ -860,16 +710,6 @@
<reference key="object" ref="1016542061"/>
<reference key="parent" ref="762837022"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100031</int>
<reference key="object" ref="492161327"/>
<reference key="parent" ref="678958260"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100032</int>
<reference key="object" ref="300791902"/>
<reference key="parent" ref="665473807"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100034</int>
<reference key="object" ref="141278915"/>
@ -883,41 +723,6 @@
<reference key="object" ref="745195555"/>
<reference key="parent" ref="141278915"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100036</int>
<reference key="object" ref="128155738"/>
<array class="NSMutableArray" key="children">
<reference ref="911160075"/>
<object class="IBNSLayoutConstraint" id="763887153">
<reference key="firstItem" ref="128155738"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">78</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="128155738"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="568628114"/>
<string key="objectName">Slot 2 Button</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">100037</int>
<reference key="object" ref="911160075"/>
<reference key="parent" ref="128155738"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100050</int>
<reference key="object" ref="178654933"/>
<reference key="parent" ref="678958260"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100056</int>
<reference key="object" ref="1046328096"/>
@ -933,11 +738,6 @@
<reference key="object" ref="22767444"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100069</int>
<reference key="object" ref="763887153"/>
<reference key="parent" ref="128155738"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100071</int>
<reference key="object" ref="815863359"/>
@ -948,16 +748,6 @@
<reference key="object" ref="245183837"/>
<reference key="parent" ref="399829104"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100073</int>
<reference key="object" ref="137120130"/>
<reference key="parent" ref="665473807"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100081</int>
<reference key="object" ref="1006935917"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100082</int>
<reference key="object" ref="384705128"/>
@ -999,49 +789,78 @@
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100110</int>
<reference key="object" ref="818172259"/>
<int key="objectID">100125</int>
<reference key="object" ref="260903618"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100111</int>
<reference key="object" ref="368544597"/>
<int key="objectID">100126</int>
<reference key="object" ref="536694819"/>
<array class="NSMutableArray" key="children">
<reference ref="451339932"/>
</array>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100117</int>
<int key="objectID">100127</int>
<reference key="object" ref="451339932"/>
<reference key="parent" ref="536694819"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100128</int>
<reference key="object" ref="779027697"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100118</int>
<reference key="object" ref="160364154"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100119</int>
<reference key="object" ref="746271169"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100120</int>
<reference key="object" ref="958055674"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100121</int>
<reference key="object" ref="197686230"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100122</int>
<int key="objectID">100129</int>
<reference key="object" ref="837194237"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100123</int>
<reference key="object" ref="373690341"/>
<reference key="parent" ref="665473807"/>
<int key="objectID">100130</int>
<reference key="object" ref="174345602"/>
<array class="NSMutableArray" key="children">
<reference ref="803063390"/>
</array>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100131</int>
<reference key="object" ref="803063390"/>
<reference key="parent" ref="174345602"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100132</int>
<reference key="object" ref="738562603"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100133</int>
<reference key="object" ref="746271169"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100134</int>
<reference key="object" ref="592097419"/>
<array class="NSMutableArray" key="children">
<reference ref="471405962"/>
</array>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100135</int>
<reference key="object" ref="471405962"/>
<reference key="parent" ref="592097419"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100136</int>
<reference key="object" ref="609538770"/>
<reference key="parent" ref="568628114"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">100137</int>
<reference key="object" ref="1006935917"/>
<reference key="parent" ref="568628114"/>
</object>
</array>
</object>
@ -1049,17 +868,6 @@
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<array key="100021.IBNSViewMetadataConstraints">
<reference ref="137120130"/>
<reference ref="373690341"/>
</array>
<boolean value="NO" key="100021.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100021.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<array class="NSMutableArray" key="100022.IBNSViewMetadataConstraints">
<reference ref="178654933"/>
</array>
<boolean value="NO" key="100022.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100022.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<array key="100023.IBNSViewMetadataConstraints">
<reference ref="815863359"/>
<reference ref="369230169"/>
@ -1076,26 +884,14 @@
<string key="100028.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100029.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100030.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100031.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100032.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="100034.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100034.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100035.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<array class="NSMutableArray" key="100036.IBNSViewMetadataConstraints">
<reference ref="763887153"/>
</array>
<boolean value="NO" key="100036.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100036.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100037.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100050.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100056.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100061.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100062.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100069.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100071.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100072.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100073.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100081.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100082.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100086.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100092.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -1104,37 +900,42 @@
<string key="100096.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100097.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100098.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100110.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100111.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100117.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100118.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100119.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100120.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100121.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100122.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100123.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="100126.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100127.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100128.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="100130.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100132.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100133.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="100134.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="100134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100135.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="100137.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="5.IBWindowTemplateEditedContentRect">{{133, 170}, {507, 413}}</string>
<array class="NSMutableArray" key="6.IBNSViewMetadataConstraints">
<array key="6.IBNSViewMetadataConstraints">
<reference ref="1046328096"/>
<reference ref="260903618"/>
<reference ref="22767444"/>
<reference ref="384705128"/>
<reference ref="407674996"/>
<reference ref="968404520"/>
<reference ref="1013055263"/>
<reference ref="714419246"/>
<reference ref="609538770"/>
<reference ref="1006935917"/>
<reference ref="818172259"/>
<reference ref="958055674"/>
<reference ref="321560929"/>
<reference ref="994414560"/>
<reference ref="523424939"/>
<reference ref="368544597"/>
<reference ref="197686230"/>
<reference ref="738562603"/>
<reference ref="779027697"/>
<reference ref="160364154"/>
<reference ref="746271169"/>
<reference ref="837194237"/>
<reference ref="746271169"/>
</array>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
@ -1142,7 +943,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">100123</int>
<int key="maxID">100137</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">

View File

@ -6,22 +6,16 @@
#import <Cocoa/Cocoa.h>
@interface HotkeyController : NSView
{
NSButton *lastConfigButton;
NSInteger configInput;
NSMutableDictionary *hotkeysList;
NSDictionary *keyNameTable;
NSMutableDictionary *hotkeyOutlets;
IBOutlet NSTextField *FastForward;
IBOutlet NSTextField *SaveState;
IBOutlet NSTextField *LoadState;
IBOutlet NSTextField *NextState;
IBOutlet NSTextField *PrevState;
IBOutlet NSTextField *FrameLimit;
}
@property (assign) NSInteger configInput;
@property (weak) IBOutlet NSTextField *FastForward;
@property (weak) IBOutlet NSTextField *SaveState;
@property (weak) IBOutlet NSTextField *LoadState;
@property (weak) IBOutlet NSTextField *NextState;
@property (weak) IBOutlet NSTextField *PrevState;
@property (weak) IBOutlet NSTextField *FrameLimit;
@property NSInteger configInput;
- (void) initialize;
- (BOOL) handleMouseDown:(NSEvent *)mouseEvent;

View File

@ -11,17 +11,29 @@
#define INPUT_HOLD_TIME 0.1
@interface HotkeyController ()
@property (strong) NSButton *lastConfigButton;
@property (strong) NSMutableDictionary *hotkeysList;
@property (strong) NSDictionary *keyNameTable;
@property (strong) NSMutableDictionary *hotkeyOutlets;
@end
@implementation HotkeyController
@synthesize configInput;
@synthesize FastForward;
@synthesize FrameLimit;
@synthesize LoadState;
@synthesize NextState;
@synthesize PrevState;
@synthesize SaveState;
- (void)initialize
{
lastConfigButton = nil;
configInput = 0;
hotkeysList = [[NSMutableDictionary alloc] initWithCapacity:16];
keyNameTable = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"KeyNames" ofType:@"plist"]];
hotkeyOutlets = [[NSMutableDictionary alloc] initWithCapacity:8];
self.lastConfigButton = nil;
self.configInput = 0;
self.hotkeysList = [[NSMutableDictionary alloc] initWithCapacity:16];
self.keyNameTable = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"KeyNames" ofType:@"plist"]];
self.hotkeyOutlets = [[NSMutableDictionary alloc] initWithCapacity:8];
[self mapOutletToIdentifier:FastForward forIdentifier:@"FastForward"];
[self mapOutletToIdentifier:SaveState forIdentifier:@"SaveState"];
@ -36,16 +48,16 @@
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)mapOutletToIdentifier:(id)outlet forIdentifier:(NSString*)identifier
- (void)mapOutletToIdentifier:(id)outlet forIdentifier:(NSString*)identifier1
{
hotkeyOutlets[identifier] = outlet;
[self setHotkeyDisplay:identifier];
(self.hotkeyOutlets)[identifier1] = outlet;
[self setHotkeyDisplay:identifier1];
}
- (void)setHotkeyDisplay:(NSString*)keyIdent
{
NSString *label = [self parseMappingDisplayString:keyIdent];
NSTextField *displayField = hotkeyOutlets[keyIdent];
NSTextField *displayField = (self.hotkeyOutlets)[keyIdent];
if(displayField) {
[[displayField cell] setStringValue:label];
@ -96,7 +108,7 @@
- (BOOL) handleMouseDown:(NSEvent *)mouseEvent
{
if (configInput != 0)
if (self.configInput != 0)
{
[self hotkeyCancel];
}
@ -107,12 +119,12 @@
- (void)keyDown:(NSEvent *)theEvent
{
NSString *keyCode = [NSString stringWithFormat:@"%d", [theEvent keyCode]];
NSString *keyLabel = (NSString *)[keyNameTable valueForKey:keyCode];
NSString *keyLabel = (NSString *) (self.keyNameTable)[keyCode];
if (configInput != 0)
if (self.configInput != 0)
{
// Save input
NSString *ident = [lastConfigButton identifier];
NSString *ident = [self.lastConfigButton identifier];
[self saveHotkey:ident device:@"NSEventKeyboard" deviceLabel:@"Keyboard" code:keyCode label:keyLabel];
[self setHotkeyDisplay:ident];
[self hotkeyCancel];
@ -152,16 +164,16 @@
{
NSButton *theButton = (NSButton *)sender;
if (configInput && lastConfigButton != theButton)
if (self.configInput && self.lastConfigButton != theButton)
{
[lastConfigButton setState:NSOffState];
[self.lastConfigButton setState:NSOffState];
}
if ([theButton state] == NSOnState)
{
lastConfigButton = theButton;
[hotkeysList removeAllObjects];
configInput = [theButton tag];
self.lastConfigButton = theButton;
[self.hotkeysList removeAllObjects];
self.configInput = [theButton tag];
}
else
{
@ -172,13 +184,13 @@
- (void) hotkeyCancel
{
if (lastConfigButton != nil)
if (self.lastConfigButton != nil)
{
[lastConfigButton setState:NSOffState];
lastConfigButton = nil;
[self.lastConfigButton setState:NSOffState];
self.lastConfigButton = nil;
}
configInput = 0;
self.configInput = 0;
}
- (BOOL)acceptsFirstResponder

View File

@ -15,16 +15,11 @@ typedef enum _LaunchArgOrder {
}LaunchArgOrder;
@interface LaunchArg : NSObject
{
LaunchArgOrder _launchOrder;
dispatch_block_t _theBlock;
NSString *_argument;
}
@property (readonly) LaunchArgOrder launchOrder;
@property (readonly) unsigned launchOrder;
@property (readonly, copy, nonatomic) dispatch_block_t theBlock;
@property (readonly, strong) NSString *argument;
- (id)initWithLaunchOrder:(LaunchArgOrder)order block:(dispatch_block_t)block argument:(NSString*)arg;
- (id)initWithLaunchOrder:(LaunchArgOrder)order argument:(NSString*)arg block:(dispatch_block_t)block;
- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg;
- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block;
- (void)addToDictionary:(NSMutableDictionary*)toAdd;
@end

View File

@ -9,10 +9,9 @@
#import "LaunchArg.h"
@interface LaunchArg ()
@property (readwrite) LaunchArgOrder launchOrder;
@property (readwrite) unsigned launchOrder;
@property (readwrite, copy, nonatomic) dispatch_block_t theBlock;
@property (readwrite, strong) NSString *argument;
@end
@implementation LaunchArg
@ -24,12 +23,12 @@
_theBlock = [theBlock copy];
}
- (id)initWithLaunchOrder:(LaunchArgOrder)order argument:(NSString*)arg block:(dispatch_block_t)block
- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block
{
return [self initWithLaunchOrder:order block:block argument:arg];
}
- (id)initWithLaunchOrder:(LaunchArgOrder)order block:(dispatch_block_t)block argument:(NSString*)arg
- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg
{
if (self = [super init]) {
self.launchOrder = order;

View File

@ -16,20 +16,14 @@ void ShowHelpAndExit(FILE* output, int exitCode);
CheatController *cheatController;
PluginList *pluginList;
NSWindow *preferenceWindow;
NSWindow *cheatWindow;
IBOutlet RecentItemsMenu *recentItems;
struct _PSXflags {
unsigned int sleepInBackground:1;
unsigned int wasPausedBeforeBGSwitch:1;
unsigned int endAtEmuClose:1;
unsigned int reserved:25;
} PSXflags;
NSMutableArray *skipFiles;
}
@property (readonly) RecentItemsMenu *recentItems;
@property (weak) IBOutlet RecentItemsMenu *recentItems;
@property (readonly) CheatController *cheatController;
@property (readonly) BOOL endAtEmuClose;

View File

@ -50,13 +50,16 @@ void ShowHelpAndExit(FILE* output, int exitCode)
@property BOOL sleepInBackground;
@property BOOL wasPausedBeforeBGSwitch;
@property (strong) NSMutableArray *skipFiles;
@property (strong) NSWindow *preferenceWindow;
@property (strong) NSWindow *cheatWindow;
@end
@implementation PcsxrController
@synthesize recentItems;
@synthesize skipFiles;
@synthesize cheatController;
@synthesize cheatWindow;
@synthesize preferenceWindow;
- (BOOL)endAtEmuClose
{

View File

@ -10,11 +10,6 @@
#import "PcsxrMemoryObject.h"
@interface PcsxrMemCardArray : NSObject
{
@private
NSArray *rawArray;
int cardNumber;
}
- (id)initWithMemoryCardNumber:(int)carNum;

View File

@ -66,11 +66,12 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
@interface PcsxrMemCardArray ()
@property (strong) NSArray *rawArray;
@property (readonly) char* memDataPtr;
@property int cardNumber;
@end
@implementation PcsxrMemCardArray
@synthesize rawArray;
@synthesize cardNumber;
- (char*)memDataPtr
{

View File

@ -15,10 +15,6 @@
IBOutlet NSCollectionView *memCard2view;
IBOutlet NSTextField *memCard1Label;
IBOutlet NSTextField *memCard2Label;
PcsxrMemCardArray *memCard1Array;
PcsxrMemCardArray *memCard2Array;
NSTimer *imageAnimateTimer;
}
@property (readonly, strong) PcsxrMemCardArray *memCard1Array;
@property (readonly, strong) PcsxrMemCardArray *memCard2Array;

View File

@ -18,6 +18,7 @@
@interface PcsxrMemCardController ()
@property (readwrite, strong) PcsxrMemCardArray *memCard1Array;
@property (readwrite, strong) PcsxrMemCardArray *memCard2Array;
@property (strong) NSTimer *imageAnimateTimer;
@end
@implementation PcsxrMemCardController
@ -83,8 +84,8 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil];
imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate date] interval:3.0/10.0 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:imageAnimateTimer forMode:NSRunLoopCommonModes];
self.imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate date] interval:3.0/10.0 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:self.imageAnimateTimer forMode:NSRunLoopCommonModes];
}
- (void)animateMemCards:(NSTimer*)theTimer
@ -228,7 +229,7 @@
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[imageAnimateTimer invalidate];
[self.imageAnimateTimer invalidate];
}
@end

View File

@ -25,19 +25,12 @@ typedef enum _PCSXRMemFlags {
} PCSXRMemFlags;
@interface PcsxrMemoryObject : NSObject
{
NSArray *memImages;
NSInteger memImageIndex;
uint8_t startingIndex;
uint8_t blockSize;
PCSXRMemFlags flagNameIndex;
}
+ (NSArray *)imagesFromMcd:(McdBlock *)block;
+ (NSString*)memoryLabelFromFlag:(PCSXRMemFlags)flagNameIndex;
+ (NSImage *)blankImage;
+ (PCSXRMemFlags)memFlagsFromBlockFlags:(unsigned char)blockFlags;
- (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx;
- (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize;
@property (readonly, strong) NSString *englishName;

View File

@ -57,8 +57,7 @@ NSString *const memoryAnimateTimerKey = @"PCSXR Memory Card Image Animate";
}
[imagesArray addObject:memImage];
}
NSArray *retArray = [NSArray arrayWithArray:imagesArray];
return retArray;
return [NSArray arrayWithArray:imagesArray];
}
static NSString *MemLabelDeleted;
@ -120,11 +119,6 @@ static NSString *MemLabelEndLink;
return imageBlank;
}
- (id)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx
{
return [self initWithMcdBlock:infoBlock startingIndex:startIdx size:1];
}
+ (PCSXRMemFlags)memFlagsFromBlockFlags:(unsigned char)blockFlags
{
if ((blockFlags & 0xF0) == 0xA0) {
@ -165,13 +159,14 @@ static NSString *MemLabelEndLink;
if ([englishName isEqualToString:sjisName]) {
#if 0
if (![englishName isEqualToString:@""])
NSLog(@"English name and sjis name are the same: %s. Replacing the sjis string with the English string.", [englishName UTF8String]);
NSLog(@"English name and sjis name are the same: %@. Replacing the sjis string with the English string.", englishName);
#endif
self.sjisName = self.englishName;
}
@autoreleasepool {
self.memImages = [PcsxrMemoryObject imagesFromMcd:infoBlock];
}
if ([memImages count] == 0) {
self.memImageIndex = -1;
} else if ([memImages count] == 1) {

View File

@ -10,16 +10,11 @@
@interface PcsxrPlugin : NSObject {
void *pluginRef;
NSDate *modDate;
NSString *fullPlugPath;
long version;
int type;
int active;
}
@property (readonly, copy) NSString *path;
@property (readonly, strong) NSString *name;
@property (readonly) int type;
+ (NSString *)prefixForType:(int)type;
+ (NSString *)defaultKeyForType:(int)type;
@ -29,9 +24,6 @@
- (id)initWithPath:(NSString *)aPath;
- (NSString *)displayVersion;
- (int)type;
- (NSUInteger)hash;
- (NSString *)description;
- (BOOL)hasAboutAs:(int)type;
- (BOOL)hasConfigureAs:(int)type;
- (long)runAs:(int)aType;

View File

@ -17,17 +17,24 @@
@interface PcsxrPlugin ()
@property (readwrite, copy) NSString *path;
@property (readwrite, strong) NSDate *modDate;
@property (readwrite, strong) NSString *name;
@property (readwrite, strong) NSString *fullPlugPath;
@property (strong) NSDate *modDate;
@property (strong) NSString *fullPlugPath;
@property long version;
@property (readwrite) int type;
@property int active;
@end
@implementation PcsxrPlugin
@synthesize path;
@synthesize name;
@synthesize active;
@synthesize fullPlugPath;
@synthesize modDate;
@synthesize path;
@synthesize type;
@synthesize version;
+ (NSString *)prefixForType:(int)aType
{
@ -125,7 +132,7 @@
NSFileManager *fm = [NSFileManager defaultManager];
pluginRef = NULL;
name = nil;
self.name = nil;
self.path = aPath;
NSString *goodPath = nil;
if ([aPath isAbsolutePath]) {
@ -366,11 +373,6 @@
return [NSString stringWithFormat:@"v%ld.%ld.%ld", version>>16,(version>>8)&0xff,version&0xff];
}
- (int)type
{
return type;
}
- (NSUInteger)hash
{
return [path hash];
@ -378,18 +380,18 @@
- (NSString *)description
{
if (name == nil)
if (_name == nil)
return [path lastPathComponent];
return [NSString stringWithFormat:@"%@ %@ [%@]", name, [self displayVersion], [path lastPathComponent]];
return [NSString stringWithFormat:@"%@ %@ [%@]", self.name, [self displayVersion], [path lastPathComponent]];
}
- (NSString*)debugDescription
{
if (name == nil) {
if (_name == nil) {
return fullPlugPath;
}
return [NSString stringWithFormat:@"%@, %@ [%@]", name, [self displayVersion], fullPlugPath];
return [NSString stringWithFormat:@"%@, %@ [%@]", self.name, [self displayVersion], fullPlugPath];
}
// the plugin will check if it's still valid and return the status

View File

@ -4,15 +4,11 @@
#import "PluginList.h"
@interface PluginController : NSObject
{
IBOutlet NSButton *aboutButton;
IBOutlet NSButton *configureButton;
IBOutlet NSPopUpButton *pluginMenu;
int pluginType;
NSArray *plugins;
NSString *defaultKey;
}
@property (weak) IBOutlet NSButton *aboutButton;
@property (weak) IBOutlet NSButton *configureButton;
@property (weak) IBOutlet NSPopUpButton *pluginMenu;
- (IBAction)doAbout:(id)sender;
- (IBAction)doConfigure:(id)sender;
- (IBAction)selectPlugin:(id)sender;

View File

@ -5,22 +5,24 @@
@interface PluginController ()
@property (strong) NSArray *plugins;
@property (strong) NSString *defaultKey;
@property int pluginType;
@end
@implementation PluginController
@synthesize defaultKey;
@synthesize plugins;
@synthesize aboutButton;
@synthesize configureButton;
@synthesize pluginMenu;
- (IBAction)doAbout:(id)sender
{
PcsxrPlugin *plugin = plugins[[pluginMenu indexOfSelectedItem]];
[plugin aboutAs:pluginType];
PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]];
[plugin aboutAs:self.pluginType];
}
- (IBAction)doConfigure:(id)sender
{
PcsxrPlugin *plugin = plugins[[pluginMenu indexOfSelectedItem]];
[plugin configureAs:pluginType];
PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]];
[plugin configureAs:self.pluginType];
}
- (IBAction)selectPlugin:(id)sender
@ -28,18 +30,18 @@
if (sender == pluginMenu) {
NSInteger index = [pluginMenu indexOfSelectedItem];
if (index != -1) {
PcsxrPlugin *plugin = plugins[index];
PcsxrPlugin *plugin = (self.plugins)[index];
if (![[PluginList list] setActivePlugin:plugin forType:pluginType]) {
if (![[PluginList list] setActivePlugin:plugin forType:self.pluginType]) {
/* plugin won't initialize */
}
// write selection to defaults
[[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:defaultKey];
[[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:self.defaultKey];
// set button states
[aboutButton setEnabled:[plugin hasAboutAs:pluginType]];
[configureButton setEnabled:[plugin hasConfigureAs:pluginType]];
[aboutButton setEnabled:[plugin hasAboutAs:self.pluginType]];
[configureButton setEnabled:[plugin hasConfigureAs:self.pluginType]];
} else {
// set button states
[aboutButton setEnabled:NO];
@ -54,18 +56,18 @@
NSString *sel;
// remember the list
pluginType = type;
self.pluginType = type;
self.plugins = list;
self.defaultKey = [PcsxrPlugin defaultKeyForType:pluginType];
self.defaultKey = [PcsxrPlugin defaultKeyForType:self.pluginType];
// clear the previous menu items
[pluginMenu removeAllItems];
// load the currently selected plugin
sel = [[NSUserDefaults standardUserDefaults] stringForKey:defaultKey];
sel = [[NSUserDefaults standardUserDefaults] stringForKey:self.defaultKey];
// add the menu entries
for (PcsxrPlugin *plug in plugins) {
for (PcsxrPlugin *plug in self.plugins) {
NSString *description = [plug description];
[pluginMenu addItemWithTitle:description];

View File

@ -11,19 +11,7 @@
//extern NSMutableArray *plugins;
@interface PluginList : NSObject {
@private
NSMutableArray *pluginList;
PcsxrPlugin *activeGpuPlugin;
PcsxrPlugin *activeSpuPlugin;
PcsxrPlugin *activeCdrPlugin;
PcsxrPlugin *activePadPlugin;
PcsxrPlugin *activeNetPlugin;
PcsxrPlugin *activeSIO1Plugin;
BOOL missingPlugins;
}
@interface PluginList : NSObject
+ (PluginList *)list;

View File

@ -15,7 +15,20 @@
static PluginList __weak *sPluginList = nil;
const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, PSE_LT_NET, PSE_LT_SIO1};
@interface PluginList ()
@property (strong) NSMutableArray *pluginList;
@property BOOL missingPlugins;
@property (strong) PcsxrPlugin *activeGpuPlugin;
@property (strong) PcsxrPlugin *activeSpuPlugin;
@property (strong) PcsxrPlugin *activeCdrPlugin;
@property (strong) PcsxrPlugin *activePadPlugin;
@property (strong) PcsxrPlugin *activeNetPlugin;
@property (strong) PcsxrPlugin *activeSIO1Plugin;
@end
@implementation PluginList
@synthesize missingPlugins;
+ (PluginList *)list
{
@ -32,9 +45,9 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
}
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
pluginList = [[NSMutableArray alloc] initWithCapacity:20];
self.pluginList = [[NSMutableArray alloc] initWithCapacity:20];
activeGpuPlugin = activeSpuPlugin = activeCdrPlugin = activePadPlugin = activeNetPlugin = activeSIO1Plugin = nil;
self.activeGpuPlugin = self.activeSpuPlugin = self.activeCdrPlugin = self.activePadPlugin = self.activeNetPlugin = self.activeSIO1Plugin = nil;
missingPlugins = NO;
for (i = 0; i < sizeof(typeList) / sizeof(typeList[0]); i++) {
@ -50,7 +63,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
@autoreleasepool {
PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:path];
if (plugin) {
[pluginList addObject:plugin];
[self.pluginList addObject:plugin];
if (![self setActivePlugin:plugin forType:typeList[i]])
missingPlugins = YES;
} else {
@ -76,9 +89,9 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
NSUInteger i;
// verify that the ones that are in list still works
for (i=0; i < [pluginList count]; i++) {
if (![pluginList[i] verifyOK]) {
[pluginList removeObjectAtIndex:i]; i--;
for (i=0; i < [self.pluginList count]; i++) {
if (![(self.pluginList)[i] verifyOK]) {
[self.pluginList removeObjectAtIndex:i]; i--;
}
}
@ -97,7 +110,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
@autoreleasepool {
PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:pname];
if (plugin != nil) {
[pluginList addObject:plugin];
[self.pluginList addObject:plugin];
}
}
}
@ -127,7 +140,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
{
NSMutableArray *types = [NSMutableArray array];
for (PcsxrPlugin *plugin in pluginList) {
for (PcsxrPlugin *plugin in self.pluginList) {
if ([plugin type] & typeMask) {
[types addObject:plugin];
}
@ -141,7 +154,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
if (nil == path)
return NO;
for (PcsxrPlugin *plugin in pluginList) {
for (PcsxrPlugin *plugin in self.pluginList) {
if ([[plugin path] isEqualToString:path])
return YES;
}
@ -159,12 +172,12 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
{
BOOL bad = NO;
if ([activeGpuPlugin runAs:PSE_LT_GPU] != 0) bad = YES;
if ([activeSpuPlugin runAs:PSE_LT_SPU] != 0) bad = YES;
if ([activeCdrPlugin runAs:PSE_LT_CDR] != 0) bad = YES;
if ([activePadPlugin runAs:PSE_LT_PAD] != 0) bad = YES;
if ([activeNetPlugin runAs:PSE_LT_NET] != 0) bad = YES;
if ([activeSIO1Plugin runAs:PSE_LT_SIO1] != 0) bad = YES;
if ([self.activeGpuPlugin runAs:PSE_LT_GPU] != 0) bad = YES;
if ([self.activeSpuPlugin runAs:PSE_LT_SPU] != 0) bad = YES;
if ([self.activeCdrPlugin runAs:PSE_LT_CDR] != 0) bad = YES;
if ([self.activePadPlugin runAs:PSE_LT_PAD] != 0) bad = YES;
if ([self.activeNetPlugin runAs:PSE_LT_NET] != 0) bad = YES;
if ([self.activeSIO1Plugin runAs:PSE_LT_SIO1] != 0) bad = YES;
return !bad;
}
@ -172,12 +185,12 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
- (PcsxrPlugin *)activePluginForType:(int)type
{
switch (type) {
case PSE_LT_GPU: return activeGpuPlugin; break;
case PSE_LT_CDR: return activeCdrPlugin; break;
case PSE_LT_SPU: return activeSpuPlugin; break;
case PSE_LT_PAD: return activePadPlugin; break;
case PSE_LT_NET: return activeNetPlugin; break;
case PSE_LT_SIO1: return activeSIO1Plugin; break;
case PSE_LT_GPU: return self.activeGpuPlugin; break;
case PSE_LT_CDR: return self.activeCdrPlugin; break;
case PSE_LT_SPU: return self.activeSpuPlugin; break;
case PSE_LT_PAD: return self.activePadPlugin; break;
case PSE_LT_NET: return self.activeNetPlugin; break;
case PSE_LT_SIO1: return self.activeSIO1Plugin; break;
}
return nil;
@ -212,6 +225,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
// stop the old plugin and start the new one
if (pluginPtr) {
[pluginPtr shutdownAs:type];
pluginPtr = nil;
}
if ([plugin runAs:type] != 0) {
@ -219,22 +233,22 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
}
switch (type) {
case PSE_LT_GPU:
activeGpuPlugin = plugin;
self.activeGpuPlugin = plugin;
break;
case PSE_LT_CDR:
activeCdrPlugin = plugin;
self.activeCdrPlugin = plugin;
break;
case PSE_LT_SPU:
activeSpuPlugin = plugin;
self.activeSpuPlugin = plugin;
break;
case PSE_LT_PAD:
activePadPlugin = plugin;
self.activePadPlugin = plugin;
break;
case PSE_LT_NET:
activeNetPlugin = plugin;
self.activeNetPlugin = plugin;
break;
case PSE_LT_SIO1:
activeSIO1Plugin = plugin;
self.activeSIO1Plugin = plugin;
break;
}

View File

@ -9,9 +9,9 @@
#import <Cocoa/Cocoa.h>
@class PcsxrController;
@interface RecentItemsMenu : NSMenu {
IBOutlet PcsxrController *pcsxr;
}
@interface RecentItemsMenu : NSMenu
@property (weak) IBOutlet PcsxrController *pcsxr;
- (IBAction)clearRecentDocuments:(id)sender;
- (void)addRecentItem:(NSURL*)documentURL;

View File

@ -11,6 +11,8 @@
@implementation RecentItemsMenu
@synthesize pcsxr;
// Initialization
- (void)awakeFromNib
{