From 7ce447294f5dcfd4e0977a8685ca6fd9514e1fff Mon Sep 17 00:00:00 2001 From: Piroska Gabor Date: Tue, 24 May 2022 19:47:24 +0200 Subject: [PATCH 1/3] I ran into an error while processing colored binary stl. Just a type but better be fixed. --- code/AssetLib/STL/STLLoader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/AssetLib/STL/STLLoader.cpp b/code/AssetLib/STL/STLLoader.cpp index 8de57f1ee..826e0678f 100644 --- a/code/AssetLib/STL/STLLoader.cpp +++ b/code/AssetLib/STL/STLLoader.cpp @@ -517,13 +517,13 @@ bool STLImporter::LoadBinaryFile() { const ai_real invVal((ai_real)1.0 / (ai_real)31.0); if (bIsMaterialise) // this is reversed { - clr->r = (color & 0x31u) * invVal; - clr->g = ((color & (0x31u << 5)) >> 5u) * invVal; - clr->b = ((color & (0x31u << 10)) >> 10u) * invVal; + clr->r = (color & 31u) * invVal; + clr->g = ((color & (31u << 5)) >> 5u) * invVal; + clr->b = ((color & (31u << 10)) >> 10u) * invVal; } else { - clr->b = (color & 0x31u) * invVal; - clr->g = ((color & (0x31u << 5)) >> 5u) * invVal; - clr->r = ((color & (0x31u << 10)) >> 10u) * invVal; + clr->b = (color & 31u) * invVal; + clr->g = ((color & (31u << 5)) >> 5u) * invVal; + clr->r = ((color & (31u << 10)) >> 10u) * invVal; } // assign the color to all vertices of the face *(clr + 1) = *clr; From ddc63119b53ddae69aafc01967ee226c9e05c95a Mon Sep 17 00:00:00 2001 From: Piroska Gabor Date: Thu, 26 May 2022 10:11:30 +0200 Subject: [PATCH 2/3] Using hex instead of decimal --- code/AssetLib/STL/STLLoader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/AssetLib/STL/STLLoader.cpp b/code/AssetLib/STL/STLLoader.cpp index 826e0678f..2087af850 100644 --- a/code/AssetLib/STL/STLLoader.cpp +++ b/code/AssetLib/STL/STLLoader.cpp @@ -517,13 +517,13 @@ bool STLImporter::LoadBinaryFile() { const ai_real invVal((ai_real)1.0 / (ai_real)31.0); if (bIsMaterialise) // this is reversed { - clr->r = (color & 31u) * invVal; - clr->g = ((color & (31u << 5)) >> 5u) * invVal; - clr->b = ((color & (31u << 10)) >> 10u) * invVal; + clr->r = (color & 0x1fu) * invVal; + clr->g = ((color & (0x1fu << 5)) >> 5u) * invVal; + clr->b = ((color & (0x1fu << 10)) >> 10u) * invVal; } else { - clr->b = (color & 31u) * invVal; - clr->g = ((color & (31u << 5)) >> 5u) * invVal; - clr->r = ((color & (31u << 10)) >> 10u) * invVal; + clr->b = (color & 0x1fu) * invVal; + clr->g = ((color & (0x1fu << 5)) >> 5u) * invVal; + clr->r = ((color & (0x1fu << 10)) >> 10u) * invVal; } // assign the color to all vertices of the face *(clr + 1) = *clr; From 15030fb7b14d50a20bc0a672549a59b3779bdb7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Jul 2022 07:37:31 +0000 Subject: [PATCH 3/3] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ccpp.yml | 4 ++-- .github/workflows/sanitizer.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index e9f148275..cfd4a7038 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -43,7 +43,7 @@ jobs: toolchain: ninja-vs-win64-cxx17 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: lukka/get-cmake@latest @@ -64,7 +64,7 @@ jobs: - name: Checkout Hunter toolchains if: endsWith(matrix.name, 'hunter') - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: cpp-pm/polly path: cmake/polly diff --git a/.github/workflows/sanitizer.yml b/.github/workflows/sanitizer.yml index e2cb1cf53..750c17005 100644 --- a/.github/workflows/sanitizer.yml +++ b/.github/workflows/sanitizer.yml @@ -11,7 +11,7 @@ jobs: name: adress-sanitizer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: lukka/get-cmake@latest - uses: lukka/set-shell-env@v1 with: @@ -35,7 +35,7 @@ jobs: name: undefined-behavior-sanitizer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: lukka/get-cmake@latest - uses: lukka/set-shell-env@v1 with: