quakeforge/ruamoko/qwaq/debugger/quatview.r

29 lines
564 B
R
Raw Normal View History

#include <string.h>
#include "debugger/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 mvaddstr:{0, 0}, str_mid (val, 0, xlen)];
return self;
}
@end