diff --git a/src/Chat.h b/src/Chat.h index 01663d363..21a68558d 100644 --- a/src/Chat.h +++ b/src/Chat.h @@ -58,8 +58,8 @@ void Chat_SetLogName(const cc_string* name); /* Disables chat logging and closes currently open chat log file. */ void Chat_DisableLogging(void); /* Sends a chat message, raising ChatEvents.ChatSending event. */ -/* NOTE: If logUsage is true, can press 'up' in chat input menu later to retype this. */ -/* NOTE: /client is always interpreted as client-side commands. */ +/* NOTE: If logUsage is true, can press 'up' in chat input menu later to retype this. */ +/* NOTE: /client is always interpreted as client-side commands. */ /* In multiplayer this is sent to the server, in singleplayer just Chat_Add. */ CC_API void Chat_Send(const cc_string* text, cc_bool logUsage); /* Shorthand for Chat_AddOf(str, MSG_TYPE_NORMAL) */ diff --git a/src/Entity.h b/src/Entity.h index c6a0ced11..d98424c89 100644 --- a/src/Entity.h +++ b/src/Entity.h @@ -169,11 +169,11 @@ CC_API void TabList_Remove(EntityID id); CC_API void TabList_Set(EntityID id, const cc_string* player, const cc_string* list, const cc_string* group, cc_uint8 rank); /* Raw unformatted name (for Tab name auto complete) */ -#define TabList_UNSAFE_GetPlayer(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 3); +#define TabList_UNSAFE_GetPlayer(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 3) /* Formatted name for display in tab list. */ -#define TabList_UNSAFE_GetList(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 2); +#define TabList_UNSAFE_GetList(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 2) /* Name of the group this entry is in (e.g. rank name, map name) */ -#define TabList_UNSAFE_GetGroup(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 1); +#define TabList_UNSAFE_GetGroup(id) StringsBuffer_UNSAFE_Get(&TabList._buffer, TabList.NameOffsets[id] - 1) /* Represents another entity in multiplayer */ struct NetPlayer { diff --git a/src/Platform_WinApi.c b/src/Platform_WinApi.c index 223e32dde..f6ecd4a75 100644 --- a/src/Platform_WinApi.c +++ b/src/Platform_WinApi.c @@ -483,13 +483,13 @@ cc_result Socket_Connect(cc_socket* s, const cc_string* address, int port) { } cc_result Socket_Read(cc_socket s, cc_uint8* data, cc_uint32 count, cc_uint32* modified) { - int recvCount = recv(s, data, count, 0); + int recvCount = recv(s, (char*)data, count, 0); if (recvCount != -1) { *modified = recvCount; return 0; } *modified = 0; return WSAGetLastError(); } cc_result Socket_Write(cc_socket s, const cc_uint8* data, cc_uint32 count, cc_uint32* modified) { - int sentCount = send(s, data, count, 0); + int sentCount = send(s, (const char*)data, count, 0); if (sentCount != -1) { *modified = sentCount; return 0; } *modified = 0; return WSAGetLastError(); } diff --git a/src/Utils.c b/src/Utils.c index 5151e8608..c2b9bd22f 100644 --- a/src/Utils.c +++ b/src/Utils.c @@ -173,6 +173,7 @@ int Convert_ToBase64(const void* data, int len, char* dst) { return (int)(dst - beg); } +/* Maps a base 64 character back into a 6 bit integer */ CC_NOINLINE static int DecodeBase64(char c) { if (c >= 'A' && c <= 'Z') return (c - 'A'); if (c >= 'a' && c <= 'z') return (c - 'a') + 26; diff --git a/src/_PlatformBase.h b/src/_PlatformBase.h index 19eba1fb8..3b599f24d 100644 --- a/src/_PlatformBase.h +++ b/src/_PlatformBase.h @@ -3,7 +3,6 @@ #include "Logger.h" #include "Constants.h" - /*########################################################################################################################* *---------------------------------------------------------Memory----------------------------------------------------------* *#########################################################################################################################*/