From b055ce4b1e9f9b056f38739506157432a9a82875 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Tue, 26 Feb 2019 21:34:35 +0100 Subject: Splits Tile & TileInstance (Battle). --- src/map-editor/src/Comm/SetMap.elm | 7 ------- src/map-editor/src/Struct/TileInstance.elm | 16 +--------------- 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'src/map-editor') 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 -------------------------------------------------------------------- -- cgit v1.2.3-70-g09d2