Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ build*/
Build*/
.vs/
.vscode/
.idea/
out/
CMakeSettings.json

# Exceptions
.cache/
*.patch
*.patch
4 changes: 2 additions & 2 deletions Dependencies/libsodium/libsodium.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Solution.Util.CreateDep(dep.Name, dep.Dependencies, function()
Solution.Util.SetLibDirs(libPath)
Solution.Util.SetLinks(lib)
else
Solution.Util.SetLinks("libsodium")
Solution.Util.SetLinks("sodium")
end

Solution.Util.SetIncludes(dep.Path)
end)
end)
6 changes: 3 additions & 3 deletions Premake/ProjectUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ end

systemToExecutableExtensionMap =
{
windows = "exe",
linux = "sh"
windows = ".exe",
linux = ""
}

systemToDynamicLibExtensionMap =
Expand Down Expand Up @@ -490,4 +490,4 @@ if InitBuildSettings == nil then

BuildSettings:SetSilentFailOnDuplicateSetting(silentFailOnDuplicateSetting)
end
end
end
11 changes: 5 additions & 6 deletions Source/Base/Base/Util/StringUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ namespace StringUtils
{
i32 length = -1;

#ifdef _WIN32
length = sprintf_s(buffer, bufferSize, format, args...);
#else
(void)bufferSize; // Get rid of warning
length = sprintf(buffer, format, args...);
#endif
if constexpr (sizeof...(Args) == 0) {
length = std::snprintf(buffer, bufferSize, "%s", format);
} else {
length = std::snprintf(buffer, bufferSize, format, args...);
}

assert(length > -1);
return length;
Expand Down
3 changes: 1 addition & 2 deletions Source/FileFormat/FileFormat/Novus/ShaderPack/ShaderPack.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#pragma once
#include "ShaderPack.h"

#include <Base/Util/DebugHandler.h>
Expand Down Expand Up @@ -221,4 +220,4 @@ namespace FileFormat

return true;
}
}
}
4 changes: 1 addition & 3 deletions Source/Gameplay/Gameplay/Network/GameMessageRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ namespace Network
template <PacketConcept PacketStruct>
void UnregisterPacketHandler(OpcodeType opcode)
{
auto opcode = static_cast<OpcodeType>(PacketStruct::PACKET_ID);

GameMessageHandler& handler = _handlers[opcode];
handler.status = ConnectionStatus::None;
handler.minSize = 0;
Expand All @@ -78,4 +76,4 @@ namespace Network
private:
GameMessageHandler _handlers[(u16)MetaGen::PacketListEnum::Count];
};
}
}
4 changes: 2 additions & 2 deletions Source/Meta/Component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ M.EnumMetaData =
system =
{
"Base/Types.h",
"Array"
"array"
}
},

Expand Down Expand Up @@ -647,4 +647,4 @@ M.GameCommand =
end
}

return M
return M
8 changes: 5 additions & 3 deletions Source/Scripting/Scripting/Zenith.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <Base/Util/DebugHandler.h>

#include <cinttypes>

namespace Scripting
{
void Zenith::SetState(lua_State* newState)
Expand Down Expand Up @@ -366,7 +368,7 @@ namespace Scripting
{
f64 value = luaL_checknumber(zenith->state, index);
if (value < min || value > max)
luaL_error(zenith->state, "signed integer expected, got %f (Must be between %u...%u)", value, min, max);
luaL_error(zenith->state, "signed integer expected, got %f (Must be between %" PRId64 "...%" PRId64 ")", value, min, max);

i64 result = static_cast<i64>(value);
return result;
Expand All @@ -376,7 +378,7 @@ namespace Scripting
{
f64 value = luaL_checknumber(zenith->state, index);
if (value < 0 || value > max)
luaL_error(zenith->state, "unsigned integer expected, got %f (Must be between 0...%u)", value, max);
luaL_error(zenith->state, "unsigned integer expected, got %f (Must be between 0...%" PRId64 ")", value, max);

u64 result = static_cast<u64>(value);
return result;
Expand Down Expand Up @@ -758,4 +760,4 @@ namespace Scripting

return Get(it->second);
}
}
}