Big initial commit: States, simulation, presentation, menus, some art.
This commit is contained in:
21
src/simulation/simulation_world.c
Normal file
21
src/simulation/simulation_world.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "simulation_world.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
Simulation_World simulation_create_world(uint32_t seed, uint8_t max_players, uint16_t width, uint16_t height) {
|
||||
Simulation_World w;
|
||||
memset(&w, 0, sizeof(Simulation_World));
|
||||
|
||||
w.game_world = game_world_create(seed, width, height);
|
||||
assert(w.game_world != NULL);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
void simulation_destroy_world(Simulation_World *simulation_world) {
|
||||
assert(simulation_world != NULL);
|
||||
|
||||
game_world_destroy(simulation_world->game_world);
|
||||
simulation_world->game_world = NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user