author | truebrain |
Fri, 18 Jul 2008 10:15:16 +0000 | |
branch | noai |
changeset 11168 | 3842648184cd |
parent 10513 | 33cb70ff2f5d |
permissions | -rw-r--r-- |
9723 | 1 |
/* $Id$ */ |
2 |
||
3 |
/** @file viewport_func.h Functions related to (drawing on) viewports. */ |
|
4 |
||
5 |
#ifndef VIEWPORT_FUNC_H |
|
6 |
#define VIEWPORT_FUNC_H |
|
7 |
||
8 |
#include "gfx_type.h" |
|
9 |
#include "viewport_type.h" |
|
10 |
#include "vehicle_type.h" |
|
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
11 |
#include "strings_type.h" |
10455
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
10294
diff
changeset
|
12 |
#include "window_type.h" |
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
10294
diff
changeset
|
13 |
#include "tile_type.h" |
9723 | 14 |
|
15 |
void SetSelectionRed(bool); |
|
16 |
||
17 |
void DeleteWindowViewport(Window *w); |
|
10294 | 18 |
void InitializeWindowViewport(Window *w, int x, int y, int width, int height, uint32 follow_flags, ZoomLevel zoom); |
9723 | 19 |
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y); |
20 |
Point GetTileBelowCursor(); |
|
21 |
void UpdateViewportPosition(Window *w); |
|
10455
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
10294
diff
changeset
|
22 |
void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str); |
9723 | 23 |
|
24 |
bool DoZoomInOutWindow(int how, Window *w); |
|
25 |
void ZoomInOrOutToCursorWindow(bool in, Window * w); |
|
26 |
Point GetTileZoomCenterWindow(bool in, Window * w); |
|
27 |
void HandleZoomMessage(Window *w, const ViewPort *vp, byte widget_zoom_in, byte widget_zoom_out); |
|
28 |
||
29 |
static inline void MaxZoomInOut(int how, Window *w) |
|
30 |
{ |
|
31 |
while (DoZoomInOutWindow(how, w)) {}; |
|
32 |
} |
|
33 |
||
34 |
void OffsetGroundSprite(int x, int y); |
|
35 |
||
36 |
void DrawGroundSprite(SpriteID image, SpriteID pal, const SubSprite *sub = NULL); |
|
37 |
void DrawGroundSpriteAt(SpriteID image, SpriteID pal, int32 x, int32 y, byte z, const SubSprite *sub = NULL); |
|
38 |
void AddSortableSpriteToDraw(SpriteID image, SpriteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = NULL); |
|
10249
58810805030e
(svn r12781) [NoAI] -Sync: with trunk r12711:12780.
rubidium
parents:
9724
diff
changeset
|
39 |
void AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2, uint16 color = 0, uint16 width = 0); |
9723 | 40 |
void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y, bool transparent = false, const SubSprite *sub = NULL); |
41 |
||
42 |
||
43 |
void StartSpriteCombine(); |
|
44 |
void EndSpriteCombine(); |
|
45 |
||
46 |
void HandleViewportClicked(const ViewPort *vp, int x, int y); |
|
47 |
void PlaceObject(); |
|
48 |
void SetRedErrorSquare(TileIndex tile); |
|
49 |
void SetTileSelectSize(int w, int h); |
|
50 |
void SetTileSelectBigSize(int ox, int oy, int sx, int sy); |
|
51 |
||
52 |
Vehicle *CheckMouseOverVehicle(); |
|
53 |
||
54 |
void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom); |
|
55 |
||
56 |
bool ScrollWindowTo(int x, int y, Window *w, bool instant = false); |
|
57 |
||
58 |
bool ScrollMainWindowToTile(TileIndex tile, bool instant = false); |
|
59 |
bool ScrollMainWindowTo(int x, int y, bool instant = false); |
|
60 |
||
61 |
extern Point _tile_fract_coords; |
|
62 |
||
63 |
#endif /* VIEWPORT_FUNC_H */ |