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

Method lock_clear

2dlib/viewport.cpp:332–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void grViewport::lock_clear(ddgr_color col) {
333 int l = CLIP_LEFT, t = CLIP_TOP, r = CLIP_RIGHT, b = CLIP_BOTTOM;
334 ddgr_surface *memsurf = sf_Parent->scratch_mem_surf;
335
336 ASSERT(vp_Locked);
337
338 if (sf_Parent->ddsfObj.flags & SURFFLAG_RENDERER) {
339 rend_FillRect(col, l, t, r, b);
340 } else {
341 memsurf->bpp = pen_Obj.sf->bpp;
342
343 gr_mem_surf_Init(memsurf, pen_Obj.data, pen_Obj.rowsize);
344 gr_mem_surf_Clear(memsurf, col, l, t, r - l + 1, b - t + 1);
345 }
346}
347
348void grViewport::lock_clear(ddgr_color col, int l, int t, int r, int b) {
349 ddgr_surface *memsurf = sf_Parent->scratch_mem_surf;

Callers

nothing calls this directly

Calls 3

gr_mem_surf_InitFunction · 0.85
gr_mem_surf_ClearFunction · 0.85
rend_FillRectFunction · 0.50

Tested by

no test coverage detected