Make smlua_model_util_get_id return ModelExtendedId

This commit is contained in:
Agent X 2024-06-07 20:33:44 -04:00
parent a04aa4c240
commit 9dcbef97eb
4 changed files with 6 additions and 6 deletions

View File

@ -8389,7 +8389,7 @@ function set_window_title(title)
end end
--- @param name string --- @param name string
--- @return integer --- @return ModelExtendedId
function smlua_model_util_get_id(name) function smlua_model_util_get_id(name)
-- ... -- ...
end end

View File

@ -3034,7 +3034,7 @@
## [smlua_model_util_get_id](#smlua_model_util_get_id) ## [smlua_model_util_get_id](#smlua_model_util_get_id)
### Lua Example ### Lua Example
`local integerValue = smlua_model_util_get_id(name)` `local enumValue = smlua_model_util_get_id(name)`
### Parameters ### Parameters
| Field | Type | | Field | Type |
@ -3042,10 +3042,10 @@
| name | `string` | | name | `string` |
### Returns ### Returns
- `integer` [enum ModelExtendedId](constants.md#enum-ModelExtendedId)
### C Prototype ### C Prototype
`u32 smlua_model_util_get_id(const char* name);` `enum ModelExtendedId smlua_model_util_get_id(const char* name);`
[:arrow_up_small:](#) [:arrow_up_small:](#)

View File

@ -493,7 +493,7 @@ u16 smlua_model_util_load(enum ModelExtendedId extId) {
return (u16)id; return (u16)id;
} }
u32 smlua_model_util_get_id(const char* name) { enum ModelExtendedId smlua_model_util_get_id(const char* name) {
// find geolayout // find geolayout
const void* asset = dynos_geolayout_get(name); const void* asset = dynos_geolayout_get(name);
if (asset == NULL) { if (asset == NULL) {

View File

@ -398,6 +398,6 @@ enum ModelExtendedId {
void smlua_model_util_clear(void); void smlua_model_util_clear(void);
void smlua_model_util_store_in_slot(u32 slot, const char* name); void smlua_model_util_store_in_slot(u32 slot, const char* name);
u16 smlua_model_util_load(enum ModelExtendedId extId); u16 smlua_model_util_load(enum ModelExtendedId extId);
u32 smlua_model_util_get_id(const char* name); enum ModelExtendedId smlua_model_util_get_id(const char* name);
#endif #endif