diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 11:17:39 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 11:17:39 +0800 |
| commit | da11e3507f63b9126d534399e9b29fc2615ed481 (patch) | |
| tree | 82643fb1679f1d8bee8731e0ca4847027a151ed0 /src | |
| parent | 1b0724d62baa3cf5598d374268e7eb09b5dde4b4 (diff) | |
| download | living-village-da11e3507f63b9126d534399e9b29fc2615ed481.tar.gz | |
feat(desktop): P28 民居第二变体强化配色与轮廓(青灰挑檐色阶 + 竖长格栅窗 + 绿院门)
- make-jiangnan-art.py slot 28/29/30:B 变体改用亮青灰瓦色阶、竖长木格栅窗、绿双扇院门
- VillageArt 变体 B 渲染:挑檐多叠一层、向两侧各出一格(水面之上不叠),墙身统一格栅窗
- 仅绘制分支,瓦片/可达性零改动
Diffstat (limited to 'src')
| -rw-r--r-- | src/LivingVillage.Desktop/Assets/jiangnan-world.png | bin | 4468 -> 4492 bytes | |||
| -rw-r--r-- | src/LivingVillage.Desktop/VillageArt.fs | 23 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/LivingVillage.Desktop/Assets/jiangnan-world.png b/src/LivingVillage.Desktop/Assets/jiangnan-world.png Binary files differindex 11145a8..b67dd01 100644 --- a/src/LivingVillage.Desktop/Assets/jiangnan-world.png +++ b/src/LivingVillage.Desktop/Assets/jiangnan-world.png diff --git a/src/LivingVillage.Desktop/VillageArt.fs b/src/LivingVillage.Desktop/VillageArt.fs index d2fcc1a..9a56de4 100644 --- a/src/LivingVillage.Desktop/VillageArt.fs +++ b/src/LivingVillage.Desktop/VillageArt.fs @@ -612,7 +612,8 @@ module VillageArt = spriteBatch.Draw(pixel, XnaRectangle(x, y, max 1 w, max 1 h), color) /// P26 民居立面变体:按位置确定性交替两种立面(沿河沿路分布)。 - /// 0 = 黛瓦脊 + 木墙/窗 + 门(P24 原样);1 = 挑檐挑出 + 木格栅窗 + 院门。 + /// 0 = 黛瓦脊 + 木墙/窗 + 门(P24 原样);1 = 亮青灰挑檐(多叠一层、向两侧各出一格)+ + /// 竖长木格栅窗 + 绿院门(P28 强化配色与轮廓,保证 512 整图 ~2px/tile 下两变体可分)。 /// 纯函数、不改变任何瓦片/可达性语义;64x48 与 256x192 的 tiles checksum 不受影响。 let houseFacadeVariant (building: MapGen.Building) : int = let remainder = (building.Left + building.Top) % 2 @@ -649,14 +650,22 @@ module VillageArt = else WallWoodSprite drawCell wallSprite x building.DoorY | _ -> - // 变体 B(P26):挑檐向两侧各出一格 + 木格栅窗 + 院门。 - for x in (left - 1) .. (right + 1) do - drawCell RoofEaveOverhangSprite x building.Top + // 变体 B(P26/P28):亮青灰挑檐向两侧各出一格 + 竖长木格栅窗 + 绿院门。 + // P28 再向上叠一层挑檐,使 B 的轮廓比 A 高一格;水面之上不叠,避免屋顶压水。 + let isWater x y = + x >= 0 && x < map.Width && y >= 0 && y < map.Height + && map.Tiles.[y * map.Width + x] = int MapGen.GroundTile.Water + for row in building.Top .. building.DoorY - 1 do + for x in (left - 1) .. (right + 1) do + drawCell RoofEaveOverhangSprite x row + let upper = building.Top - 1 + if upper >= 0 then + for x in (left - 1) .. (right + 1) do + if not (isWater x upper) then + drawCell RoofEaveOverhangSprite x upper for x in left .. right do let wallSprite = - if x = building.DoorX then CourtyardDoorSprite - elif (x - left) % 2 = 0 then WallLatticeSprite - else WallWoodSprite + if x = building.DoorX then CourtyardDoorSprite else WallLatticeSprite drawCell wallSprite x building.DoorY // P26 河岸装饰:护岸石垒 / 芦苇 / 垂柳(垂柳占上下两格),只在大图生成。 for decoration in map.Decorations do |
