forked from kdx/jtmm2-old
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 */
|
|
}
|