diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 14a3f4e..0797234 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 = 5316421578343678696UL; +inline uint64_t capiHash = 10340967010520350397UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -482,6 +482,7 @@ inline uint64_t capiHashes[] = { 7285942813518470950UL, 1117662078157381260UL, 9560528769032004812UL, + 13206342625351776081UL, 14268893542560810008UL, 3255950788253963043UL, 16182899257589323539UL, @@ -491,10 +492,11 @@ inline uint64_t capiHashes[] = { 16837975631170049766UL, 17030953846480430905UL, 7856663484428066825UL, + 15158102510225914020UL, 4739364089865431579UL, 4358271132564072471UL, 7499702612373464399UL, - 18153641274402744534UL, + 12048596999299004349UL, 4102368831198906004UL, 7739810354326755506UL, 12723661681621738686UL, @@ -2297,6 +2299,7 @@ inline void* capiPointers[] = { (void*) InteriorPortal_GetEntityPosition, (void*) InteriorPortal_GetEntityRotation, (void*) InteriorPortal_GetFlag, + (void*) InteriorPortal_GetIndex, (void*) InteriorPortal_GetRoomFrom, (void*) InteriorPortal_GetRoomTo, (void*) InteriorPortal_SetCornerPosition, @@ -2306,10 +2309,11 @@ inline void* capiPointers[] = { (void*) InteriorPortal_SetRoomTo, (void*) InteriorRoom_GetExtents, (void*) InteriorRoom_GetFlag, + (void*) InteriorRoom_GetIndex, (void*) InteriorRoom_GetName, (void*) InteriorRoom_GetNameHash, (void*) InteriorRoom_GetTimecycle, - (void*) InteriorRoom_SetEntitiesExtents, + (void*) InteriorRoom_SetExtents, (void*) InteriorRoom_SetFlag, (void*) InteriorRoom_SetTimecycle, (void*) LocalObject_ActivatePhysics, diff --git a/c-api/interior_portal.cpp b/c-api/interior_portal.cpp index d974639..e864844 100644 --- a/c-api/interior_portal.cpp +++ b/c-api/interior_portal.cpp @@ -6,6 +6,11 @@ CAPI_START() #ifdef ALT_CLIENT_API +uint32_t InteriorPortal_GetIndex(uint32_t interiorId, uint32_t portalIndex) +{ + auto portal = GetInteriorPortal(interiorId, portalIndex); + return portal->GetIndex(); +} uint16_t InteriorPortal_GetCornerCount(uint32_t interiorId, uint32_t portalIndex) { diff --git a/c-api/interior_portal.h b/c-api/interior_portal.h index b6e76f4..5a10669 100644 --- a/c-api/interior_portal.h +++ b/c-api/interior_portal.h @@ -22,6 +22,7 @@ #pragma clang diagnostic pop #endif +EXPORT_CLIENT uint32_t InteriorPortal_GetIndex(uint32_t interiorId, uint32_t portalIndex); EXPORT_CLIENT uint16_t InteriorPortal_GetCornerCount(uint32_t interiorId, uint32_t portalIndex); EXPORT_CLIENT alt::Position InteriorPortal_GetCornerPosition(uint32_t interiorId, uint32_t portalIndex, uint32_t cornerIndex); EXPORT_CLIENT uint32_t InteriorPortal_GetRoomFrom(uint32_t interiorId, uint32_t portalIndex); diff --git a/c-api/interior_room.cpp b/c-api/interior_room.cpp index 43daee8..1ece9d4 100644 --- a/c-api/interior_room.cpp +++ b/c-api/interior_room.cpp @@ -7,6 +7,12 @@ CAPI_START() #ifdef ALT_CLIENT_API +uint32_t InteriorRoom_GetIndex(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex) +{ + auto room = GetInteriorRoom(interiorId, roomValue, isIndex); + return room->GetIndex(); +} + const char* InteriorRoom_GetName(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, int32_t& size) { auto room = GetInteriorRoom(interiorId, roomValue, isIndex); @@ -52,7 +58,7 @@ void InteriorRoom_SetTimecycle(uint32_t interiorId, uint32_t roomValue, uint8_t room->SetTimecycle(timecycle); } -void InteriorRoom_SetEntitiesExtents(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, position_t min, +void InteriorRoom_SetExtents(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, position_t min, position_t max) { auto room = GetInteriorRoom(interiorId, roomValue, isIndex); diff --git a/c-api/interior_room.h b/c-api/interior_room.h index 83800b8..bf4b8d2 100644 --- a/c-api/interior_room.h +++ b/c-api/interior_room.h @@ -22,6 +22,7 @@ #pragma clang diagnostic pop #endif +EXPORT_CLIENT uint32_t InteriorRoom_GetIndex(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex); EXPORT_CLIENT const char* InteriorRoom_GetName(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, int32_t& size); EXPORT_CLIENT uint32_t InteriorRoom_GetNameHash(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex); EXPORT_CLIENT int32_t InteriorRoom_GetFlag(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex); @@ -31,7 +32,7 @@ EXPORT_CLIENT void InteriorRoom_GetExtents(uint32_t interiorId, uint32_t roomVal EXPORT_CLIENT void InteriorRoom_SetFlag(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, int32_t flag); EXPORT_CLIENT void InteriorRoom_SetTimecycle(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, uint32_t timecycle); -EXPORT_CLIENT void InteriorRoom_SetEntitiesExtents(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, position_t min, position_t max); +EXPORT_CLIENT void InteriorRoom_SetExtents(uint32_t interiorId, uint32_t roomValue, uint8_t isIndex, position_t min, position_t max); #ifdef ALT_CLIENT_API