]> git.lizzy.rs Git - shadowclad.git/blobdiff - src/game/player.h
Add copyright and license notices in source code
[shadowclad.git] / src / game / player.h
index eeae33b3fdd917167843bb5cd3d3b0c6a4f80244..d410654a99dd834364b6fbaf1260a837cd3b9054 100644 (file)
@@ -1,18 +1,34 @@
+/**
+ * Copyright 2019-2020 Iwo 'Outfrost' Bujkiewicz
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
 #ifndef PLAYER_H_
 #define PLAYER_H_
 
 #include <GL/gl.h>
 
-#include "engine/asset.h"
+#include "engine/scene.h"
+
+enum Direction {
+       DIRECTION_UP = 1 << 0,
+       DIRECTION_DOWN = 1 << 1,
+       DIRECTION_LEFT = 1 << 2,
+       DIRECTION_RIGHT = 1 << 3,
+};
 
-typedef struct {
-       const Asset3D* asset3D;
-} Character;
+typedef enum Direction Direction;
 
-Character playerCharacter;
-Vector3D playerPos;
+extern Scene* playerCharacter;
+extern Scene* playerProjectedMovement;
 
 void initPlayer();
-void spawnPlayer();
+void spawnPlayer(Transform transform);
+void updatePlayer(float delta);
+void startMovement(Direction direction);
+void stopMovement(Direction direction);
 
-#endif
+#endif // PLAYER_H_