forked from kdx/jtmm2-old
28 lines
517 B
C
28 lines
517 B
C
#include <gint/display.h>
|
|
|
|
#include "camera.h"
|
|
#include "conf.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)
|
|
{
|
|
Vec draw_pos;
|
|
vec_cpy(&draw_pos, camera->pos);
|
|
vec_mul(&draw_pos, SCALE);
|
|
vec_div(&draw_pos, VEC_PRECISION);
|
|
uint8_t color;
|
|
#ifdef FX9860G
|
|
color = C_BLACK;
|
|
#endif /* FX9860G */
|
|
#ifdef FXCG50
|
|
color = C_RED;
|
|
#endif /* FXCG50 */
|
|
dpixel(draw_pos.x, draw_pos.y, color);
|
|
}
|