From 2fd8e669c5d5f23ba40e708240d77a3d9861b529 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Sun, 28 Apr 2024 19:16:43 +0800 Subject: [PATCH] PUT_CAMERA command It instantly places the camera centered at the given point. --- app_file.c | 5 +++++ intro.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/app_file.c b/app_file.c index 080849f..c77c81b 100644 --- a/app_file.c +++ b/app_file.c @@ -171,6 +171,11 @@ static void _app_LevelCommand(App *app, char *cmd) { entity_Commit(app->entity, e); } + CMD("PUT_CAMERA") { + Vec2 center = readvec2(); + app->camera->cam = box2_FromCenter(center, app->camera->screen.size); + } + CMD("CUTOFF") { app->player->cutoff = TOKEN_DOUBLE; } diff --git a/intro.txt b/intro.txt index 86800d3..6dba010 100644 --- a/intro.txt +++ b/intro.txt @@ -1,5 +1,6 @@ CUTOFF 1000 BACKGROUND 90 90 90 +PUT_CAMERA 200 400 HITBOX -245 250 1427 44 PLAYER 600 250 HITBOX -200 -270 100 600