summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
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