diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryCommon.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryCommon.cpp index 0cc37f52d..d9cb8f390 100644 --- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryCommon.cpp +++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryCommon.cpp @@ -24,7 +24,7 @@ class UNoiseSeed : public UniformGroup void update(bool _force) override { u32 counter = dwnd().getBuffersSwapCount(); - uNoiseSeed.set(counter & 0xff, _force); + uNoiseSeed.set(static_cast(counter & 0xff), _force); } private: diff --git a/src/GraphicsDrawer.cpp b/src/GraphicsDrawer.cpp index 0aedcff7b..1086da529 100644 --- a/src/GraphicsDrawer.cpp +++ b/src/GraphicsDrawer.cpp @@ -238,8 +238,8 @@ void GraphicsDrawer::_updateViewport(const FrameBuffer* _pBuffer, const f32 scal scaleX = scaleY = scale; } if (pCurrentBuffer != nullptr) { - X = roundup(pCurrentBuffer->m_originX, scaleX); - Y = roundup(pCurrentBuffer->m_originY, scaleY); + X = roundup(static_cast(pCurrentBuffer->m_originX), scaleX); + Y = roundup(static_cast(pCurrentBuffer->m_originY), scaleY); } WIDTH = roundup(SCREEN_SIZE_DIM, scaleX); HEIGHT = roundup(SCREEN_SIZE_DIM, scaleY); diff --git a/src/uCodes/F3DEX3.cpp b/src/uCodes/F3DEX3.cpp index a84afc75e..056c23f17 100644 --- a/src/uCodes/F3DEX3.cpp +++ b/src/uCodes/F3DEX3.cpp @@ -83,7 +83,7 @@ static void writeLight(int off, u32 w) gSPLookAt(w - (sizeof(F3DEX3_LookAtOld) - sizeof(F3DEX3_LookAt)) + sizeof(F3DEX3_LookAt), 1); } - for (int i = 1; i <= gSP.numLights; i++) + for (u32 i = 1; i <= gSP.numLights; i++) { if (_LIGHT_TO_OFFSET(i) == off) { @@ -115,7 +115,7 @@ void F3DEX3_MoveMem(u32 w0, u32 w1) { const u32 ofs = _SHIFTR(w0, 8, 8) * 8; const u32 len = (1 + _SHIFTR(w0, 19, 5)) * 8; - for (int i = 0; i < len; i += 4) + for (u32 i = 0; i < len; i += 4) { writeLight(ofs + i, w1 + i); }