gdritter repos animated-dangerzone-sdl / master src / SDLClient / Draw.hs
master

Tree @master (Download .tar.gz)

Draw.hs @masterraw · history · blame

module SDLClient.Draw where

import SDLClient.SpriteSheet
import AnimatedDangerzone.Types

import Data.Array
import qualified Data.Map as Map
import qualified Graphics.UI.SDL as SDL

drawWorld :: World -> IO ()
drawWorld world = do
  let playerLocs = map () (elems (w .^ worldPlayers))
  mapM_ go (Map.fromList (w .^ worldBlocks))
  where go ((x, y), b)
          | Map.member (x, y) (w .^ w)