summaryrefslogtreecommitdiff
path: root/source/camera.c
blob: c905d74342047679409d7bb19a502e35b6c8b788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#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;
}