Differences From Artifact [ae30288fea]:
- File
src/worldrender.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 10142) [annotate] [blame] [check-ins using]
To Artifact [60ed27f341]:
- File src/worldrender.m — part of check-in [5b7b7d2fc5] at 2025-03-24 22:14:24 on branch trunk — Convert player into a class (user: js, size: 10170) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 | // worldrender.cpp: goes through all cubes in top down quad tree fashion, // determines what has to be rendered and how (depending on neighbouring cubes), // then calls functions in rendercubes.cpp #include "cube.h" | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | // worldrender.cpp: goes through all cubes in top down quad tree fashion, // determines what has to be rendered and how (depending on neighbouring cubes), // then calls functions in rendercubes.cpp #include "cube.h" #import "Player.h" void render_wall(struct sqr *o, struct sqr *s, int x1, int y1, int x2, int y2, int mip, struct sqr *d1, struct sqr *d2, bool topleft) { if (SOLID(o) || o->type == SEMISOLID) { float c1 = s->floor; |
︙ | ︙ | |||
129 130 131 132 133 134 135 136 137 138 139 140 141 142 | vxx - lodleft; // these mark the rect inside the current rest that // we want to render using a lower mip level int ly = vyy - lodtop; int rx = vxx + lodright; int ry = vyy + lodbot; float fsize = (float)(1 << mip); for (int ox = x; ox < xs; ox++) { // first collect occlusion information for this block for (int oy = y; oy < ys; oy++) { SWS(w, ox, oy, sz)->occluded = isoccluded(player1.origin.x, player1.origin.y, (float)(ox << mip), (float)(oy << mip), fsize); } | > | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | vxx - lodleft; // these mark the rect inside the current rest that // we want to render using a lower mip level int ly = vyy - lodtop; int rx = vxx + lodright; int ry = vyy + lodbot; float fsize = (float)(1 << mip); Player *player1 = Player.player1; for (int ox = x; ox < xs; ox++) { // first collect occlusion information for this block for (int oy = y; oy < ys; oy++) { SWS(w, ox, oy, sz)->occluded = isoccluded(player1.origin.x, player1.origin.y, (float)(ox << mip), (float)(oy << mip), fsize); } |
︙ | ︙ |