there is now a player character and the world renders using a cammera

This commit is contained in:
2026-04-09 13:11:55 -07:00
parent 09c310cb4a
commit af639e62c3
47 changed files with 1737 additions and 83 deletions

View 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