[Issue Report]: Player is rendered in front of the near side of the Cathedral entrance in the town

Author: peterkorodiCreated Sep 28, 2026Updated Sep 29, 2026

Operating System

Mac

DevilutionX version

1.5.5

Describe

When the player enters the Cathedral in Tristram, the near/front side of the Cathedral entrance does not correctly occlude the player during the animation.

The player sprite is rendered on top of part of the entrance that should visually be in the foreground.

To Reproduce

  1. Go to the Cathedral in the town
  2. Click on the Cathedral entrance: "Down to dungeon"
  3. During the walking animation, you can see the z-ordering issue just before the dungeon starts loading.

Expected Behavior

When the player walks into the Cathedral entrance, the near side of the entrance should be rendered after the player sprite, so the player correctly disappears behind the arch. The ground at the bottom of the level piece must remain behind the player.

Additional context

Current version (z-ordering issue): Image

Used tile: Image

Possible solution: Add cathedralarch.clx 64x256 px image to the levels/towndata/:

Image

in the LoadLvlGFX() function add an extra .clx file to the pSpecialCels. In InitTownPieces() function, assign this frame to the dSpecial[25][30] special tileset. Then render the special tileset using the traditional way. For the tree leaves rendering, I would introduce a new dOverlay other special tileset and render it the same way they are rendered now.:

cpp
if (tilePosition.x > 0 && tilePosition.y > 0 && targetBufferPosition.y > TILE_HEIGHT) {
    // Tree leaves should always cover player when entering or leaving the tile,
    // So delay the rendering until after the next row is being drawn.
    // This could probably have been better solved by sprites in screen space.
    const int8_t bArch = dSpecial[tilePosition.x - 1][tilePosition.y - 1] - 1;
    if (bArch >= 0)
        ClxDraw(out, targetBufferPosition + Displacement { 0, -TILE_HEIGHT }, (*pSpecialCels)[bArch]);
}

Expected behavior: Image

If this solution is acceptable, I’d be happy to implement it and create a PR.