summaryrefslogtreecommitdiff
path: root/src/viewport.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-05-15 14:08:39 +0000
committertruelight <truelight@openttd.org>2007-05-15 14:08:39 +0000
commitd3f375231f194f0d29ac4020337cfafd46ede9bf (patch)
tree8be72fe02f196559ceab115af10a4a7e142fc46a /src/viewport.h
parent196ddae1db750e9e502bf972352f2cee747100aa (diff)
downloadopenttd-d3f375231f194f0d29ac4020337cfafd46ede9bf.tar.xz
(svn r9844) -Codechange: replace zoomlevel with an enum
-Codechange: use predefined enums for viewport zoomlevels
Diffstat (limited to 'src/viewport.h')
-rw-r--r--src/viewport.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/viewport.h b/src/viewport.h
index f40a671ee..e69690e20 100644
--- a/src/viewport.h
+++ b/src/viewport.h
@@ -5,6 +5,8 @@
#ifndef VIEWPORT_H
#define VIEWPORT_H
+#include "zoom.hpp"
+
struct ViewPort {
int left,top; // screen coordinates for the viewport
int width, height; // screen width/height for the viewport
@@ -12,7 +14,7 @@ struct ViewPort {
int virtual_left, virtual_top; // virtual coordinates
int virtual_width, virtual_height; // these are just width << zoom, height << zoom
- byte zoom;
+ ZoomLevel zoom;
};
void SetSelectionRed(bool);
@@ -21,7 +23,7 @@ void SetSelectionRed(bool);
void InitViewports();
void DeleteWindowViewport(Window *w);
void AssignWindowViewport(Window *w, int x, int y,
- int width, int height, uint32 follow_flags, byte zoom);
+ int width, int height, uint32 follow_flags, ZoomLevel zoom);
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y);
Point GetTileBelowCursor();
void UpdateViewportPosition(Window *w);