mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Enabled multithreaded compilation and fixed some build warnings
Enabled MT compilation for all first party TUs and some third party ones too. Disabled specific warnings in third party code, started fixing warnings in first party code as well
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Stick to floor step down");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StickToFloorStepDown", &component.StickToFloorStepDown.y, -10.0f, 0.01, 0.0f);
|
||||
ImGui::DragFloat("##StickToFloorStepDown", &component.StickToFloorStepDown.y, -10.0f, 0.01f, 0.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.StickToFloorStepDown.y, -0.5f);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Step down extra");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StepDownExtra", &component.StepDownExtra.y, -10.0f, 0.01, 0.0f);
|
||||
ImGui::DragFloat("##StepDownExtra", &component.StepDownExtra.y, -10.0f, 0.01f, 0.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.StepDownExtra.y, 0.0f);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Step up");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StepUp", &component.SteppingStepUp.y, 0.0f, 0.01, 10.0f);
|
||||
ImGui::DragFloat("##StepUp", &component.SteppingStepUp.y, 0.0f, 0.01f, 10.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.SteppingStepUp.y, 0.4f);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ ImGui::Text(##name);
|
||||
bool removed = false; \
|
||||
bool headerOpened = ImGui::CollapsingHeader(#name, ImGuiTreeNodeFlags_DefaultOpen); \
|
||||
ImGui::PopStyleVar(); \
|
||||
if (#name != "TRANSFORM" && ImGui::BeginPopupContextItem()) \
|
||||
if (strcmp(#name, "TRANSFORM") != 0 && ImGui::BeginPopupContextItem()) \
|
||||
{ \
|
||||
if (ImGui::Selectable("Remove")) { removed = true; } \
|
||||
ImGui::EndPopup(); \
|
||||
@@ -42,7 +42,7 @@ ImGui::Text(##name);
|
||||
{ \
|
||||
delete boldFont; \
|
||||
ImGui::PopStyleVar(); \
|
||||
ImGui::Indent(); \
|
||||
ImGui::Indent(); \
|
||||
if (ImGui::BeginTable(#name, 3, ImGuiTableFlags_SizingStretchProp)) \
|
||||
{ \
|
||||
ImGui::TableSetupColumn("name", 0, 0.25f); \
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
auto animations = model->GetAnimations();
|
||||
if (ImGui::BeginCombo("Type", model->GetCurrentAnimation()->GetName().c_str()))
|
||||
{
|
||||
for (int n = 0; n < model->GetAnimationsCount(); n++)
|
||||
for (uint32_t n = 0; n < model->GetAnimationsCount(); n++)
|
||||
{
|
||||
bool is_selected = (animIndex == n);
|
||||
std::string animName = animations[n]->GetName();
|
||||
|
||||
@@ -6,7 +6,7 @@ void ImGuiTextSTD(const std::string& label, std::string& value)
|
||||
{
|
||||
char buffer[256];
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
std::strncpy(buffer, value.c_str(), sizeof(buffer));
|
||||
strncpy_s(buffer, value.c_str(), sizeof(buffer));
|
||||
if (ImGui::InputText(label.c_str(), buffer, sizeof(buffer)))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ void ImGuiTextMultiline(const std::string& label, std::string& value)
|
||||
{
|
||||
char buffer[256];
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
std::strncpy(buffer, value.c_str(), sizeof(buffer));
|
||||
strncpy_s(buffer, value.c_str(), sizeof(buffer));
|
||||
if (ImGui::InputTextMultiline(label.c_str(), buffer, sizeof(buffer)))
|
||||
{
|
||||
value = std::string(buffer);
|
||||
|
||||
@@ -645,12 +645,12 @@ namespace Nuake {
|
||||
float frameTime = 1000.0f / io.Framerate;
|
||||
int fps = (int)io.Framerate;
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1, 0.1, 0.1, 1));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1f, 0.1f, 0.1f, 1));
|
||||
ImGui::BeginChild("FPS", ImVec2(70, 30), false);
|
||||
|
||||
std::string text = std::to_string(fps) + " fps";
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetContentRegionAvail().x / 1.25 - ImGui::CalcTextSize(text.c_str()).x
|
||||
- ImGui::GetScrollX() - 2 * ImGui::GetStyle().ItemSpacing.x);
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetContentRegionAvail().x / 1.25f - ImGui::CalcTextSize(text.c_str()).x
|
||||
- ImGui::GetScrollX() - 2.f * ImGui::GetStyle().ItemSpacing.x);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 15 - (ImGui::CalcTextSize(text.c_str()).y) / 2.0);
|
||||
ImGui::Text(text.c_str());
|
||||
|
||||
@@ -953,9 +953,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(SKY);
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1169,9 +1169,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(BLOOM)
|
||||
if (ImGui::BeginTable("BloomTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1236,9 +1236,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(VOLUMETRIC)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1318,9 +1318,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(SSAO)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1810,9 +1810,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(BARREL_DISTORTION)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
{
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
@@ -77,7 +77,7 @@ void EditorSelectionPanel::Draw(EditorSelection selection)
|
||||
ImGui::SetCursorPosX((windowWidth - textWidth) * 0.5f);
|
||||
ImGui::SetCursorPosY((windowHeight - textHeight) * 0.5f);
|
||||
|
||||
ImGui::TextColored({1, 0.1, 0.1, 1.0}, text.c_str());
|
||||
ImGui::TextColored({1.f, 0.1f, 0.1f, 1.0f}, text.c_str());
|
||||
}
|
||||
|
||||
DrawFile(selection.File);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Nuake
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1, 0.1, 0.1, 0.2f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1f, 0.1f, 0.1f, 0.2f));
|
||||
ImGui::BeginChild("TemplateContainer", { ImGui::GetContentRegionAvail().x - 64.0f, ImGui::GetContentRegionAvail().y }, true, ImGuiChildFlags_AlwaysUseWindowPadding);
|
||||
{
|
||||
ImGui::Dummy({ 4, 4 });
|
||||
@@ -94,7 +94,7 @@ namespace Nuake
|
||||
if (showTitleEmptyWarning && projectTitle.empty())
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored({ 1.0, 0.1, 0.1, 1.0 }, ICON_FA_EXCLAMATION_TRIANGLE);
|
||||
ImGui::TextColored({ 1.0f, 0.1f, 0.1f, 1.0f }, ICON_FA_EXCLAMATION_TRIANGLE);
|
||||
|
||||
Nuake::UI::Tooltip("Title required");
|
||||
}
|
||||
|
||||
@@ -184,11 +184,11 @@ void ProjectSettingsCategoryPhysics::Draw()
|
||||
Engine::SetPhysicsStep(Engine::GetProject()->Settings.PhysicsStep);
|
||||
}
|
||||
|
||||
ImGui::DragInt("Maximum SubSteps", &Engine::GetProject()->Settings.MaxPhysicsSubStep, 1.0f, 8.0f, 128);
|
||||
ImGui::DragInt("Maximum SubSteps", &Engine::GetProject()->Settings.MaxPhysicsSubStep, 1, 8, 128);
|
||||
|
||||
ImGui::DragInt("Maximum Bodies", &Engine::GetProject()->Settings.MaxPhysicsBodies, 1.0f, 256.0f, 8000);
|
||||
ImGui::DragInt("Maximum Body Pair", &Engine::GetProject()->Settings.MaxPhysicsBodyPair, 1.0f, 256.0f, 4096.0f);
|
||||
ImGui::DragInt("Maximum Contact Constraint", &Engine::GetProject()->Settings.MaxPhysicsContactConstraints, 1.0f, 256.0f, 4096.0f);
|
||||
ImGui::DragInt("Maximum Bodies", &Engine::GetProject()->Settings.MaxPhysicsBodies, 1.0f, 256, 8000);
|
||||
ImGui::DragInt("Maximum Body Pair", &Engine::GetProject()->Settings.MaxPhysicsBodyPair, 1.0f, 256, 4096);
|
||||
ImGui::DragInt("Maximum Contact Constraint", &Engine::GetProject()->Settings.MaxPhysicsContactConstraints, 1.0f, 256, 4096);
|
||||
}
|
||||
|
||||
ProjectSettingsCategoryAudio::ProjectSettingsCategoryAudio(Ref<Nuake::Project> project) :
|
||||
|
||||
Reference in New Issue
Block a user