twn_draw.c: draw_camera_2d()!

This commit is contained in:
veclavtalica
2025-02-05 00:54:38 +03:00
parent d9d7072c86
commit d9df3f9b04
6 changed files with 63 additions and 3 deletions

View File

@ -18,6 +18,11 @@ static void ingame_tick(State *state) {
input_action("player_jump", "SPACE");
input_action("player_run", "LSHIFT");
draw_camera_2d((Vec2){ scn->player->rect.x + scn->player->rect.w / 2 - ctx.resolution.x / 2,
scn->player->rect.y + scn->player->rect.h / 2 - ctx.resolution.y / 2 },
0, 1
);
world_drawdef(scn->world);
player_calc(scn->player);
}