mirror of
https://github.com/zoriya/ForecastingVillage.git
synced 2026-06-03 10:55:57 +00:00
Adding a seed for the random
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
+1
-1
Submodule lib/gamacon updated: 1715d0ecd3...7577a73428
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user