diff --git a/c-api/core.cpp b/c-api/core.cpp index fdbb4fc..ebd5027 100644 --- a/c-api/core.cpp +++ b/c-api/core.cpp @@ -286,13 +286,17 @@ void Core_ToggleEvent(alt::ICore* core, uint8_t event, uint8_t state) { return core->ToggleEvent((alt::CEvent::Type) event, state); } -uint8_t Core_GetEventEnumSize() { - return (uint8_t) alt::CEvent::Type::SIZE; +uint8_t Core_GetEventTypeSize() { + return static_cast(alt::CEvent::Type::SIZE); +} + +uint8_t Core_GetBaseObjectTypeSize() { + return static_cast(alt::IBaseObject::Type::SIZE); } uint8_t Core_GetVoiceConnectionState(alt::ICore* core) { - return (uint8_t) core->GetVoiceConnectionState(); + return static_cast(core->GetVoiceConnectionState()); } alt::IObject** Core_GetNetworkObjects(alt::ICore* core, uint64_t& size) diff --git a/c-api/core.h b/c-api/core.h index 72ebeb5..b0e47fe 100644 --- a/c-api/core.h +++ b/c-api/core.h @@ -73,7 +73,8 @@ EXPORT_SHARED uint8_t Core_FileExists(alt::ICore* core, const char* path); EXPORT_SHARED const char* Core_FileRead(alt::ICore* core, const char* path, int32_t& size); EXPORT_SHARED alt::ICore* Core_GetCoreInstance(); EXPORT_SHARED void Core_ToggleEvent(alt::ICore* core, uint8_t event, uint8_t state); -EXPORT_SHARED uint8_t Core_GetEventEnumSize(); +EXPORT_SHARED uint8_t Core_GetEventTypeSize(); +EXPORT_SHARED uint8_t Core_GetBaseObjectTypeSize(); EXPORT_SHARED uint8_t Core_GetVoiceConnectionState(alt::ICore* core); EXPORT_SERVER uint8_t Core_SubscribeCommand(alt::ICore* core, const char* cmd, alt::CommandCallback cb); diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 37037e8..4245828 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -1,6 +1,6 @@ #include "func_table.h" -inline uint64_t capiHash = 1329516003325097705UL; +inline uint64_t capiHash = 3415677601440942791UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -1049,12 +1049,13 @@ inline uint64_t capiHashes[] = { 13630176403103570557UL, 3926770362965932159UL, 7276494048261315747UL, + 12468229273898885542UL, 11611786081777275389UL, 12434012012299018294UL, 14291068473487208197UL, 9480713887250028309UL, 16862996593036574459UL, - 6921054663232355759UL, + 13737530370025977174UL, 7482854450085275693UL, 2139798095052897524UL, 15652019729912249391UL, @@ -2784,12 +2785,13 @@ inline void* capiPointers[] = { (void*) Core_FileRead, (void*) Core_GetAllResources, (void*) Core_GetBaseObjectByID, + (void*) Core_GetBaseObjectTypeSize, (void*) Core_GetBlips, (void*) Core_GetBranch, (void*) Core_GetCheckpoints, (void*) Core_GetColShapes, (void*) Core_GetCoreInstance, - (void*) Core_GetEventEnumSize, + (void*) Core_GetEventTypeSize, (void*) Core_GetMarkers, (void*) Core_GetMetaData, (void*) Core_GetNetTime,