2020-09-11 18:07:53 +02:00
|
|
|
#ifndef _DEF_CAMERA
|
|
|
|
#define _DEF_CAMERA
|
|
|
|
|
|
|
|
#include "vec.h"
|
2020-09-14 14:37:46 +02:00
|
|
|
#include "debug.h"
|
2020-09-11 18:07:53 +02:00
|
|
|
|
|
|
|
typedef struct Camera
|
|
|
|
{
|
2020-09-14 14:37:46 +02:00
|
|
|
Vec pos;
|
2020-09-14 10:33:01 +02:00
|
|
|
Vec *target; /* the target position to lerp on */
|
2020-09-11 18:07:53 +02:00
|
|
|
float speed; /* camera lerp speed with 0 < speed <= 1 */
|
|
|
|
} Camera;
|
|
|
|
|
|
|
|
void camera_step(Camera *camera);
|
2020-09-17 14:14:21 +02:00
|
|
|
|
2020-09-14 14:37:46 +02:00
|
|
|
/* draw a dot corresponding to camera position */
|
|
|
|
void camera_draw(Camera *camera);
|
2020-09-11 18:07:53 +02:00
|
|
|
|
|
|
|
#endif /* _DEF_CAMERA */
|