2012-03-04 09:30:27 +00:00
|
|
|
/*
|
|
|
|
* GrpFile.game.m
|
|
|
|
* duke3d
|
|
|
|
*
|
|
|
|
* Created by Jonathon Fowler on 24/07/09.
|
|
|
|
* Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "GrpFile.game.h"
|
|
|
|
|
|
|
|
@implementation GrpFile
|
2015-03-27 12:30:35 +00:00
|
|
|
- (id)initWithGrpfile:(grpfile_t const *)grpfile
|
2012-03-04 09:30:27 +00:00
|
|
|
{
|
|
|
|
self = [super init];
|
|
|
|
if (self) {
|
|
|
|
fg = grpfile;
|
2015-03-27 12:30:35 +00:00
|
|
|
namestring = [NSString stringWithCString:fg->type->name encoding:NSUTF8StringEncoding];
|
|
|
|
[namestring retain];
|
|
|
|
grpnamestring = [NSString stringWithCString:fg->filename encoding:NSUTF8StringEncoding];
|
|
|
|
[grpnamestring retain];
|
2012-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
- (void)dealloc
|
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
[namestring release];
|
|
|
|
[grpnamestring release];
|
2012-03-04 09:30:27 +00:00
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
- (NSString *)name
|
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
return namestring;
|
2012-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
- (NSString *)grpname
|
|
|
|
{
|
2015-03-27 12:30:35 +00:00
|
|
|
return grpnamestring;
|
2012-03-04 09:30:27 +00:00
|
|
|
}
|
2015-03-27 12:30:35 +00:00
|
|
|
- (grpfile_t const *)entryptr
|
2012-03-04 09:30:27 +00:00
|
|
|
{
|
|
|
|
return fg;
|
|
|
|
}
|
|
|
|
@end
|