diff options
Diffstat (limited to 'macosx/CheatController.h')
| -rw-r--r-- | macosx/CheatController.h | 43 |
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; |
