]> git.lizzy.rs Git - shadowclad.git/blob - src/game/player.h
d410654a99dd834364b6fbaf1260a837cd3b9054
[shadowclad.git] / src / game / player.h
1 /**
2  * Copyright 2019-2020 Iwo 'Outfrost' Bujkiewicz
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8
9 #ifndef PLAYER_H_
10 #define PLAYER_H_
11
12 #include <GL/gl.h>
13
14 #include "engine/scene.h"
15
16 enum Direction {
17         DIRECTION_UP = 1 << 0,
18         DIRECTION_DOWN = 1 << 1,
19         DIRECTION_LEFT = 1 << 2,
20         DIRECTION_RIGHT = 1 << 3,
21 };
22
23 typedef enum Direction Direction;
24
25 extern Scene* playerCharacter;
26 extern Scene* playerProjectedMovement;
27
28 void initPlayer();
29 void spawnPlayer(Transform transform);
30 void updatePlayer(float delta);
31 void startMovement(Direction direction);
32 void stopMovement(Direction direction);
33
34 #endif // PLAYER_H_