forked from kdx/jtmm2-old
65ceff3971
- [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
20 lines
383 B
C
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 */
|