From 9874cc20f9236c4d3e21566581a83a310bd729e5 Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Fri, 1 May 2020 16:23:38 +0200
Subject: [PATCH] Adding a seed for the random
---
Makefile | 3 ++-
lib/gamacon | 2 +-
src/game_loader.c | 3 +++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index d1b584f..650767b 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,8 @@ SRC = src/main.c \
src/combat/attacks.c \
src/player_utilities.c \
src/systems/inventory.c \
- src/systems/game_over.c
+ src/systems/game_over.c \
+ src/npc/mia.c
OBJ = $(SRC:%.c=%.o)
diff --git a/lib/gamacon b/lib/gamacon
index 1715d0e..7577a73 160000
--- a/lib/gamacon
+++ b/lib/gamacon
@@ -1 +1 @@
-Subproject commit 1715d0ecd313c622d77ca2cc52f2b87cc716f1d0
+Subproject commit 7577a7342880f72d8755ec92ea5bd66f6ebc235e
diff --git a/src/game_loader.c b/src/game_loader.c
index 2f42c3f..46a866f 100644
--- a/src/game_loader.c
+++ b/src/game_loader.c
@@ -28,6 +28,8 @@
#include "components/xp_component.h"
#include "systems/game_over.h"
#include
+#include
+#include
const struct callback callbacks[] = {
{"start_button", &start_button},
@@ -166,6 +168,7 @@ int start_game(bool map_editor)
gc_engine *engine = engine_create();
sfClock *clock = sfClock_create();
+ srand((unsigned int)time(NULL));
if (!engine || engine_use_sfml(engine, "Forecasting village", 60) < 0)
return (ERROR);
if (create_game_scene(engine, map_editor) < 0)