summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 01:41:05 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 01:41:05 +0800
commitfc77481196aaea817eec991bdcf4dc22bb1d245c (patch)
tree95df2d0bff79a742c7f3637fbec680f2e6945316 /src/LivingVillage.Desktop/Game.fs
parentb6b95988e525a68ea7426ecc9690b18a1b3bbfe8 (diff)
downloadliving-village-fc77481196aaea817eec991bdcf4dc22bb1d245c.tar.gz
feat(desktop): 江南美术改为真实 PNG 图集
- scripts/make-jiangnan-art.py 生成三张原创透明 PNG:世界 256x32、角色 1024x48、内景 392x96 - VillageArt.fs 移除进程内像素烘焙,改为 BaseDirectory 加载图集并校验尺寸 - 内景渲染改用图集(地板/墙/窗/桌/床/屏/毯/柜),新增玩家专属 StrawHat 变体 - 内景新增地毯与柜子装饰,角色按 FeetPosition 定位 - fsproj 随包复制三张 PNG;m6c-package.sh 校验三张 PNG 进入交付包
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
-rw-r--r--src/LivingVillage.Desktop/Game.fs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index dd04e26..514928f 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -387,7 +387,7 @@ type LivingVillageGame() as this =
override _.LoadContent() =
spriteBatch <- new SpriteBatch(this.GraphicsDevice)
- artTextures <- VillageArt.buildTextures this.GraphicsDevice
+ artTextures <- VillageArt.loadTextures this.GraphicsDevice
cjkAtlas <- CjkGlyphAtlas.load this.GraphicsDevice
pixel <- new Texture2D(this.GraphicsDevice, 1, 1)
pixel.SetData([| Color.White |])
@@ -395,6 +395,7 @@ type LivingVillageGame() as this =
override _.UnloadContent() =
if not (isNull artTextures.TileAtlas) then artTextures.TileAtlas.Dispose()
if not (isNull artTextures.CharacterAtlas) then artTextures.CharacterAtlas.Dispose()
+ if not (isNull artTextures.InteriorAtlas) then artTextures.InteriorAtlas.Dispose()
if not (isNull cjkAtlas) then cjkAtlas.Dispose()
if not (isNull pixel) then pixel.Dispose()
if not (isNull spriteBatch) then spriteBatch.Dispose()
@@ -527,7 +528,9 @@ type LivingVillageGame() as this =
spriteBatch.Begin()
match m5View.HomeMode with
| Inside _ ->
- VillageArt.drawInterior spriteBatch pixel viewport.Width viewport.Height renderPlan.Interior
+ VillageArt.drawInterior spriteBatch pixel artTextures viewport.Width viewport.Height renderPlan.Interior Color.White
+ let interiorAvatarSpec = VillageArt.avatarSpriteSpec avatarFacing world.Tick
+ VillageArt.drawInteriorCharacter spriteBatch artTextures viewport.Width viewport.Height world.Avatar.Pos interiorAvatarSpec Color.White
| Outside ->
VillageArt.drawWorld
spriteBatch
@@ -538,7 +541,7 @@ type LivingVillageGame() as this =
renderPlan
profile.WorldTint
- let avatarSpec = VillageArt.npcSpriteSpec (NpcId 0) avatarFacing world.Tick
+ let avatarSpec = VillageArt.avatarSpriteSpec avatarFacing world.Tick
VillageArt.drawCharacter spriteBatch artTextures camera world.Avatar.Pos avatarSpec profile.WorldTint
for npc in world.Npcs do