mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
35 lines
494 B
R
35 lines
494 B
R
|
#include "Frame.h"
|
||
|
#include "debug.h"
|
||
|
|
||
|
@implementation Frame : Object
|
||
|
- (id) initWithFile: (string) file duration: (float) time
|
||
|
{
|
||
|
self = [super init];
|
||
|
picture = [[QPic alloc] initName: file];
|
||
|
duration = time;
|
||
|
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (void) free
|
||
|
{
|
||
|
[picture free];
|
||
|
[super free];
|
||
|
}
|
||
|
|
||
|
- (Point) size
|
||
|
{
|
||
|
return [[Point alloc] initWithComponents :[picture width] :[picture height]];
|
||
|
}
|
||
|
|
||
|
- (float) duration
|
||
|
{
|
||
|
return duration;
|
||
|
}
|
||
|
|
||
|
- (void) draw: (integer) x :(integer) y
|
||
|
{
|
||
|
[picture draw :x :y];
|
||
|
}
|
||
|
@end
|