aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Glyph/ObjLoader.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-03 01:03:52 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-03 01:03:52 -0700
commit11fca081b1241e1915f357fa40baa3e97aceb823 (patch)
treec0312c145d9133cef5e31b04a71bec050097f0f0 /Graphics/Glyph/ObjLoader.hs
parent7dd8c59353167e84dab9e7a1afc16e2290b249e3 (diff)
downloadterralloc-11fca081b1241e1915f357fa40baa3e97aceb823.tar.gz
terralloc-11fca081b1241e1915f357fa40baa3e97aceb823.tar.bz2
terralloc-11fca081b1241e1915f357fa40baa3e97aceb823.zip
Start reviving this ancient project. (It's pretty cool).
Got it to compile using Stack. Skybox works, but nothing else really does. I think this is a problem with how the program is interpreting the surface pixels when calculating the map terrain and elevation. I think some TLC is in order.
Diffstat (limited to 'Graphics/Glyph/ObjLoader.hs')
-rw-r--r--Graphics/Glyph/ObjLoader.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Graphics/Glyph/ObjLoader.hs b/Graphics/Glyph/ObjLoader.hs
index 78f010a..b392a26 100644
--- a/Graphics/Glyph/ObjLoader.hs
+++ b/Graphics/Glyph/ObjLoader.hs
@@ -4,9 +4,9 @@ import Graphics.Glyph.BufferBuilder
import Graphics.Glyph.Util
import Debug.Trace
+import Data.List.Split
import Control.Monad
import Data.Either
-import Data.String.Utils
import Data.Array
import System.IO
import qualified Data.Map as M
@@ -82,7 +82,7 @@ loadObjFromBytestring _contents =
"" -> -1
_ -> read str in
- let s2t s = case split "/" s of
+ let s2t s = case splitOn "/" s of
[a,b,c] -> Just (mapT3 mys2n (a,b,c))
[a,b] -> Just (mapT3 mys2n (a,b,""))
[a] -> Just (mapT3 mys2n (a,"",""))