2011-11-24 06:17:27 +01:00
|
|
|
//
|
|
|
|
// PcsxrMemoryObject.h
|
|
|
|
// Pcsxr
|
|
|
|
//
|
|
|
|
// Created by Charles Betts on 11/23/11.
|
|
|
|
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2014-04-02 20:01:28 +02:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2011-12-10 00:06:12 +01:00
|
|
|
#include "sio.h"
|
2011-11-24 06:17:27 +01:00
|
|
|
|
2014-11-16 22:05:39 +01:00
|
|
|
typedef NS_ENUM(char, PCSXRMemFlag) {
|
2016-03-30 16:07:35 +02:00
|
|
|
PCSXRMemFlagDeleted,
|
|
|
|
PCSXRMemFlagFree,
|
|
|
|
PCSXRMemFlagUsed,
|
|
|
|
PCSXRMemFlagLink,
|
|
|
|
PCSXRMemFlagEndLink
|
2014-05-22 06:24:14 +02:00
|
|
|
};
|
2013-07-06 09:14:48 +02:00
|
|
|
|
2011-11-24 06:17:27 +01:00
|
|
|
@interface PcsxrMemoryObject : NSObject
|
2013-09-13 23:31:56 +02:00
|
|
|
|
2013-06-25 23:02:27 +02:00
|
|
|
+ (NSArray *)imagesFromMcd:(McdBlock *)block;
|
2014-11-16 22:05:39 +01:00
|
|
|
+ (NSString*)memoryLabelFromFlag:(PCSXRMemFlag)flagNameIndex;
|
2013-07-08 03:10:00 +02:00
|
|
|
+ (NSImage *)blankImage;
|
2014-11-16 22:05:39 +01:00
|
|
|
+ (PCSXRMemFlag)memFlagsFromBlockFlags:(unsigned char)blockFlags;
|
2011-12-10 00:06:12 +01:00
|
|
|
|
2014-07-21 22:24:55 +02:00
|
|
|
- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize NS_DESIGNATED_INITIALIZER;
|
2011-11-24 06:17:27 +01:00
|
|
|
|
2014-08-06 21:02:00 +02:00
|
|
|
- (NSImage*)memoryImageAtIndex:(NSInteger)idx;
|
|
|
|
|
2014-11-16 22:05:39 +01:00
|
|
|
@property (readonly, copy) NSString *title;
|
2014-11-10 20:46:07 +01:00
|
|
|
@property (readonly, copy) NSString *name;
|
2014-11-16 22:05:39 +01:00
|
|
|
@property (readonly, copy) NSString *identifier;
|
|
|
|
@property (readonly, strong) NSArray *imageArray;
|
|
|
|
@property (readonly, strong, nonatomic) NSImage *image;
|
|
|
|
@property (readonly) PCSXRMemFlag flag;
|
2013-08-22 01:19:04 +02:00
|
|
|
@property (readonly) uint8_t startingIndex;
|
|
|
|
@property (readonly) uint8_t blockSize;
|
2014-09-08 16:27:51 +02:00
|
|
|
@property (readonly) BOOL hasImages;
|
2013-07-08 03:10:00 +02:00
|
|
|
|
2014-11-16 22:05:39 +01:00
|
|
|
@property (readonly, copy) NSImage *firstImage;
|
|
|
|
@property (readonly, nonatomic) NSUInteger iconCount;
|
2013-07-08 03:10:00 +02:00
|
|
|
@property (readonly, unsafe_unretained, nonatomic) NSString *flagName;
|
|
|
|
@property (readonly, unsafe_unretained, nonatomic) NSAttributedString *attributedFlagName;
|
2014-11-16 22:05:39 +01:00
|
|
|
@property (readonly, nonatomic) BOOL showCount;
|
2011-11-24 06:17:27 +01:00
|
|
|
|
|
|
|
@end
|