From e32e288358ffcf35d45bd1c6f1912746cdbc3d37 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 28 Sep 2026 18:15:23 +0800 Subject: feat(p41): 夜帧船篷对比暗化 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- src/LivingVillage.Desktop/VillageArt.fs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/LivingVillage.Desktop') 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 -> () -- cgit v1.2.3