mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[vkgen] Support renaming of auto fields
This commit is contained in:
parent
9133c0ea3f
commit
3b9e0a786e
1 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "vkfieldauto.h"
|
#include "vkfieldauto.h"
|
||||||
#include "vkgen.h"
|
#include "vkgen.h"
|
||||||
#include "vkstruct.h"
|
#include "vkstruct.h"
|
||||||
|
@ -10,7 +12,8 @@
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
field = [strct findField:field_name];
|
string real_name = [[item getObjectForKey:"field"] string];
|
||||||
|
field = [strct findField:real_name ? real_name : field_name];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +28,7 @@
|
||||||
{
|
{
|
||||||
Type *field_type = [Type findType: field.type];
|
Type *field_type = [Type findType: field.type];
|
||||||
fprintf (output_file, "\t{\"%s\", field_offset (%s, %s), %s, %s, %s},\n",
|
fprintf (output_file, "\t{\"%s\", field_offset (%s, %s), %s, %s, %s},\n",
|
||||||
field_name, struct_name, field_name,
|
field_name, struct_name, field.name,
|
||||||
[field_type parseType], [field_type parseFunc],
|
[field_type parseType], [field_type parseFunc],
|
||||||
[field_type parseData]);
|
[field_type parseData]);
|
||||||
return self;
|
return self;
|
||||||
|
@ -36,7 +39,7 @@
|
||||||
Type *field_type = [Type findType: field.type];
|
Type *field_type = [Type findType: field.type];
|
||||||
fprintf (output_file,
|
fprintf (output_file,
|
||||||
"\t{\"%s\", &%s, (void *) field_offset (%s, %s)},\n",
|
"\t{\"%s\", &%s, (void *) field_offset (%s, %s)},\n",
|
||||||
field_name, [field_type cexprType], struct_name, field_name);
|
field_name, [field_type cexprType], struct_name, field.name);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue