diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HTanks.hs | 6 | ||||
-rw-r--r-- | src/Render.hs | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/HTanks.hs b/src/HTanks.hs index c9525b9..82338a4 100644 --- a/src/HTanks.hs +++ b/src/HTanks.hs @@ -27,7 +27,8 @@ import Data.Obj3D.GL main :: IO () main = do let theLevel = testLevel - --hwiidPlayer <- newHWiidPlayer + --humanPlayer <- newHWiidPlayer + let humanPlayer = DefaultPlayer S.empty 0 0 False gl <- initGL $ glxDriver (levelWidth theLevel) (levelHeight theLevel) when (initialized gl) $ do @@ -36,8 +37,7 @@ main = do , Tank 5.0 3.5 0 0 1.5 270 False 3 1 5 1 ], bullets = []} mainstate = MainState {run = True, driver = SomeDriver gl, time = currentTime, players = - [ SomePlayer $ DefaultPlayer S.empty 0 0 False - --SomePlayer $ hwiidPlayer + [ SomePlayer humanPlayer , SomePlayer $ CPUPlayer 0 ], textures = M.empty, models = M.empty, gameState = gamestate} diff --git a/src/Render.hs b/src/Render.hs index 32173c1..91146ba 100644 --- a/src/Render.hs +++ b/src/Render.hs @@ -139,8 +139,6 @@ render = do texCoord $ TexCoord2 0 (lh/2) vertex $ Vertex2 (0 :: GLfloat) (0 :: GLfloat) - texture Texture2D $= Disabled - bindInterleavedArrays modelTank forM_ tanklist $ \tank -> unsafePreservingMatrix $ do @@ -152,7 +150,7 @@ render = do translate $ Vector3 x y (0 :: GLfloat) rotate rotDir $ Vector3 0 0 (1 :: GLfloat) - --textureBinding Texture2D $= Just textureTank + textureBinding Texture2D $= Just textureTank unsafePreservingMatrix $ do rotate 90 $ Vector3 1 0 (0 :: GLfloat) @@ -160,14 +158,12 @@ render = do rotate (rotAim-rotDir) $ Vector3 0 0 (1 :: GLfloat) - --textureBinding Texture2D $= Just textureCannon + textureBinding Texture2D $= Just textureCannon unsafePreservingMatrix $ do rotate 90 $ Vector3 1 0 (0 :: GLfloat) drawObject modelTank 0 - texture Texture2D $= Enabled - forM_ bulletlist $ \bullet -> unsafePreservingMatrix $ do let x = realToFrac . bulletX $ bullet y = realToFrac . bulletY $ bullet |