summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/map-editor')
-rw-r--r--src/map-editor/src/Comm/SetMap.elm7
-rw-r--r--src/map-editor/src/Struct/TileInstance.elm16
2 files changed, 1 insertions, 22 deletions
diff --git a/src/map-editor/src/Comm/SetMap.elm b/src/map-editor/src/Comm/SetMap.elm
index 06fa34c..10d527a 100644
--- a/src/map-editor/src/Comm/SetMap.elm
+++ b/src/map-editor/src/Comm/SetMap.elm
@@ -1,18 +1,11 @@
module Comm.SetMap exposing (decode)
-- Elm -------------------------------------------------------------------------
-import Dict
-
import Json.Decode
-- Map -------------------------------------------------------------------------
-import Constants.Movement
-
import Struct.Map
-import Struct.MapMarker
import Struct.ServerReply
-import Struct.Tile
-import Struct.TileInstance
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
diff --git a/src/map-editor/src/Struct/TileInstance.elm b/src/map-editor/src/Struct/TileInstance.elm
index 4d03630..862598b 100644
--- a/src/map-editor/src/Struct/TileInstance.elm
+++ b/src/map-editor/src/Struct/TileInstance.elm
@@ -62,21 +62,7 @@ type alias Border =
--------------------------------------------------------------------------------
noise_function : Int -> Int -> Int -> Int
noise_function a b c =
- let
- af = (toFloat a)
- bf = (toFloat b)
- cf = (toFloat c)
- (df, ef) = (toPolar (af, bf))
- (ff, gf) = (toPolar (bf, af))
- (hf, jf) = (toPolar (bf, cf))
- (kf, lf) = (toPolar (cf, bf))
- (mf, nf) = (toPolar (af, cf))
- (qf, rf) = (toPolar (cf, af))
- (resA, resB) = (fromPolar ((df + qf), (ef + nf)))
- (resC, resD) = (fromPolar ((hf + mf), (jf + gf)))
- (resE, resF) = (toPolar ((resA - resC), (resB - resD)))
- in
- (round (resE - resF))
+ (round (radians (toFloat ((a + 1) * 2 + (b + 1) * 3 + c))))
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------