summaryrefslogtreecommitdiff
path: root/macosx/Source/CheatController.h
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/Source/CheatController.h')
-rw-r--r--macosx/Source/CheatController.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/macosx/Source/CheatController.h b/macosx/Source/CheatController.h
new file mode 100644
index 00000000..c56f2a68
--- /dev/null
+++ b/macosx/Source/CheatController.h
@@ -0,0 +1,53 @@
+//
+// CheatController.h
+// Pcsxr
+//
+
+#import <Cocoa/Cocoa.h>
+#import "PcsxrHexadecimalFormatter.h"
+#include "psxcommon.h"
+#include "cheat.h"
+
+@interface PcsxrCheatTempObject : NSObject <NSCopying>
+@property (readwrite) uint32_t cheatAddress;
+@property (readwrite) uint16_t cheatValue;
+
+- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val;
+- (instancetype)initWithCheatCode:(CheatCode *)theCheat;
+@end
+
+@interface PcsxrCheatTemp : NSObject
+@property (readwrite, strong) NSMutableArray *cheatValues;
+@property (readwrite, strong) NSString *cheatName;
+@property (readwrite, getter = isEnabled) BOOL enabled;
+
+- (instancetype)initWithCheat:(Cheat *)theCheat;
+@end
+
+@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDelegate>
+
+@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;
+
+- (void)refresh;
+
+- (IBAction)saveCheats:(id)sender;
+- (IBAction)loadCheats:(id)sender;
+- (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;
+- (IBAction)addCheatValue:(id)sender;
+
+@end