forked from kdx/jtmm2-old
21 lines
437 B
C
21 lines
437 B
C
#ifndef _DEF_CAMERA
|
|
#define _DEF_CAMERA
|
|
|
|
#include "vec.h"
|
|
#include "debug.h"
|
|
|
|
typedef struct Camera
|
|
{
|
|
Vec pos;
|
|
Vec offset; /* adjusted pixel offset based on 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 */
|