quakeforge/ruamoko/qwaq/debugger/views/vectorview.r

29 lines
585 B
R
Raw Normal View History

#include <string.h>
#include "ruamoko/qwaq/debugger/views/vectorview.h"
@implementation VectorView
-initWithDef:(qdb_def_t)def in:(void *)data type:(qfot_type_t *)type
{
if (!(self = [super initWithDef:def])) {
return nil;
}
self.data = (vector *)(data + def.offset);
return self;
}
+(VectorView *)withDef:(qdb_def_t)def in:(void *)data type:(qfot_type_t *)type
{
return [[[self alloc] initWithDef:def in:data type:type] autorelease];
}
-draw
{
[super draw];
string val = sprintf ("%.9v", data[0]);
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
return self;
}
@end