Adding a seed for the random

This commit is contained in:
Anonymus Raccoon
2020-05-01 16:23:38 +02:00
parent be29d7ab88
commit 9874cc20f9
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -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)
+3
View File
@@ -28,6 +28,8 @@
#include "components/xp_component.h"
#include "systems/game_over.h"
#include <malloc.h>
#include <time.h>
#include <stdlib.h>
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)