/* BWOverWorld */

#import <Cocoa/Cocoa.h>

@interface BWOverWorld : NSObject
{
    IBOutlet id matrixMap;
    IBOutlet id matrixTools;
	IBOutlet id scrollView;
	
	IBOutlet id fieldPosition;
	IBOutlet id fieldGroups;
	
	IBOutlet id buttonSelection;
	
	NSMutableData *rom;
	NSMutableArray *tiles;
	
	unsigned char currentTool;
	unsigned char mapScale;
	unsigned char cr;				// Current Region
	
	unsigned short offSet;
	unsigned short offSetPalaces;
	unsigned short maxPalaces;
	unsigned short max;
	unsigned short g[3];
	unsigned char b[3][1024];
}

- (void)open:(NSMutableData *)theRom;

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

- (void)loadRegions;
- (IBAction)changeRegion:(id)sender;

- (IBAction)setSelectTool:(id)sender;
- (IBAction)changeTool:(id)sender;
- (IBAction)clickMap:(id)sender;
- (void)calc;

- (void)save;
- (void)palacePointers;

- (IBAction)exportRegion:(id)sender;

@end
