Attempt to incorporate free link positions into placement chain
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.LevelGen
|
||||
( shiftPlacement
|
||||
, shiftPointBy
|
||||
, placeSpot
|
||||
, invShiftPointBy
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Block
|
||||
@@ -77,6 +78,9 @@ placeWallPoly ps wl = rmCrossPaths . over walls (addWalls ps wl)
|
||||
shiftPointBy :: (Point2,Float) -> Point2 -> Point2
|
||||
shiftPointBy (pos,rot) p = pos +.+ rotateV rot p
|
||||
|
||||
invShiftPointBy :: (Point2,Float) -> Point2 -> Point2
|
||||
invShiftPointBy (p1,r) p2 = rotateV (-r) $ p2 -.- p1
|
||||
|
||||
shiftPoint3By :: (Point2,Float) -> Point3 -> Point3
|
||||
shiftPoint3By (pos,rot) (V3 x y z) = addZ z $ pos +.+ rotateV rot (V2 x y)
|
||||
|
||||
@@ -119,7 +123,6 @@ placeBt bt p a w = (i , over buttons addBT w)
|
||||
i = IM.newKey $ _buttons w
|
||||
addBT xs = IM.insert i (f bt) xs
|
||||
f = (btRot +~ a) . (btPos %~ ( (p +.+) . rotateV a )) . (btID .~ i)
|
||||
--addBT bts = IM.insert (IM.newKey bts) (bt {_btPos = p, _btRot = rot, _btID = IM.newKey bts}) bts
|
||||
{- Creates a floor item at a given point.
|
||||
Assigns an id correctly. -}
|
||||
placeFlIt
|
||||
|
||||
Reference in New Issue
Block a user