Cog/Plugins/GME/GamePropertiesReader.m
2007-10-11 23:11:58 +00:00

42 lines
684 B
Objective-C
Executable file

//
// GamePropertiesReader.m
// GME
//
// Created by Vincent Spader on 10/10/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "GamePropertiesReader.h"
#import "GameDecoder.h"
@implementation GamePropertiesReader
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
{
NSDictionary *properties;
GameDecoder *decoder;
decoder = [[GameDecoder alloc] init];
if (![decoder open:source])
{
NSLog(@"Could not open");
return nil;
}
properties = [decoder properties];
NSLog(@"Properties! %@", properties);
[decoder close];
[decoder release];
return properties;
}
+ (NSArray *)fileTypes
{
return [GameDecoder fileTypes];
}
@end