Add tilemap floors to rooms
This commit is contained in:
@@ -37,7 +37,7 @@ addTextureArray texturePath shad = do
|
||||
let tex = convertRGBA8 cmap
|
||||
textureOb <- genObjectName
|
||||
textureBinding Texture2DArray $= Just textureOb
|
||||
let texData = tilesToLine 128 32 8 .
|
||||
let texData = tilesToLine 128 8 .
|
||||
V.toList $ imageData tex
|
||||
--wtex = fromIntegral $ imageWidth tex
|
||||
--htex = fromIntegral $ imageHeight tex
|
||||
@@ -50,12 +50,11 @@ addTextureArray texturePath shad = do
|
||||
|
||||
-- I am completely unclear on why this works with its current parameters
|
||||
tilesToLine
|
||||
:: Int -- ^ Tile width
|
||||
-> Int -- ^ Tile height
|
||||
-> Int -- ^ Number of tiles per line
|
||||
:: Int -- ^ Parameter a
|
||||
-> Int -- ^ Parameter b
|
||||
-> [a]
|
||||
-> [a]
|
||||
tilesToLine w h n = concat . concat . transpose . chunksOf n . chunksOf w
|
||||
tilesToLine w n = concat . concat . transpose . chunksOf n . chunksOf w
|
||||
|
||||
addUniforms :: [String] -> FullShader -> IO (FullShader)
|
||||
addUniforms uniStrings shad = do
|
||||
|
||||
Reference in New Issue
Block a user