Convert dynent to a class

FossilOrigin-Name: d2b3ff790fee10ef4150cdb17f1c979e7001a420b2629b153b4dbf4c0b489704
This commit is contained in:
Jonathan Schleifer 2025-03-09 18:57:42 +00:00
parent 410e244ed6
commit 90fc249052
26 changed files with 1447 additions and 1061 deletions

View file

@ -4,6 +4,8 @@
#include "cube.h"
#import "DynamicEntity.h"
void
render_wall(sqr *o, sqr *s, int x1, int y1, int x2, int y2, int mip, sqr *d1,
sqr *d2, bool topleft)
@ -135,7 +137,7 @@ render_seg_new(
// first collect occlusion information for this block
for (int oy = y; oy < ys; oy++) {
SWS(w, ox, oy, sz)->occluded =
isoccluded(player1->o.x, player1->o.y,
isoccluded(player1.o.x, player1.o.y,
(float)(ox << mip), (float)(oy << mip), fsize);
}
}
@ -144,8 +146,8 @@ render_seg_new(
int pvy = (int)vy >> mip;
if (pvx >= 0 && pvy >= 0 && pvx < sz && pvy < sz) {
// SWS(w,vxx,vyy,sz)->occluded = 0;
SWS(w, pvx, pvy, sz)->occluded =
0; // player cell never occluded
// player cell never occluded
SWS(w, pvx, pvy, sz)->occluded = 0;
}
#define df(x) s->floor - (x->vdelta / 4.0f)