summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 5a9a62c..12f2234 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,7 +19,8 @@ Config config = {
};
void doInitialization();
-Vector2 toOrigin(Vector2);
+Vector2 toCenter(Vector2);
+Vector2 toTopLeft(Vector2);
void doDrawing();
void doUpdate();
@@ -44,13 +45,20 @@ void doInitialization() {
SetTargetFPS(config.TARGET_FPS);
}
-Vector2 toOriginV(Vector2 vector) {
+Vector2 toCenter(Vector2 vector) {
return (Vector2) {
vector.x + (float)config.ORIGIN_X,
-1 * (vector.y + (float)config.ORIGIN_Y)
};
}
+Vector2 toTopLeft(Vector2 vector) {
+ return (Vector2) {
+ vector.x - (float)config.ORIGIN_X,
+ -1 * (vector.y - (float)config.ORIGIN_Y)
+ };
+}
+
void doUpdate() {
float dt = GetFrameTime();
}