mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
f50d27ec11
The code currently assumes a single value is referenced rather than the beginning of an array.
29 lines
642 B
R
29 lines
642 B
R
#include <string.h>
|
|
#include "ruamoko/qwaq/debugger/views/voidview.h"
|
|
|
|
@implementation VoidView
|
|
|
|
-initWithDef:(qdb_def_t)def in:(void *)data type:(qfot_type_t *)type
|
|
{
|
|
if (!(self = [super initWithDef:def type:type])) {
|
|
return nil;
|
|
}
|
|
self.data = (unsigned *) (data + def.offset);
|
|
return self;
|
|
}
|
|
|
|
+(VoidView *)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 ("%08x %08x %08x %08x",
|
|
data[0], data[1], data[2], data[3]);
|
|
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
|
|
return self;
|
|
}
|
|
|
|
@end
|