Add tilemap floors to rooms

This commit is contained in:
2021-06-15 14:56:32 +02:00
parent 73bd407c49
commit da631e3b37
31 changed files with 181 additions and 66 deletions
+6
View File
@@ -14,6 +14,8 @@ import Geometry
import Dodge.Room.Link
import qualified IntMapHelp as IM
--import Dodge.Debug.LinkDecoration
import Picture.Data
import Tile
import Control.Monad.State
import Control.Lens
@@ -30,6 +32,7 @@ generateLevelFromRoomList gr w = updateWallZoning
-- . addRoomPolyDecorations rs
-- . addRoomLinkDecorations rs
$ w { _walls = wallsFromRooms rs
, _floorTiles = floorsFromRooms rs
}
where
plmnts = concatMap _rmPS rs
@@ -89,6 +92,9 @@ wallsFromRooms =
where
f i (x,y) = defaultWall {_wlLine = (x,y) , _wlID = i}
floorsFromRooms :: [Room] -> [RenderType]
floorsFromRooms = concatMap (concatMap tToRender . _rmFloor)
divideWall :: Wall -> [Wall]
divideWall wl
= let (a,b) = _wlLine wl