Correct loading of tile buffer when loading game
This commit is contained in:
+53
-62
@@ -1,9 +1,9 @@
|
||||
module Dodge.Default.World where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Data.SelectionList
|
||||
import Data.Graph.Inductive.Graph hiding ((&))
|
||||
import qualified Data.Map as M
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Data.World
|
||||
import Geometry.Data
|
||||
import Geometry.Polygon
|
||||
@@ -146,12 +146,6 @@ defaultLWorld =
|
||||
, _lClock = 0
|
||||
}
|
||||
|
||||
--defaultDisplaySections :: SelectionSections a
|
||||
--defaultDisplaySections = SelectionSections
|
||||
-- { _sssSections = mempty
|
||||
-- , _sssSelPos = Just (0,0)
|
||||
-- }
|
||||
|
||||
defaultHUD :: HUD
|
||||
defaultHUD =
|
||||
HUD
|
||||
@@ -163,72 +157,69 @@ defaultHUD =
|
||||
}
|
||||
|
||||
defaultDisplayInventory :: HUDElement
|
||||
defaultDisplayInventory = DisplayInventory
|
||||
{_subInventory = NoSubInventory
|
||||
, _diSections = defaultInvSections
|
||||
-- , _invRegex = Nothing
|
||||
-- , _closeRegex = Nothing
|
||||
}
|
||||
--youLight :: TempLightSource
|
||||
--youLight = TLS
|
||||
-- { _tlsParam = LSParam
|
||||
-- {_lsPos = V3 0 0 0
|
||||
-- ,_lsRad = 300
|
||||
-- ,_lsCol = 0.1
|
||||
-- }
|
||||
-- ,_tlsUpdate = \w _ -> Just (youLight & tlsParam . lsPos .~ f (_crPos $ you w))
|
||||
-- ,_tlsTime = 0
|
||||
-- }
|
||||
-- where
|
||||
-- f (V2 x y) = V3 x y 100
|
||||
defaultDisplayInventory =
|
||||
DisplayInventory
|
||||
{ _subInventory = NoSubInventory
|
||||
, _diSections = defaultInvSections
|
||||
}
|
||||
|
||||
defaultSSSExtra :: SSSExtra
|
||||
defaultSSSExtra = SSSExtra
|
||||
{_sssFilters = IM.fromList [(-1,mempty),(2,mempty)]
|
||||
,_sssSelPos = Nothing
|
||||
defaultSSSExtra =
|
||||
SSSExtra
|
||||
{ _sssFilters = IM.fromList [(-1, mempty), (2, mempty)]
|
||||
, _sssSelPos = Nothing
|
||||
}
|
||||
|
||||
defaultInvSections :: SelectionSections ()
|
||||
defaultInvSections = SelectionSections
|
||||
{ _sssSections = IM.fromDistinctAscList $ zip [-1..]
|
||||
[ defaultFiltSection
|
||||
, defaultInvSection
|
||||
, defaultYouSection
|
||||
, defaultFiltSection & ssIndent .~ 2
|
||||
& ssDescriptor .~ "NEARBY"
|
||||
, defaultCOSection
|
||||
]
|
||||
, _sssExtra = defaultSSSExtra
|
||||
}
|
||||
defaultInvSections =
|
||||
SelectionSections
|
||||
{ _sssSections =
|
||||
IM.fromDistinctAscList $
|
||||
zip
|
||||
[-1 ..]
|
||||
[ defaultFiltSection
|
||||
, defaultInvSection
|
||||
, defaultYouSection
|
||||
, defaultFiltSection & ssIndent .~ 2
|
||||
& ssDescriptor .~ "NEARBY"
|
||||
, defaultCOSection
|
||||
]
|
||||
, _sssExtra = defaultSSSExtra
|
||||
}
|
||||
|
||||
defaultSS :: SelectionSection a
|
||||
defaultSS = SelectionSection
|
||||
{ _ssItems = mempty
|
||||
, _ssCursor = Nothing
|
||||
, _ssMinSize = 10
|
||||
, _ssOffset = 0
|
||||
, _ssShownItems = []
|
||||
, _ssIndent = 0
|
||||
, _ssDescriptor = ""
|
||||
}
|
||||
defaultSS =
|
||||
SelectionSection
|
||||
{ _ssItems = mempty
|
||||
, _ssCursor = Nothing
|
||||
, _ssMinSize = 10
|
||||
, _ssOffset = 0
|
||||
, _ssShownItems = []
|
||||
, _ssIndent = 0
|
||||
, _ssDescriptor = ""
|
||||
}
|
||||
|
||||
defaultCOSection :: SelectionSection ()
|
||||
defaultCOSection = defaultSS
|
||||
& ssIndent .~ 2
|
||||
& ssDescriptor .~ "CLOSE OBJECTS"
|
||||
defaultCOSection =
|
||||
defaultSS
|
||||
& ssIndent .~ 2
|
||||
& ssDescriptor .~ "CLOSE OBJECTS"
|
||||
|
||||
defaultFiltSection :: SelectionSection a
|
||||
defaultFiltSection = defaultSS
|
||||
& ssIndent .~ 0
|
||||
& ssDescriptor .~ "INV"
|
||||
& ssMinSize .~ 0
|
||||
defaultFiltSection =
|
||||
defaultSS
|
||||
& ssIndent .~ 0
|
||||
& ssDescriptor .~ "INV"
|
||||
& ssMinSize .~ 0
|
||||
|
||||
defaultInvSection :: SelectionSection ()
|
||||
defaultInvSection = defaultSS
|
||||
& ssDescriptor .~ "INVENTORY ITEMS"
|
||||
defaultInvSection =
|
||||
defaultSS
|
||||
& ssDescriptor .~ "INVENTORY ITEMS"
|
||||
|
||||
defaultYouSection :: SelectionSection ()
|
||||
defaultYouSection = defaultSS
|
||||
-- & ssRegex .~ UnavailableRegex
|
||||
& ssIndent .~ 2
|
||||
& ssMinSize .~ 1
|
||||
& ssDescriptor .~ "YOUR STATUS"
|
||||
defaultYouSection =
|
||||
defaultSS
|
||||
& ssIndent .~ 2
|
||||
& ssMinSize .~ 1
|
||||
& ssDescriptor .~ "YOUR STATUS"
|
||||
|
||||
Reference in New Issue
Block a user