Adoranda/include/camera.h

15 lines
287 B
C
Raw Permalink Normal View History

2021-08-19 02:29:51 +02:00
#pragma once
2021-08-25 01:01:43 +02:00
#include "vec2.h"
2021-08-19 02:29:51 +02:00
struct Camera {
2021-08-25 01:01:43 +02:00
/* true position */
struct Vec2f pos;
/* used by draw functions as an offset */
struct Vec2 offset;
/* target to follow */
struct Vec2f *target;
};
struct Camera camera_new(struct Vec2f *target);
2021-08-25 01:30:30 +02:00
void camera_update(struct Camera*);