diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-28 18:15:23 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-28 18:15:23 +0800 |
| commit | e32e288358ffcf35d45bd1c6f1912746cdbc3d37 (patch) | |
| tree | 58d4c33a066877b53894a3c7e03e0cb0f6540fde /src/LivingVillage.Desktop/VillageArt.fs | |
| parent | 72cb75848dd56e2cb766cbf1df97dc1891667e1e (diff) | |
| download | living-village-e32e288358ffcf35d45bd1c6f1912746cdbc3d37.tar.gz | |
feat(p41): 夜帧船篷对比暗化
- VillageArt.drawCc0BoatOverlay 增加夜层专用暗化系数 0.7(仅夜光晕层生效,
白天不调用 overlay,p40-day/p40-boat 逐字节不变)
- P40ArtTests 新增 NightBoatAwningIsAtLeast40GreyDarkerThanSurroundingGlow:
内嵌 PNG 解码读取夜帧,断言船 2 瓦包围盒比 24px 光晕环至少暗 40 灰阶
- 新增 scripts/check-p40-night-boat-contrast.py 独立像素守卫
- 重出 docs/evidence/p40-night.png(contrast 103.2 >= 40)
Diffstat (limited to 'src/LivingVillage.Desktop/VillageArt.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/VillageArt.fs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/LivingVillage.Desktop/VillageArt.fs b/src/LivingVillage.Desktop/VillageArt.fs index 2b2b0e7..0f176aa 100644 --- a/src/LivingVillage.Desktop/VillageArt.fs +++ b/src/LivingVillage.Desktop/VillageArt.fs @@ -970,18 +970,26 @@ module VillageArt = for (rect, color) in lanternGlowLayers centerX centerY radiusPixels 8 255 214 150 peakAlpha do spriteBatch.Draw(pixel, rect, color) + let cc0BoatNightTintScale = 0.7f + let drawCc0BoatOverlay (spriteBatch: SpriteBatch) (textures: ArtTextures) (camera: XnaVector2) (map: MapGen.Result) (tint: XnaColor) = + let night = + XnaColor( + int (float32 tint.R * cc0BoatNightTintScale), + int (float32 tint.G * cc0BoatNightTintScale), + int (float32 tint.B * cc0BoatNightTintScale), + int tint.A) match textures.Cc0TileAtlas with | Some cc0 -> match cc0BoatTile map with | Some (boatX, boatY) -> - drawCc0Tile spriteBatch cc0 tint (cc0TileRect cc0TileIndexBoatLeft) (boatX * Sim.tilePixels - int camera.X) (boatY * Sim.tilePixels - int camera.Y) - drawCc0Tile spriteBatch cc0 tint (cc0TileRect cc0TileIndexBoatRight) ((boatX + 1) * Sim.tilePixels - int camera.X) (boatY * Sim.tilePixels - int camera.Y) + drawCc0Tile spriteBatch cc0 night (cc0TileRect cc0TileIndexBoatLeft) (boatX * Sim.tilePixels - int camera.X) (boatY * Sim.tilePixels - int camera.Y) + drawCc0Tile spriteBatch cc0 night (cc0TileRect cc0TileIndexBoatRight) ((boatX + 1) * Sim.tilePixels - int camera.X) (boatY * Sim.tilePixels - int camera.Y) | None -> () | None -> () |
