equal
deleted
inserted
replaced
4 |
4 |
5 #ifndef GFX_H |
5 #ifndef GFX_H |
6 #define GFX_H |
6 #define GFX_H |
7 |
7 |
8 #include "openttd.h" |
8 #include "openttd.h" |
|
9 #include "zoom.hpp" |
9 |
10 |
10 enum WindowKeyCodes { |
11 enum WindowKeyCodes { |
11 WKC_SHIFT = 0x8000, |
12 WKC_SHIFT = 0x8000, |
12 WKC_CTRL = 0x4000, |
13 WKC_CTRL = 0x4000, |
13 WKC_ALT = 0x2000, |
14 WKC_ALT = 0x2000, |
70 WKC_F11 = 43, |
71 WKC_F11 = 43, |
71 WKC_F12 = 44, |
72 WKC_F12 = 44, |
72 |
73 |
73 /* backquote is the key left of "1" |
74 /* backquote is the key left of "1" |
74 * we only store this key here, no matter what character is really mapped to it |
75 * we only store this key here, no matter what character is really mapped to it |
75 * on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) */ |
76 * on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) */ |
76 WKC_BACKQUOTE = 45, |
77 WKC_BACKQUOTE = 45, |
77 WKC_PAUSE = 46, |
78 WKC_PAUSE = 46, |
78 |
79 |
79 /* 0-9 are mapped to 48-57 |
80 /* 0-9 are mapped to 48-57 |
80 * A-Z are mapped to 65-90 |
81 * A-Z are mapped to 65-90 |
134 |
135 |
135 struct DrawPixelInfo { |
136 struct DrawPixelInfo { |
136 Pixel *dst_ptr; |
137 Pixel *dst_ptr; |
137 int left, top, width, height; |
138 int left, top, width, height; |
138 int pitch; |
139 int pitch; |
139 uint16 zoom; |
140 ZoomLevel zoom; |
140 }; |
141 }; |
141 |
142 |
142 struct Colour { |
143 struct Colour { |
143 byte r; |
144 byte r; |
144 byte g; |
145 byte g; |
241 bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height); |
242 bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height); |
242 |
243 |
243 /* window.cpp */ |
244 /* window.cpp */ |
244 void DrawOverlappedWindowForAll(int left, int top, int right, int bottom); |
245 void DrawOverlappedWindowForAll(int left, int top, int right, int bottom); |
245 |
246 |
246 void SetMouseCursor(CursorID cursor); |
|
247 void SetMouseCursor(SpriteID sprite, SpriteID pal); |
247 void SetMouseCursor(SpriteID sprite, SpriteID pal); |
248 void SetAnimatedMouseCursor(const AnimCursor *table); |
248 void SetAnimatedMouseCursor(const AnimCursor *table); |
249 void CursorTick(); |
249 void CursorTick(); |
250 void DrawMouseCursor(); |
250 void DrawMouseCursor(); |
251 void ScreenSizeChanged(); |
251 void ScreenSizeChanged(); |