Skip to content

Commit

Permalink
Fix compilation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonetz committed Sep 8, 2024
1 parent a388812 commit f4b0755
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<f32>(counter & 0xff), _force);
}

private:
Expand Down
4 changes: 2 additions & 2 deletions src/GraphicsDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<f32>(pCurrentBuffer->m_originX), scaleX);
Y = roundup(static_cast<f32>(pCurrentBuffer->m_originY), scaleY);
}
WIDTH = roundup(SCREEN_SIZE_DIM, scaleX);
HEIGHT = roundup(SCREEN_SIZE_DIM, scaleY);
Expand Down
4 changes: 2 additions & 2 deletions src/uCodes/F3DEX3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f4b0755

Please sign in to comment.