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

29 lines
593 B
R
Raw Normal View History

#include <string.h>
#include "ruamoko/qwaq/debugger/views/entityview.h"
@implementation EntityView
-initWithType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data
{
if (!(self = [super initWithType:type])) {
return nil;
}
self.data = (entity *)(data + offset);
return self;
}
+(EntityView *)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 ("FIXME [%x]", data[0]);
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
return self;
}
@end