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
21 lines
454 B
C
21 lines
454 B
C
#include <gint/display.h>
|
|
|
|
#include "camera.h"
|
|
#include "vec.h"
|
|
#include "debug.h"
|
|
|
|
void camera_step(Camera *camera)
|
|
{
|
|
vec_lerp(&camera->pos, *camera->target, camera->speed);
|
|
}
|
|
|
|
void camera_draw_debug(Camera *camera)
|
|
{
|
|
#ifdef FX9860G
|
|
dpixel(camera->pos.x / VEC_PRECISION, camera->pos.y / VEC_PRECISION, C_BLACK);
|
|
#endif /* FX9860G */
|
|
#ifdef FXCG50
|
|
dpixel(camera->pos.x / VEC_PRECISION, camera->pos.y / VEC_PRECISION, C_RED);
|
|
#endif /* FXCG50 */
|
|
}
|