summaryrefslogtreecommitdiff
path: root/macosx/CheatController.h
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-17 20:12:12 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-17 20:12:12 +0000
commit5be0778eaa7d48dfb71f4619e2e6b73b9095ad62 (patch)
treec5f270d8777bd621c737ef3b0d195e1c89808677 /macosx/CheatController.h
parent37ba81a540460a7d34a33c23d2353ac84f887576 (diff)
downloadpcsxr-5be0778eaa7d48dfb71f4619e2e6b73b9095ad62.tar.gz
Finish work on OS X's cheat management.
There is still a bug that changing the label/name of the cheat doesn't set the changed bit. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86707 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/CheatController.h')
-rw-r--r--macosx/CheatController.h43
1 files changed, 40 insertions, 3 deletions
diff --git a/macosx/CheatController.h b/macosx/CheatController.h
index 7a20ec55..5ac56e93 100644
--- a/macosx/CheatController.h
+++ b/macosx/CheatController.h
@@ -4,18 +4,52 @@
//
#import <Cocoa/Cocoa.h>
+#import "ARCBridge.h"
+#include "psxcommon.h"
+#include "cheat.h"
-@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDataSource, NSTableViewDelegate>
+@class PcsxrHexadecimalFormatter;
+
+@interface PcsxrCheatTempObject : NSObject <NSCopying>
+{
+ uint32_t address;
+ uint16_t value;
+}
+@property (readwrite) uint32_t address;
+@property (readwrite, arcweak) NSNumber* addressNS;
+@property (readwrite) uint16_t value;
+@property (readwrite, arcweak) NSNumber* valueNS;
+
+- (id)initWithAddress:(uint32_t)add value:(uint16_t)val;
+- (id)initWithCheatCode:(CheatCode *)theCheat;
+@end
+
+@interface PcsxrCheatTemp : NSObject
+{
+ NSMutableArray *cheatValues;
+ NSString *cheatName;
+ BOOL enabled;
+}
+@property (readwrite, retain) NSMutableArray *cheatValues;
+@property (readwrite, retain, nonatomic) NSString *cheatName;
+@property (readwrite, getter = isEnabled) BOOL enabled;
+
+- (id)initWithCheat:(Cheat *)theCheat;
+@end
+
+@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDelegate>
{
IBOutlet NSTableView *cheatView;
IBOutlet NSWindow *editCheatWindow;
IBOutlet NSTableView *editCheatView;
- IBOutlet NSNumberFormatter *addressFormatter;
- IBOutlet NSNumberFormatter *valueFormatter;
+ IBOutlet PcsxrHexadecimalFormatter *addressFormatter;
+ IBOutlet PcsxrHexadecimalFormatter *valueFormatter;
NSMutableArray *tempCheatCodes;
+ NSMutableArray *cheats;
}
@property (readwrite, retain) NSMutableArray *tempCheatCodes;
+@property (readwrite, retain) NSMutableArray *cheats;
- (void)refresh;
@@ -24,6 +58,9 @@
- (IBAction)clear:(id)sender;
- (IBAction)editCheat:(id)sender;
- (IBAction)addCheat:(id)sender;
+- (IBAction)applyCheats:(id)sender;
+- (IBAction)removeCheats:(id)sender;
+- (IBAction)changeCheat:(id)sender;
- (IBAction)closeCheatEdit:(id)sender;
- (IBAction)removeCheatValue:(id)sender;