diff options
author | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 17:02:17 +0200 |
---|---|---|
committer | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 17:02:17 +0200 |
commit | 894d156b25103b0ada31e498a610e0b7c90890f3 (patch) | |
tree | 73c428f43a5637558d47a421ea3a4e40a4b5a4b0 | |
parent | 830a803295ec0a6c9fea92d983c2eb4f0b646112 (diff) |
Changed game object field name to type
-rw-r--r-- | Spear.lkshw | 2 | ||||
-rw-r--r-- | Spear/Scene/Loader.hs | 4 |
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 @@ | |||
1 | Version of workspace file format: | 1 | Version of workspace file format: |
2 | 1 | 2 | 1 |
3 | Time of storage: | 3 | Time of storage: |
4 | "Wed Aug 29 15:15:15 CEST 2012" | 4 | "Wed Aug 29 16:58:18 CEST 2012" |
5 | Name of the workspace: | 5 | Name of the workspace: |
6 | "Spear" | 6 | "Spear" |
7 | File paths of contained packages: | 7 | File 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 | |||
348 | newObject' :: Monad m => CreateGameObject m a -> SceneResources -> String -> [Property] -> m a | 348 | newObject' :: Monad m => CreateGameObject m a -> SceneResources -> String -> [Property] -> m a |
349 | newObject' newGO sceneRes nid props = do | 349 | newObject' 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 | ||
365 | vectors :: Maybe Vector3 -> (Vector3, Vector3, Vector3) | 365 | vectors :: Maybe Vector3 -> (Vector3, Vector3, Vector3) |