/* BWSideView */

#import <Cocoa/Cocoa.h>

@interface BWSideView : NSMatrix
{
	IBOutlet id menuSet;
	IBOutlet id menuArea;
	
	NSMutableData *rom;
	NSMutableArray *tiles;
	NSMutableArray *tilesItems;
	
	unsigned char currentTool;
	unsigned char mapScale;
	unsigned char cs;		// Current Set
	unsigned char ca;		// Current Area
	unsigned char objSet;   // 0 1
	
	unsigned char size;		// Width of the area, in pages
	unsigned char objx,objy,length,type;
	
	unsigned char ct[2];	// Ceiling Tiles
	unsigned char ft[2];	// Floor Tiles
	
	unsigned char areas[8][64][64];
}

- (void)open:(NSMutableData *)theRom;
- (void)loadTiles:(int)set;
- (NSImage *)tileWithOffset:(int)os palette:(struct sCol[4])pal;

- (void)loadAreas;
- (IBAction)changeSet:(id)sender;
- (IBAction)changeArea:(id)sender;

- (void)changeSize:(int)newSize;
- (void)redraw;

- (void)drawCF:(int)x code:(unsigned char)h;

- (void)setSingle:(int)code;
- (void)setDouble:(int)code;
- (void)setHorizontalSingle:(int)code;
- (void)setHorizontalDouble:(int)code;
- (void)setVerticalUp:(int)code;
- (void)setVerticalSingle:(int)code;
- (void)setVerticalDouble:(int)code;
- (void)setOther:(int)code;
- (void)setItem:(int)code;

@end