diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 347b418ae..00b614b26 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -594,7 +594,7 @@ void SavePreLighting() memcpy(dPreLight, dLight, sizeof(dPreLight)); } -void ActivateVision(Point position, int r, int id) +void ActivateVision(Point position, int r, size_t id) { auto &vision = VisionList[id]; vision.position.tile = position; @@ -606,7 +606,7 @@ void ActivateVision(Point position, int r, int id) UpdateVision = true; } -void ChangeVisionRadius(int id, int r) +void ChangeVisionRadius(size_t id, int r) { auto &vision = VisionList[id]; vision.hasChanged = true; @@ -616,7 +616,7 @@ void ChangeVisionRadius(int id, int r) UpdateVision = true; } -void ChangeVisionXY(int id, Point position) +void ChangeVisionXY(size_t id, Point position) { auto &vision = VisionList[id]; vision.hasChanged = true; diff --git a/Source/lighting.h b/Source/lighting.h index cb8c65607..f4404a067 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -74,9 +74,9 @@ void ChangeLightOffset(int i, DisplacementOf offset); void ChangeLight(int i, Point position, uint8_t radius); void ProcessLightList(); void SavePreLighting(); -void ActivateVision(Point position, int r, int id); -void ChangeVisionRadius(int id, int r); -void ChangeVisionXY(int id, Point position); +void ActivateVision(Point position, int r, size_t id); +void ChangeVisionRadius(size_t id, int r); +void ChangeVisionXY(size_t id, Point position); void ProcessVisionList(); void lighting_color_cycling(); diff --git a/Source/multi.cpp b/Source/multi.cpp index 9f117aae2..c9a3ec36b 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -192,7 +192,7 @@ void CheckPlayerInfoTimeouts() } } -void SendPacket(int playerId, const std::byte *packet, size_t size) +void SendPacket(size_t playerId, const std::byte *packet, size_t size) { TPkt pkt; @@ -200,7 +200,7 @@ void SendPacket(int playerId, const std::byte *packet, size_t size) const size_t sizeWithheader = size + sizeof(pkt.hdr); pkt.hdr.wLen = SDL_SwapLE16(static_cast(sizeWithheader)); memcpy(pkt.body, packet, size); - if (!SNetSendMessage(playerId, &pkt.hdr, sizeWithheader)) + if (!SNetSendMessage(static_cast(playerId), &pkt.hdr, sizeWithheader)) nthread_terminate_game("SNetSendMessage0"); } @@ -495,7 +495,7 @@ void InitGameInfo() sgGameInitInfo.fullQuests = (!gbIsMultiplayer || *sgOptions.Gameplay.multiplayerFullQuests) ? 1 : 0; } -void NetSendLoPri(int playerId, const std::byte *data, size_t size) +void NetSendLoPri(size_t playerId, const std::byte *data, size_t size) { if (data != nullptr && size != 0) { CopyPacket(&lowPriorityBuffer, data, size); @@ -503,7 +503,7 @@ void NetSendLoPri(int playerId, const std::byte *data, size_t size) } } -void NetSendHiPri(int playerId, const std::byte *data, size_t size) +void NetSendHiPri(size_t playerId, const std::byte *data, size_t size) { if (data != nullptr && size != 0) { CopyPacket(&highPriorityBuffer, data, size); diff --git a/Source/multi.h b/Source/multi.h index bc8c5c804..efcaabb58 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -56,8 +56,8 @@ extern uint32_t player_state[MAX_PLRS]; extern bool IsLoopback; void InitGameInfo(); -void NetSendLoPri(int playerId, const std::byte *data, size_t size); -void NetSendHiPri(int playerId, const std::byte *data, size_t size); +void NetSendLoPri(size_t playerId, const std::byte *data, size_t size); +void NetSendHiPri(size_t playerId, const std::byte *data, size_t size); void multi_send_msg_packet(uint32_t pmask, const std::byte *data, size_t size); void multi_msg_countdown(); void multi_player_left(int pnum, int reason);