mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 12:01:43 +00:00
autogen fix compile
This commit is contained in:
parent
5a2e060c2d
commit
29cd4d5e59
3 changed files with 17 additions and 15 deletions
|
|
@ -94,8 +94,8 @@ def translate_type_to_lvt(ptype, allowArrays=False):
|
|||
if pointerLvl > 1:
|
||||
return "LVT_???"
|
||||
if pointerLvl == 1:
|
||||
return "LVT_" + ptype.upper() + "_P"
|
||||
return "LVT_" + ptype.upper()
|
||||
return "LVT_" + type.upper() + "_P"
|
||||
return "LVT_" + type.upper()
|
||||
|
||||
if ptype in vec_types:
|
||||
if pointerLvl > 1:
|
||||
|
|
|
|||
|
|
@ -264,6 +264,7 @@ def parse_struct(struct_str, sortFields = True):
|
|||
struct_name, body, trailing_name = match.groups()
|
||||
identifier = struct_name if struct_name else trailing_name
|
||||
struct['identifier'] = identifier
|
||||
struct['typedef'] = 'typedef ' in struct_str
|
||||
|
||||
body = struct_str.split('{', 1)[1].rsplit('}', 1)[0]
|
||||
body = strip_anonymous_blocks(body)
|
||||
|
|
@ -495,21 +496,22 @@ def build_struct(struct):
|
|||
|
||||
row = []
|
||||
|
||||
struct_str = "struct " if not struct['typedef'] else ""
|
||||
startStr = ''
|
||||
endStr = ' },'
|
||||
if fid in override_field_version_excludes:
|
||||
startStr += '#ifndef ' + override_field_version_excludes[fid] + '\n'
|
||||
endStr += '\n#endif'
|
||||
startStr += ' { '
|
||||
row.append(startStr )
|
||||
row.append('"%s", ' % fid )
|
||||
row.append('%s, ' % lvt )
|
||||
row.append('offsetof(struct %s, %s), ' % (sid, field['identifier']) )
|
||||
row.append('%s, ' % fimmutable )
|
||||
row.append('%s, ' % lot )
|
||||
row.append('%s, ' % size )
|
||||
row.append('sizeof(%s)' % ftype )
|
||||
row.append(endStr )
|
||||
row.append(startStr )
|
||||
row.append('"%s", ' % fid )
|
||||
row.append('%s, ' % lvt )
|
||||
row.append('offsetof(%s%s, %s), ' % (struct_str, sid, field['identifier']))
|
||||
row.append('%s, ' % fimmutable )
|
||||
row.append('%s, ' % lot )
|
||||
row.append('%s, ' % size )
|
||||
row.append('sizeof(%s)' % ftype )
|
||||
row.append(endStr )
|
||||
field_table.append(row)
|
||||
|
||||
field_table_str, field_count = table_to_string(field_table)
|
||||
|
|
|
|||
|
|
@ -392,8 +392,8 @@ static struct LuaObjectField sCameraFOVStatusFields[LUA_CAMERA_FOVSTATUS_FIELD_C
|
|||
|
||||
#define LUA_CAMERA_OVERRIDE_FIELD_COUNT 2
|
||||
static struct LuaObjectField sCameraOverrideFields[LUA_CAMERA_OVERRIDE_FIELD_COUNT] = {
|
||||
{ "override", LVT_BOOL, offsetof(struct CameraOverride, override), false, LOT_NONE, 1, sizeof(bool) },
|
||||
{ "value", LVT_UNSIGNED INT, offsetof(struct CameraOverride, value), false, LOT_NONE, 1, sizeof(unsigned int) },
|
||||
{ "override", LVT_BOOL, offsetof(struct CameraOverride, override), false, LOT_NONE, 1, sizeof(bool) },
|
||||
{ "value", LVT_U32, offsetof(struct CameraOverride, value), false, LOT_NONE, 1, sizeof(unsigned int) },
|
||||
};
|
||||
|
||||
#define LUA_CAMERA_STORED_INFO_FIELD_COUNT 4
|
||||
|
|
@ -2681,8 +2681,8 @@ static struct LuaObjectField sTransitionInfoFields[LUA_TRANSITION_INFO_FIELD_COU
|
|||
|
||||
#define LUA_VTX__INTERP_FIELD_COUNT 2
|
||||
static struct LuaObjectField sVtx_InterpFields[LUA_VTX__INTERP_FIELD_COUNT] = {
|
||||
{ "n", LVT_STRING, offsetof(struct Vtx_Interp, n), false, LOT_NONE, 1, sizeof(signed char) },
|
||||
{ "ob", LVT_FLOAT, offsetof(struct Vtx_Interp, ob), false, LOT_NONE, 3, sizeof(float) },
|
||||
{ "n", LVT_STRING, offsetof(Vtx_Interp, n), false, LOT_NONE, 1, sizeof(signed char) },
|
||||
{ "ob", LVT_F32, offsetof(Vtx_Interp, ob), false, LOT_NONE, 3, sizeof(float) },
|
||||
};
|
||||
|
||||
#define LUA_WALL_COLLISION_DATA_FIELD_COUNT 10
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue