MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DrawViewport

Method DrawViewport

src/viewport.cpp:1903–1916  ·  view source on GitHub ↗

* Draw the viewport of this window. */

Source from the content-addressed store, hash-verified

1901 * Draw the viewport of this window.
1902 */
1903void Window::DrawViewport() const
1904{
1905 PerformanceAccumulator framerate(PFE_DRAWWORLD);
1906
1907 DrawPixelInfo *dpi = _cur_dpi;
1908
1909 dpi->left += this->left;
1910 dpi->top += this->top;
1911
1912 ViewportDraw(*this->viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height);
1913
1914 dpi->left -= this->left;
1915 dpi->top -= this->top;
1916}
1917
1918/**
1919 * Ensure that a given viewport has a valid scroll position.

Callers 1

DrawMethod · 0.80

Calls 1

ViewportDrawFunction · 0.85

Tested by

no test coverage detected