Skip to content

Commit

Permalink
Merge branch 'dev' into rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Oct 4, 2023
2 parents c023c0d + 91b9fb2 commit 9e8bd6a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions c-api/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t>(alt::CEvent::Type::SIZE);
}

uint8_t Core_GetBaseObjectTypeSize() {
return static_cast<uint8_t>(alt::IBaseObject::Type::SIZE);
}

uint8_t Core_GetVoiceConnectionState(alt::ICore* core)
{
return (uint8_t) core->GetVoiceConnectionState();
return static_cast<uint8_t>(core->GetVoiceConnectionState());
}

alt::IObject** Core_GetNetworkObjects(alt::ICore* core, uint64_t& size)
Expand Down
3 changes: 2 additions & 1 deletion c-api/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 5 additions & 3 deletions c-api/func_table.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -1049,12 +1049,13 @@ inline uint64_t capiHashes[] = {
13630176403103570557UL,
3926770362965932159UL,
7276494048261315747UL,
12468229273898885542UL,
11611786081777275389UL,
12434012012299018294UL,
14291068473487208197UL,
9480713887250028309UL,
16862996593036574459UL,
6921054663232355759UL,
13737530370025977174UL,
7482854450085275693UL,
2139798095052897524UL,
15652019729912249391UL,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9e8bd6a

Please sign in to comment.