summaryrefslogtreecommitdiffstats
path: root/src/HWiidPlayer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HWiidPlayer.hs')
-rw-r--r--src/HWiidPlayer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HWiidPlayer.hs b/src/HWiidPlayer.hs
index db35871..04ea38e 100644
--- a/src/HWiidPlayer.hs
+++ b/src/HWiidPlayer.hs
@@ -12,7 +12,7 @@ import Data.Maybe
import Data.Ratio ((%))
import Data.Typeable
import HWiid
-import Graphics.Rendering.OpenGL.GL (GLfloat, Vector3(..))
+import Graphics.Rendering.OpenGL.GL (GLfloat, Vector3(..), Vertex2(..))
import Graphics.Rendering.OpenGL.GL.BeginEnd (unsafeRenderPrimitive, PrimitiveMode(..))
import Graphics.Rendering.OpenGL.GL.CoordTrans (unsafePreservingMatrix, translate, rotate)
import Graphics.Rendering.OpenGL.GL.VertexSpec
@@ -65,7 +65,7 @@ instance Player HWiidPlayer where
renderPlayer (HWiidPlayer _ _ aims) = unsafePreservingMatrix $ do
let (x, y) = mulV (1/(fromIntegral $ length aims)) $ foldr addV (0, 0) aims
- translate $ Vector3 x y (0.2 :: GLfloat)
+ translate $ Vector3 (realToFrac x) (realToFrac y) (0.2 :: GLfloat)
rotate 30 $ Vector3 1 0 (0 :: GLfloat)
unsafeRenderPrimitive Quads $ do