diff --git a/autogen/common.py b/autogen/common.py index 34dc1f05a..8c91b29ee 100644 --- a/autogen/common.py +++ b/autogen/common.py @@ -123,7 +123,7 @@ def translate_type_to_lvt(ptype, allowArrays=False): if pointerLvl == 1 and "(" not in ptype and "[" not in ptype: ptype = ptype.replace("const", "").replace("*", "").strip() - if ptype in usf_types or ptype in typedef_pointers: + if ptype in usf_types or extract_integer_datatype(ptype) or ptype in typedef_pointers: return "LVT_%s_P" % ptype.upper() return "LVT_???" @@ -160,6 +160,9 @@ def translate_type_to_lot(ptype, allowArrays=True): if ptype in usf_types: return 'LOT_NONE' + if extract_integer_datatype(ptype): + return 'LOT_NONE' + # Strip out our pointer stars to get the true type. if "*" in ptype: # Count how many stars there is for our pointer level. @@ -220,7 +223,7 @@ def translate_type_to_lua(ptype): if ptype.startswith('enum '): return ptype, 'constants.md#%s' % ptype.replace(' ', '-') - if ptype in usf_types: + if ptype in usf_types or extract_integer_datatype(ptype): if ptype.startswith('f'): return '`number`', None return '`integer`', None diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 892f9ac38..81e22cca1 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -241,6 +241,7 @@ --- @class CameraOverride --- @field public override boolean +--- @field public value integer --- @class CameraStoredInfo --- @field public cannonYOffset number diff --git a/docs/lua/structs.md b/docs/lua/structs.md index d7a194468..d58bde6c2 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -434,6 +434,7 @@ | Field | Type | Access | | ----- | ---- | ------ | | override | `boolean` | | +| value | `integer` | | [:arrow_up_small:](#) diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 0fc369511..dddda15db 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -390,10 +390,10 @@ static struct LuaObjectField sCameraFOVStatusFields[LUA_CAMERA_FOVSTATUS_FIELD_C { "unusedIsSleeping", LVT_U32, offsetof(struct CameraFOVStatus, unusedIsSleeping), false, LOT_NONE, 1, sizeof(u32) }, }; -#define LUA_CAMERA_OVERRIDE_FIELD_COUNT 1 +#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_???, 1, sizeof(unsigned int) }, <--- UNIMPLEMENTED + { "value", LVT_UNSIGNED INT, offsetof(struct CameraOverride, value), false, LOT_NONE, 1, sizeof(unsigned int) }, }; #define LUA_CAMERA_STORED_INFO_FIELD_COUNT 4