aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 17:02:17 +0200
committerMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 17:02:17 +0200
commit894d156b25103b0ada31e498a610e0b7c90890f3 (patch)
tree73c428f43a5637558d47a421ea3a4e40a4b5a4b0
parent830a803295ec0a6c9fea92d983c2eb4f0b646112 (diff)
Changed game object field name to type
-rw-r--r--Spear.lkshw2
-rw-r--r--Spear/Scene/Loader.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Spear.lkshw b/Spear.lkshw
index 71b74e9..743f9cc 100644
--- a/Spear.lkshw
+++ b/Spear.lkshw
@@ -1,7 +1,7 @@
1Version of workspace file format: 1Version of workspace file format:
2 1 2 1
3Time of storage: 3Time of storage:
4 "Wed Aug 29 15:15:15 CEST 2012" 4 "Wed Aug 29 16:58:18 CEST 2012"
5Name of the workspace: 5Name of the workspace:
6 "Spear" 6 "Spear"
7File paths of contained packages: 7File paths of contained packages:
diff --git a/Spear/Scene/Loader.hs b/Spear/Scene/Loader.hs
index 7066a5c..6197d12 100644
--- a/Spear/Scene/Loader.hs
+++ b/Spear/Scene/Loader.hs
@@ -348,7 +348,7 @@ newObject newGO sceneRes (SceneLeaf nid props) = [newObject' newGO sceneRes nid
348newObject' :: Monad m => CreateGameObject m a -> SceneResources -> String -> [Property] -> m a 348newObject' :: Monad m => CreateGameObject m a -> SceneResources -> String -> [Property] -> m a
349newObject' newGO sceneRes nid props = do 349newObject' newGO sceneRes nid props = do
350 -- Optional properties. 350 -- Optional properties.
351 let name = (asString $ value "name" props) `unspecified` "unknown" 351 let goType = (asString $ value "type" props) `unspecified` "unknown"
352 position = (asVec3 $ value "position" props) `unspecified` vec3 0 0 0 352 position = (asVec3 $ value "position" props) `unspecified` vec3 0 0 0
353 rotation = (asVec3 $ value "rotation" props) `unspecified` vec3 0 0 0 353 rotation = (asVec3 $ value "rotation" props) `unspecified` vec3 0 0 0
354 right' = (asVec3 $ value "right" props) `unspecified` vec3 1 0 0 354 right' = (asVec3 $ value "right" props) `unspecified` vec3 1 0 0
@@ -359,7 +359,7 @@ newObject' newGO sceneRes nid props = do
359 -- Compute the object's vectors if a forward vector has been specified. 359 -- Compute the object's vectors if a forward vector has been specified.
360 let (right, up, forward) = vectors forward' 360 let (right, up, forward) = vectors forward'
361 361
362 newGO name sceneRes props (M4.transform right up forward position) 362 newGO goType sceneRes props (M4.transform right up forward position)
363 363
364 364
365vectors :: Maybe Vector3 -> (Vector3, Vector3, Vector3) 365vectors :: Maybe Vector3 -> (Vector3, Vector3, Vector3)