aboutsummaryrefslogtreecommitdiff
path: root/source/game.c
diff options
context:
space:
mode:
authorEmil Williams2026-02-15 04:06:55 +0000
committerEmil Williams2026-02-15 04:06:55 +0000
commit0bb3381eefcb645f1abd516e3a6827bad1767406 (patch)
tree2cdc418d81c98882c06714c0e658f602676f9409 /source/game.c
parent97ddf26c3d83a9ae2a99a3d6d2884a3ebecd3e03 (diff)
downloadMonobomberman-0bb3381eefcb645f1abd516e3a6827bad1767406.tar.xz
Monobomberman-0bb3381eefcb645f1abd516e3a6827bad1767406.tar.zst
timer pre
Diffstat (limited to 'source/game.c')
-rw-r--r--source/game.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/game.c b/source/game.c
index b17bf73..d98b235 100644
--- a/source/game.c
+++ b/source/game.c
@@ -21,6 +21,7 @@ void GameStart(config_t config) {
static void GameRecalculateViewport(game_t * game) {
game->config.resolution_x = GetScreenWidth();
game->config.resolution_y = GetScreenHeight();
+
game->camera = (Camera2D) {
.offset = (Vector2) { 0 },
.target = (Vector2) { 0 },
@@ -43,7 +44,7 @@ static void GameInitialize(game_t * game) {
/* Strict parameters */
#define DEFAULT(a, b) ((b) ? (b) : (a))
game->config.resolution_x = MAX(200, DEFAULT(600, game->config.resolution_x));
- game->config.resolution_y = MAX(200, DEFAULT(600, game->config.resolution_y));
+ game->config.resolution_y = game->config.resolution_x+ FONT_SIZE;
game->config.fps = MAX(1, DEFAULT(60, game->config.fps));
game->config.ups = MAX(1, DEFAULT(30, game->config.ups));
if (!*game->config.font)
@@ -114,9 +115,8 @@ static void GameInitialize(game_t * game) {
game->bombs.color[1] = GAME_RED | GAME_OPAQUE;
/* :config */
- game->font = DefaultFont(game->config.font);
+ RaylibInitialize(game);
- RaylibInitialize(game->config.resolution_x, game->config.resolution_y, game->config.window_name, game->font);
GameRecalculateViewport(game);
game->spritesheet = LoadTexture(game->config.spritesheet);