diff --git a/examples/example00/Init.hs b/examples/example00/Init.hs index cf32a8c..130e5fd 100644 --- a/examples/example00/Init.hs +++ b/examples/example00/Init.hs @@ -100,7 +100,7 @@ load = do return (V3 x y z) ) [0..2000] - let shipList = zipWith (uncurry $ Ship shipBO (length $ loTriangles lobj)) + let shipList = zipWith (Ship shipBO (length $ loTriangles lobj)) poss (repeat $ Quaternion 1 (V3 0 0 0)) @@ -108,7 +108,7 @@ load = do po <- initPhysicsObjects poss - mapM_ (addRigidBody (pWorld phys)) . bodyRigidBody) (poBalls po) + mapM_ (addRigidBody (pWorld phys) . bodyRigidBody) (poBalls po) addRigidBody (pWorld phys) (bodyRigidBody $ poGround po) return StateData diff --git a/examples/example00/Main.hs b/examples/example00/Main.hs index 8e0fc55..3dd7b22 100644 --- a/examples/example00/Main.hs +++ b/examples/example00/Main.hs @@ -54,8 +54,8 @@ update dt = do liftIO $ stepSimulation (pWorld phys) dt 10 Nothing posrots <- mapM ((\ball -> do ms <- liftIO $ getMotionState ball - npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms - nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms + npos <- liftIO $ return . fmap realToFrac =<< getPosition ms + nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms return (npos, nrot)) . bodyRigidBody) (poBalls physos) let nships = map (\(ship, (pos, rot)) -> diff --git a/src/Main.hs b/src/Main.hs index de74689..505377d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -54,8 +54,8 @@ update dt = do liftIO $ stepSimulation (pWorld phys) dt 10 Nothing (pos, rot) <- do ms <- liftIO $ getMotionState (bodyRigidBody $ poBall physos) - npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms - nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms + npos <- liftIO $ return . fmap realToFrac =<< getPosition ms + nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms return (npos, nrot) let nship = (ship sd) @@ -161,7 +161,7 @@ handleKey code sd <- getAffection let body = bodyRigidBody $ poBall $ physicsObjects sd ms <- liftIO $ getMotionState body - rot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms + rot <- liftIO $ return . fmap realToFrac =<< getRotation ms let tor = 5 torqueimp = case code of SDL.KeycodeW -> rotate rot (V3 (-tor) 0 0) -- (-dphi)