geometry-dash-gba/source/camera.c
2020-08-11 22:13:56 -06:00

16 lines
323 B
C

#include "../include/camera.h"
CAMERA createCamera (int x, int y) {
// Create camera from a point
CAMERA temp;
temp.x = x;
temp.y = y;
return temp;
}
void applyCameraShift (CAMERA *camera, int *x, int *y) {
// Apply camera shift to a coordinate
*x = *x - camera->x;
*y = *y - camera->y;
}