diff src/viewport.cpp @ 9273:72a6d2e60834 draft

(svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming.
author rubidium <rubidium@openttd.org>
date Sat, 17 May 2008 12:48:06 +0000 (2008-05-17)
parents 07d38b0d61ce
children 85a62fb8608f
line wrap: on
line diff
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1536,17 +1536,17 @@
 	ViewportDrawChk(vp, left, top, right, bottom);
 }
 
-void DrawWindowViewport(const Window *w)
+void Window::DrawViewport() const
 {
 	DrawPixelInfo *dpi = _cur_dpi;
 
-	dpi->left += w->left;
-	dpi->top += w->top;
-
-	ViewportDraw(w->viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height);
-
-	dpi->left -= w->left;
-	dpi->top -= w->top;
+	dpi->left += this->left;
+	dpi->top += this->top;
+
+	ViewportDraw(this->viewport, dpi->left, dpi->top, dpi->left + dpi->width, dpi->top + dpi->height);
+
+	dpi->left -= this->left;
+	dpi->top -= this->top;
 }
 
 static inline void ClampViewportToMap(const ViewPort *vp, int &x, int &y)