X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgame%2Fplayer.h;h=d410654a99dd834364b6fbaf1260a837cd3b9054;hb=068d44c18574d536f5b3f81fbcd8a54851647972;hp=aeeabc4efba70beacd440a7968fb2cd5539de193;hpb=fd220501c6336b2c22bdf05488e4bd22bd7a8e29;p=shadowclad.git diff --git a/src/game/player.h b/src/game/player.h index aeeabc4..d410654 100644 --- a/src/game/player.h +++ b/src/game/player.h @@ -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 -#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 Solid* solid; -} 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_