more tables

This commit is contained in:
nek0 2018-04-11 20:01:41 +02:00
parent 3cb70b53d5
commit a4c3202f4d
9 changed files with 15 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 570 B

BIN
assets/misc/table3.kra Normal file

Binary file not shown.

BIN
assets/misc/table3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

BIN
assets/misc/table4.kra Normal file

Binary file not shown.

BIN
assets/misc/table4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

View file

@ -58,6 +58,8 @@ load = do
mmiscbox1 <- createImage nvg (FileName "assets/misc/box1.png") 0
mmisctable1 <- createImage nvg (FileName "assets/misc/table1.png") 0
mmisctable2 <- createImage nvg (FileName "assets/misc/table2.png") 0
mmisctable3 <- createImage nvg (FileName "assets/misc/table3.png") 0
mmisctable4 <- createImage nvg (FileName "assets/misc/table4.png") 0
mmisctableC <- createImage nvg (FileName "assets/misc/tableCorner.png") 0
_ <- createFont nvg "bedstead"
(FileName "assets/font/Bedstead-Semicondensed.ttf")
@ -65,7 +67,7 @@ load = do
mwallcornern, mwallcornere, mwallcorners, mwallcornerw,
mwalltne, mwalltse, mwalltsw, mwalltnw, mwallcross,
mmiscbox1,
mmisctable1, mmisctable2, mmisctableC
mmisctable1, mmisctable2, mmisctable3, mmisctable4, mmisctableC
]
when (any isNothing mimgs) $ do
logIO Error "Failed to load image assets"

View file

@ -36,11 +36,11 @@ clusterMat ClusterTable2 =
]
clusterMat ClusterTable3 =
M.fromLists
[[Just ImgMiscTable1, Just ImgEmpty]]
[[Just ImgMiscTable3, Just ImgEmpty]]
clusterMat ClusterTable4 =
M.fromLists
[ [Just ImgEmpty]
, [Just ImgMiscTable2]
, [Just ImgMiscTable4]
]
clusterMat ClusterCornerTable =
M.fromLists

View file

@ -55,6 +55,8 @@ data ImgId
| ImgMiscBox1
| ImgMiscTable1
| ImgMiscTable2
| ImgMiscTable3
| ImgMiscTable4
| ImgMiscTableCorner
deriving (Show, Eq, Ord, Enum)
@ -62,6 +64,8 @@ isWall :: ImgId -> Bool
isWall ImgMiscBox1 = False
isWall ImgMiscTable1 = False
isWall ImgMiscTable2 = False
isWall ImgMiscTable3 = False
isWall ImgMiscTable4 = False
isWall ImgMiscTableCorner = False
isWall _ = True
@ -111,6 +115,12 @@ imgObstacle (Just ImgMiscTable1) =
imgObstacle (Just ImgMiscTable2) =
[ Boundaries (0, 0) (0.63, 1)
]
imgObstacle (Just ImgMiscTable3) =
[ Boundaries (0, 0) (1, 0.63)
]
imgObstacle (Just ImgMiscTable4) =
[ Boundaries (0.34, 0) (1, 1)
]
imgObstacle (Just ImgMiscTableCorner) =
[ Boundaries (0, 0) (0.63, 1)
, Boundaries (0, 0.34) (1, 1)