there is now a player character and the world renders using a cammera
This commit is contained in:
32
source/game_source/world.h
Normal file
32
source/game_source/world.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user