summaryrefslogtreecommitdiff
path: root/viewport.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-18 00:14:43 +0000
committerDarkvater <darkvater@openttd.org>2006-11-18 00:14:43 +0000
commitc4d841dcdbabb1f600dce2f5c150e66fdc432f77 (patch)
tree75a3954c33043c724e452fafd6ef0b60291b6eb6 /viewport.c
parent2754eeb98959e4f3ffa9c7aea6ba65314994df4b (diff)
downloadopenttd-c4d841dcdbabb1f600dce2f5c150e66fdc432f77.tar.xz
(svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById
instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c)
Diffstat (limited to 'viewport.c')
-rw-r--r--viewport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/viewport.c b/viewport.c
index 6d6f5cf58..feed484fd 100644
--- a/viewport.c
+++ b/viewport.c
@@ -165,7 +165,7 @@ void AssignWindowViewport(Window *w, int x, int y,
static Point _vp_move_offs;
-static void DoSetViewportPosition(Window *w, int left, int top, int width, int height)
+static void DoSetViewportPosition(const Window *w, int left, int top, int width, int height)
{
for (; w < _last_window; w++) {
if (left + width > w->left &&
@@ -1271,7 +1271,7 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
// Make sure we don't draw a too big area at a time.
// If we do, the sprite memory will overflow.
-static void ViewportDrawChk(ViewPort *vp, int left, int top, int right, int bottom)
+static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom)
{
if (((bottom - top) * (right - left) << vp->zoom) > 180000) {
if ((bottom - top) > (right - left)) {
@@ -1293,7 +1293,7 @@ static void ViewportDrawChk(ViewPort *vp, int left, int top, int right, int bott
}
}
-static inline void ViewportDraw(ViewPort *vp, int left, int top, int right, int bottom)
+static inline void ViewportDraw(const ViewPort *vp, int left, int top, int right, int bottom)
{
if (right <= vp->left || bottom <= vp->top) return;
@@ -1310,7 +1310,7 @@ static inline void ViewportDraw(ViewPort *vp, int left, int top, int right, int
ViewportDrawChk(vp, left, top, right, bottom);
}
-void DrawWindowViewport(Window *w)
+void DrawWindowViewport(const Window *w)
{
DrawPixelInfo *dpi = _cur_dpi;