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

Function DrawFlaskTop

Source/control.cpp:191–194  ·  view source on GitHub ↗

* Draws a section of the empty flask cel on top of the panel to create the illusion * of the flask getting empty. This function takes a cel and draws a * horizontal stripe of height (max-min) onto the given buffer. * @param out Target buffer. * @param position Buffer coordinate. * @param celBuf Buffer of the empty flask cel. * @param y0 Top of the flask cel section to draw. * @param

Source from the content-addressed store, hash-verified

189 * @param y1 Bottom of the flask cel section to draw.
190 */
191void DrawFlaskTop(const Surface &out, Point position, const Surface &celBuf, int y0, int y1)
192{
193 out.BlitFrom(celBuf, MakeSdlRect(0, static_cast<decltype(SDL_Rect {}.y)>(y0), celBuf.w(), y1 - y0), position);
194}
195
196/**
197 * Draws the dome of the flask that protrudes above the panel top line.

Callers 1

DrawFlaskLowerFunction · 0.85

Calls 3

MakeSdlRectFunction · 0.85
BlitFromMethod · 0.80
wMethod · 0.80

Tested by

no test coverage detected