aboutsummaryrefslogtreecommitdiff
path: root/Final.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Final.hs')
-rw-r--r--Final.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Final.hs b/Final.hs
index 951edce..3a7596f 100644
--- a/Final.hs
+++ b/Final.hs
@@ -4,6 +4,7 @@
module Main where
+import Text.Printf
import Graphics.Rendering.OpenGL as GL
import SDL.Image as SDLImg
import SDL
@@ -41,6 +42,10 @@ import qualified SDL
-}
buildArray :: SDL.Surface -> SDL.Surface -> IO (Array (Int,Int) Tile)
buildArray terrain height = do
+ bpp <- fromIntegral <$> (getSurfaceBytesPerPixel terrain) :: IO Int
+ printf "Terrain BBP: %d\n" bpp
+
+
(V2 (fromIntegral -> w) (fromIntegral -> h)) <- SDL.surfaceDimensions terrain
{- Pick the minimum width and height between the two images -}
let {- Function that returns a Tile for an x y coordinate -}