MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / blt

Method blt

2dlib/viewport.cpp:217–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void grViewport::blt(int dx, int dy, grSurface *ssf) {
218 int x1, y1, x2, y2, sx, sy;
219
220 // perform rectangular clipping
221 x1 = global_x(dx);
222 y1 = global_y(dy);
223 x2 = x1 + ssf->width() - 1;
224 y2 = y1 + ssf->height() - 1;
225
226 if (x1 < CLIP_LEFT)
227 sx = CLIP_LEFT - x1;
228 else
229 sx = 0;
230 if (y1 < CLIP_TOP)
231 sy = CLIP_TOP - y1;
232 else
233 sy = 0;
234
235 if (clip_rect(x1, y1, x2, y2) == 2)
236 return;
237
238 sf_Parent->blt(x1, y1, ssf, sx, sy, x2 - x1 + 1, y2 - y1 + 1);
239}
240
241void grViewport::blt(int dx, int dy, grSurface *ssf, int sx, int sy, int sw, int sh) {
242 int x1, y1, x2, y2;

Callers

nothing calls this directly

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected