jtmm2/include/camera.h
KikooDX 65ceff3971 Lot of bugfixes and improvements :)
- [input] Completely rewrote most of the code
- [input/camera] Renamed `*_draw` functions used in debug section to
`*_draw_debug`
- [main/input] Now use `_Bool` instead of `int` when appropriate
- [input] Added function `input_is_up`
- [player] Added function `player_draw_debug`
- [vec] Use `int` instead of `float`, new macro `VEC_PRECISION`
- [main/camera/player/vec] Updated vector related code to work with the
new system
2020-09-18 11:12:34 +02:00

20 lines
383 B
C

#ifndef _DEF_CAMERA
#define _DEF_CAMERA
#include "vec.h"
#include "debug.h"
typedef struct Camera
{
Vec pos;
Vec *target; /* the target position to lerp on */
float speed; /* camera lerp speed with 0 < speed <= 1 */
} Camera;
void camera_step(Camera *camera);
/* draw a dot corresponding to camera position */
void camera_draw_debug(Camera *camera);
#endif /* _DEF_CAMERA */