MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / DoRenderBackwards

Function DoRenderBackwards

Source/engine/render/clx_render.cpp:218–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217template <typename BlitFn>
218void DoRenderBackwards(
219 const Surface &out, Point position, const uint8_t *src, size_t srcSize,
220 unsigned srcWidth, unsigned srcHeight, BlitFn &&blitFn)
221{
222 if (position.y < 0 || position.y + 1 >= static_cast<int>(out.h() + srcHeight))
223 return;
224 const ClipX clipX = CalculateClipX(position.x, srcWidth, out);
225 if (clipX.width <= 0)
226 return;
227 const RenderSrc srcForBackwards { src, src + srcSize, static_cast<uint_fast16_t>(srcWidth) };
228 if (static_cast<std::size_t>(clipX.width) == srcWidth) {
229 DoRenderBackwardsClipY(
230 out, position, srcForBackwards, std::forward<BlitFn>(blitFn));
231 } else {
232 DoRenderBackwardsClipXY(
233 out, position, srcForBackwards, clipX, std::forward<BlitFn>(blitFn));
234 }
235}
236
237constexpr size_t MaxOutlinePixels = 4096;
238constexpr size_t MaxOutlineSpriteWidth = 253;

Callers 4

ClxDrawFunction · 0.85
ClxDrawTRNFunction · 0.85
ClxDrawBlendedFunction · 0.85
ClxDrawBlendedTRNFunction · 0.85

Calls 4

CalculateClipXFunction · 0.85
DoRenderBackwardsClipYFunction · 0.85
DoRenderBackwardsClipXYFunction · 0.85
hMethod · 0.80

Tested by

no test coverage detected