adding multiplayer

This commit is contained in:
2026-04-15 06:57:15 -07:00
parent af639e62c3
commit 3a91db6321
32 changed files with 938 additions and 174 deletions

View File

@@ -37,8 +37,9 @@ int CammeraResize(cammera* c, int sx, int sy) {
int CammeraRender(cammera*c) {
jump(c->tw, (tart_vec2){0,0});
int ne = 1;
for(int i = 0; i < c->size_y; i++) {
for(int j = 0; j < c->size_x - 1; j++) {
for(int j = 0; j < c->size_x; j++) {
if(c->pos_y+i < c->w->size_y-1 && c->pos_y+i >= 0 && c->pos_x+j < c->w->size_x-1 && c->pos_x+j >= 0){
c->tw->palette[2].background.r = c->w->wells[at(c->pos_x+j,c->pos_y+i,c->w)].cell->tile.background.r;
@@ -49,6 +50,7 @@ int CammeraRender(cammera*c) {
c->tw->palette[2].forground.b = c->w->wells[at(c->pos_x+j,c->pos_y+i,c->w)].cell->tile.forground.b;
tart_jump(c->tw, (tart_vec2){j,i});
ne = 1;
for(int k = 0; k < 1; k++) {
if(c->w->wells[at((c->pos_x+j) ,(c->pos_y+i),c->w)].entityIds[0] != 0000) {
@@ -65,12 +67,14 @@ int CammeraRender(cammera*c) {
c->tw->palette[2].forground.b = c->w->wells[at(c->pos_x+j,c->pos_y+i,c->w)].entityIds[k]->tile.forground.b;
tart_insert_cell(c->tw, 2, c->w->wells[at((c->pos_x+j) ,(c->pos_y+i),c->w)]
.entityIds[k]->tile.simble);
printf("found entity %c\n", c->w->wells[at((c->pos_x+j) ,(c->pos_y+i),c->w)]
.entityIds[k]->tile.simble);
tart_jump(c->tw,(tart_vec2){j, i});
ne = 0;
}
}
if(ne) {
tart_insert_cell(c->tw, 2, c->w->wells[at((c->pos_x+j) ,(c->pos_y+i),c->w)]
.cell->tile.simble);
}
}
}
}