62 |
* describing a height field in gray level mode. |
* describing a height field in gray level mode. |
63 |
* If any problem opening the file, returns nil. |
* If any problem opening the file, returns nil. |
64 |
*/ |
*/ |
65 |
- (id) initWithImageName: (NSString *)imageName |
- (id) initWithMapImageName: (NSString *)map |
66 |
{ |
{ |
67 |
NSParameterAssert (imageName); |
NSParameterAssert (map); |
68 |
NSParameterAssert ([imageName length] != 0); |
NSParameterAssert ([map length] != 0); |
69 |
|
|
70 |
self = [super init]; |
self = [super init]; |
71 |
if (self != nil) |
if (self != nil) |
72 |
{ |
{ |
73 |
NSArray *imageReps = [NSBitmapImageRep imageRepsWithFile: imageName]; |
NSArray *imageReps = [NSBitmapImageRep imageRepsWithFile: map]; |
74 |
if ([imageReps count] != 1) |
if ([imageReps count] != 1) |
75 |
{ |
{ |
76 |
NSWarnMLog (@"Could not open map file"); |
NSWarnMLog (@"Could not open map file"); |