// // R_MakeSpans // void R_MakeSpans ( int x, int t1, int b1, int t2, int b2 ) { while (t1 < t2 && t1<=b1) { R_MapPlane (t1,spanstart[t1],x-1); t1++; } while (b1 > b2 && b1>=t1) { R_MapPlane (b1,spanstart[b1],x-1); b1--; } while (t2 < t1 && t2<=b2) { spanstart[t2] = x; t2++; } while (b2 > b1 && b2>=t2) { spanstart[b2] = x; b2--; } }
//----------------------------------------------------------------------------- // // R_MakeSpans // static void R_MakeSpans (visplane_t *pl) { int x; for (x = pl->minx; x <= pl->maxx + 1; ++x) { dushort_t t1 = pl->top[x]; dushort_t b1 = pl->bottom[x]; dushort_t t2 = pl->top[x+1]; dushort_t b2 = pl->bottom[x+1]; for (; t1 < t2 && t1 <= b1; ++t1) R_MapPlane(t1, spanstart[t1], x - 1); for (; b1 > b2 && b1 >= t1; --b1) R_MapPlane(b1, spanstart[b1], x - 1); while (t2 < t1 && t2 <= b2) spanstart[t2++] = x; while (b2 > b1 && b2 >= t2) spanstart[b2--] = x; } }
void R_MakeSpans(int x, unsigned int t1, unsigned int b1, unsigned int t2, unsigned int b2) // [crispy] 32-bit integer math { while (t1 < t2 && t1 <= b1) { R_MapPlane(t1, spanstart[t1], x - 1); t1++; } while (b1 > b2 && b1 >= t1) { R_MapPlane(b1, spanstart[b1], x - 1); b1--; } while (t2 < t1 && t2 <= b2) { spanstart[t2] = x; t2++; } while (b2 > b1 && b2 >= t2) { spanstart[b2] = x; b2--; } }