diff options
Diffstat (limited to 'engines/sword2/render.cpp')
-rw-r--r-- | engines/sword2/render.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp index 1a8dcdab16..99295be571 100644 --- a/engines/sword2/render.cpp +++ b/engines/sword2/render.cpp @@ -731,8 +731,8 @@ int32 Screen::initialisePsxParallaxLayer(byte *parallax) { data = parallax + xTiles * yTiles * 4; _xBlocks[_layer] = xTiles; - _yBlocks[_layer] = (yTiles / 2) + (yTiles % 2 ? 1 : 0); - bool oddTiles = (yTiles % 2 ? true : false); + _yBlocks[_layer] = (yTiles / 2) + ((yTiles % 2) ? 1 : 0); + bool oddTiles = ((yTiles % 2) ? true : false); _blockSurfaces[_layer] = (BlockSurface **)calloc(_xBlocks[_layer] * _yBlocks[_layer], sizeof(BlockSurface *)); if (!_blockSurfaces[_layer]) |