Skip to content

Commit

Permalink
Fix adding background tiles when tiles have buggy depth
Browse files Browse the repository at this point in the history
  • Loading branch information
myst6re committed Sep 2, 2023
1 parent 49d6771 commit a2583bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/field/BackgroundTextures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ UnusedSpaceInTexturePC BackgroundTexturesPC::findFirstUnusedSpaceInTextures(cons
const quint8 mask = size == 32 ? 0x7 : 0xF, move = size == 32 ? 3 : 4;

for (const Tile &tile: tiles) {
if (tile.depth == depth && tile.size == size) {
if (this->depth(tile) == depth && tile.size == size) {
quint8 num = (tile.srcX / size) | ((tile.srcY / size) << move);
if (!usedTiles.contains(tile.textureID)) {
usedTiles.insert(tile.textureID, QBitArray(size == 32 ? 64 : 256));
Expand Down

0 comments on commit a2583bc

Please sign in to comment.