| 324 | { |
| 325 | const int xo[] = { 0, 0, 1, 1, 0 }, yo[] = {0, 1, 1, 0, 0 }; |
| 326 | loopv(tagclipcubes) // all non-solid & have clips |
| 327 | { |
| 328 | int x = tagclipcubes[i] & 0xFFFF, y = tagclipcubes[i] >> 16; |
| 329 | ASSERT(!OUTBORD(x, y)); |
| 330 | sqr *s = S(x,y), *o[9]; |
| 331 | if(s->tag & TAGCLIP) linestyle(tagcliplinewidth, 0xFF, 0xFF, 0); // yello |
| 332 | else linestyle(tagcliplinewidth, 0xFF, 0, 0xFF); // magenta |
| 333 | o[8] = SWS(s,-1,-1,sfactor); |
| 334 | o[3] = o[8] + 1; // 837 |
| 335 | o[7] = o[3] + 1; // 0s2 |
| 336 | o[0] = o[4] = SWS(s,-1,0,sfactor); // 516 |
| 337 | o[2] = o[0] + 2; |
| 338 | o[5] = SWS(s,-1,1,sfactor); |
| 339 | o[1] = o[5] + 1; |
| 340 | o[6] = o[1] + 1; |
| 341 | bool clipped[9]; |
| 342 | loopj(9) clipped[j] = !SOLID(o[j]) && (o[j]->tag & TAGANYCLIP) > 0; |
| 343 | int h = s->floor - (s->type == FHF ? (s->vdelta + 3) / 4 : 0), c = s->ceil + (s->type == CHF ? (s->vdelta + 3) / 4 : 0); |
| 344 | loopk(4) if((clipped[k] == clipped[k+1]) && !(clipped[k] && clipped[k + 5])) line(x + xo[k+1], y + yo[k+1], h, x + xo[k+1], y + yo[k+1], c); |
| 345 | for( ; h < c; h++) |
| 346 | { |
| 347 | int k = (h + x + y) & 3; |
| 348 | if(k < 2 && !clipped[k]) line(x + xo[k], y + yo[k], h + 1, x + xo[k+1], y + yo[k+1], h); |
| 349 | k = (h - x - y) & 3; |
| 350 | if(k > 1 && !clipped[k]) line(x + xo[k], y + yo[k], h + 1, x + xo[k+1], y + yo[k+1], h); |
| 351 | } |
| 352 | if(sparkletime && tagnumfull) particle_cube(s->tag & TAGCLIP ? PART_EPICKUP : PART_EMODEL, tagnumfull, 30, x, y); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | glLineWidth(1); |
no test coverage detected