From da3d080a8fe30114de63dfbcc3de2bbd78ff7fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Leclaire-Fournier?= Date: Wed, 31 Jan 2024 19:06:13 -0500 Subject: [PATCH] Fix les couleurs --- GPA675Lab1GOL/GOLTeamH.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GPA675Lab1GOL/GOLTeamH.cpp b/GPA675Lab1GOL/GOLTeamH.cpp index 3e1e535..3f2d1cb 100644 --- a/GPA675Lab1GOL/GOLTeamH.cpp +++ b/GPA675Lab1GOL/GOLTeamH.cpp @@ -379,13 +379,13 @@ void GOLTeamH::setSolidColor(State state, Color const& color) mDeadColor = color; mColorEncoded &= 0; // Clear - mColorEncoded |= ((static_cast(mAliveColor.red) << 16) << 32 * static_cast(state)); - mColorEncoded |= ((static_cast(mAliveColor.green) << 8) << 32 * static_cast(state)); - mColorEncoded |= (static_cast(mAliveColor.blue) << 32 * static_cast(state)); + mColorEncoded |= (static_cast(mAliveColor.red) << 16) << 32; + mColorEncoded |= (static_cast(mAliveColor.green) << 8) << 32; + mColorEncoded |= static_cast(mAliveColor.blue) << 32; - mColorEncoded |= ((static_cast(mDeadColor.red) << 16) * static_cast(state)); - mColorEncoded |= ((static_cast(mDeadColor.green) << 8) * static_cast(state)); - mColorEncoded |= (static_cast(mDeadColor.blue) * static_cast(state)); + mColorEncoded |= (static_cast(mDeadColor.red) << 16); + mColorEncoded |= (static_cast(mDeadColor.green) << 8); + mColorEncoded |= static_cast(mDeadColor.blue); }