diff options
Diffstat (limited to 'src/LivingVillage.Desktop/VillageArt.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/VillageArt.fs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/VillageArt.fs b/src/LivingVillage.Desktop/VillageArt.fs index efed4ee..f72c0f3 100644 --- a/src/LivingVillage.Desktop/VillageArt.fs +++ b/src/LivingVillage.Desktop/VillageArt.fs @@ -448,7 +448,25 @@ module VillageArt = drawWorldTile spriteBatch textures camera viewportWidth viewportHeight position sprite tint let rippleFrame = waterFrameTick tick + // Procedural terrain for the 512x384 large world: water/pebble/peat codes map + // onto the jiangnan atlas sprites with deterministic ripple continuity. + let drawTerrainTile (position: TilePosition) (code: int) = + match code with + | 1 -> draw position (if rippleFrame = 0 then WaterSprite else WaterSpriteB) + | 2 -> draw position StonePathSprite + | 3 -> draw position StonePathSprite + | _ -> draw position GrassSprite + let drawBaseTile (position: TilePosition) = + match ProceduralMap.terrainOption, ProceduralMap.bigWorldActive with + | (Some terrain, true) -> + let tx, ty = position.X, position.Y + let code = terrain.Tiles.[ty * ProceduralMap.width + tx] + drawTerrainTile position code + | _ -> + match textures.Cc0TileAtlas with + | Some cc0 -> drawCc0Tile spriteBatch cc0 tint (cc0GroundRect position) (position.X * Sim.tilePixels - int camera.X) (position.Y * Sim.tilePixels - int camera.Y) + | None -> draw position GrassSprite match textures.Cc0TileAtlas with | Some cc0 -> drawCc0Tile spriteBatch cc0 tint (cc0GroundRect position) (position.X * Sim.tilePixels - int camera.X) (position.Y * Sim.tilePixels - int camera.Y) | None -> draw position GrassSprite |
