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,21 @@
#include "entity.h"
#include "cells.h"
#include "vector.h"
#include "world.h"
int EntityMove(entity* e, vec2 pos) {
world* world = e->world;
if(world->wells[at(pos.x,pos.y, world)].cell->flags & (CELL_FLAG_BLOCKING)){
return 1;
}
if(world->wells[at(pos.x,pos.y, world)].entityIds[0] != NULL){
return 2;
}
world->wells[at(e->position.x,e->position.y, world)].entityIds[0] = 0;
world->wells[at(pos.x,pos.y, world)].entityIds[0] = e;
e->position = pos;
return 0;
}