Files
skevity/source/game_source/world.h

33 lines
618 B
C

#ifndef WORLD_H
#define WORLD_H
#define at(X,Y,w) ((Y) * w->size_x ) + (X)
#include "cells.h"
#include "entity.h"
#include "entity_handler.h"
typedef struct {
cell* cell;
entity* entityIds[1];
} well;
typedef struct {
int size_x;
int size_y;
int player_spawn_x;
int player_spawn_y;
long seed;
int world_size;
well *wells;
well *prevWells;
entity_list* ent_list;
} world;
int UpdateWorld(world*);
int InitWorld(world*);
int CreateWorld(world*, long seed);
int AddEntity(world* w, entity* ent);
int RemoveEntity(world* w, entity* ent);
int GenerateWorld(world* w);
#endif