quakeforge/ruamoko/qwaq/debugger/views/quatview.r
2020-04-02 13:06:31 +09:00

28 lines
572 B
R

#include <string.h>
#include "debugger/views/quatview.h"
@implementation QuatView
-initWithType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data
{
if (!(self = [super initWithType:type])) {
return nil;
}
self.data = (quaternion *)(data + offset);
return self;
}
+(QuatView *)withType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data
{
return [[[self alloc] initWithType:type at:offset in:data] autorelease];
}
-draw
{
[super draw];
string val = sprintf ("%.9q", data[0]);
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
return self;
}
@end