quakeforge/ruamoko/qwaq/debugger/fieldview.r
Bill Currie 0da92e33f6 [qwaq] Use TableView to show locals
This is much nicer (even though things aren't quite right yet)
2020-03-31 21:15:57 +09:00

28 lines
571 B
R

#include <string.h>
#include "debugger/fieldview.h"
@implementation FieldView
-initWithType:(qfot_type_t *)type at:(unsigned)offset in:(void *)data
{
if (!(self = [super initWithType:type])) {
return nil;
}
self.data = (unsigned *)(data + offset);
return self;
}
+(FieldView *)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 mvaddstr:{0, 0}, str_mid (val, 0, xlen)];
return self;
}
@end