Codechange: make TransparencyOption a scoped enum

This commit is contained in:
Peter Nelson
2026-05-31 18:59:51 +01:00
committed by Peter Nelson
parent a144bf2f8b
commit 0e951f3528
23 changed files with 108 additions and 109 deletions
+2 -2
View File
@@ -650,7 +650,7 @@ static void DrawTile_Trees(TileInfo *ti)
}
/* Do not draw trees when the invisible trees setting is set */
if (IsInvisibilitySet(TO_TREES)) return;
if (IsInvisibilitySet(TransparencyOption::Trees)) return;
uint tmp = CountBits(ti->tile.base() + ti->x + ti->y);
uint index = GB(tmp, 0, 2) + (GetTreeType(ti->tile) << 2);
@@ -702,7 +702,7 @@ static void DrawTile_Trees(TileInfo *ti)
}
SpriteBounds bounds{{}, {TILE_SIZE, TILE_SIZE, 48}, {te[mi].x, te[mi].y, 0}};
AddSortableSpriteToDraw(te[mi].sprite, te[mi].pal, ti->x, ti->y, z, bounds, IsTransparencySet(TO_TREES));
AddSortableSpriteToDraw(te[mi].sprite, te[mi].pal, ti->x, ti->y, z, bounds, IsTransparencySet(TransparencyOption::Trees));
/* replace the removed one with the last one */
te[mi] = te[trees - 1];