viewport.h
author Darkvater
Tue, 07 Nov 2006 13:01:36 +0000
changeset 5044 e4e5bcdd79c6
parent 5026 d589561bc43d
child 5045 846098142ffe
permissions -rw-r--r--
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
a bit more sensibly.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2116
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2116
diff changeset
     2
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
#ifndef VIEWPORT_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
#define VIEWPORT_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
struct ViewPort {
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
     7
	int left,top;                       // screen coordinates for the viewport
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
     8
	int width, height;                  // screen width/height for the viewport
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    10
	int virtual_left, virtual_top;      // virtual coordinates
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    11
	int virtual_width, virtual_height;  // these are just width << zoom, height << zoom
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 152
diff changeset
    13
	byte zoom;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    15
1990
efb67f977138 (svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the selection wasn't correctly redrawn
tron
parents: 1977
diff changeset
    16
void SetSelectionRed(bool);
efb67f977138 (svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the selection wasn't correctly redrawn
tron
parents: 1977
diff changeset
    17
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
/* viewport.c */
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 152
diff changeset
    19
void AssignWindowViewport(Window *w, int x, int y,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    20
	int width, int height, uint32 follow_flags, byte zoom);
2116
23031555ff54 (svn r2626) static, const, misc.
tron
parents: 1990
diff changeset
    21
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y);
1093
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 1070
diff changeset
    22
Point GetTileBelowCursor(void);
5044
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    23
void UpdateViewportPosition(Window *w);
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    24
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    25
enum {
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    26
	ZOOM_IN   = 0,
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    27
	ZOOM_OUT  = 1,
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    28
	ZOOM_NONE = 2, // hack, used to update the button status
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    29
};
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    30
e4e5bcdd79c6 (svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents: 5026
diff changeset
    31
bool DoZoomInOutWindow(int how, Window *w);
152
c3964b43943e (svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents: 133
diff changeset
    32
void ZoomInOrOutToCursorWindow(bool in, Window * w);
c3964b43943e (svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents: 133
diff changeset
    33
Point GetTileZoomCenterWindow(bool in, Window * w);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    34
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    35
void OffsetGroundSprite(int x, int y);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    37
void DrawGroundSprite(uint32 image);
849
c3407041774f (svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents: 835
diff changeset
    38
void DrawGroundSpriteAt(uint32 image, int32 x, int32 y, byte z);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    39
void AddSortableSpriteToDraw(uint32 image, int x, int y, int w, int h, byte dz, byte z);
5026
d589561bc43d (svn r7067) Remove the unused parameter params_3 from AddStringToDraw()
tron
parents: 4799
diff changeset
    40
void *AddStringToDraw(int x, int y, StringID string, uint32 params_1, uint32 params_2);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
void AddChildSpriteScreen(uint32 image, int x, int y);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    42
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    43
1093
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 1070
diff changeset
    44
void StartSpriteCombine(void);
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 1070
diff changeset
    45
void EndSpriteCombine(void);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    46
2116
23031555ff54 (svn r2626) static, const, misc.
tron
parents: 1990
diff changeset
    47
void HandleViewportClicked(const ViewPort *vp, int x, int y);
1093
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 1070
diff changeset
    48
void PlaceObject(void);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    49
void SetRedErrorSquare(TileIndex tile);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    50
void SetTileSelectSize(int w, int h);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    51
void SetTileSelectBigSize(int ox, int oy, int sx, int sy);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    52
1977
37bbebf94434 (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents: 1863
diff changeset
    53
void VpStartPlaceSizing(TileIndex tile, int user);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    54
void VpSetPresizeRange(uint from, uint to);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    55
void VpSetPlaceSizingLimit(int limit);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    56
1093
4fdc46eaf423 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents: 1070
diff changeset
    57
Vehicle *CheckMouseOverVehicle(void);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    58
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    59
enum {
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    60
	VPM_X_OR_Y          = 0,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    61
	VPM_FIX_X           = 1,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    62
	VPM_FIX_Y           = 2,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    63
	VPM_RAILDIRS        = 3,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    64
	VPM_X_AND_Y         = 4,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    65
	VPM_X_AND_Y_LIMITED = 5,
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    66
	VPM_SIGNALDIRS      = 6
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    67
};
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    68
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    69
// viewport highlight mode (for highlighting tiles below cursor)
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    70
enum {
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    71
	VHM_NONE    = 0, // default
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    72
	VHM_RECT    = 1, // rectangle (stations, depots, ...)
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    73
	VHM_POINT   = 2, // point (lower land, raise land, level land, ...)
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    74
	VHM_SPECIAL = 3, // special mode used for highlighting while dragging (and for tunnels/docks)
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    75
	VHM_DRAG    = 4, // dragging items in the depot windows
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    76
	VHM_RAIL    = 5, // rail pieces
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    77
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
void VpSelectTilesWithMethod(int x, int y, int method);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    80
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    81
// highlighting draw styles
4799
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    82
typedef byte HighLightStyle;
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    83
enum HighLightStyles {
4344
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    84
	HT_NONE   = 0x00,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    85
	HT_RECT   = 0x80,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    86
	HT_POINT  = 0x40,
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    87
	HT_LINE   = 0x20, /* used for autorail highlighting (longer streches)
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    88
	                   * (uses lower bits to indicate direction) */
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    89
	HT_RAIL   = 0x10, /* autorail (one piece)
7e123fec5b0b (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents: 2817
diff changeset
    90
	                  * (uses lower bits to indicate direction) */
4799
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    91
	HT_DRAG_MASK = 0xF0, ///< masks the drag-type
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    92
1109
ecb98f43ba2c (svn r1610) Remove trailing whitespace (last time ever, i hope)
tron
parents: 1093
diff changeset
    93
	/* lower bits (used with HT_LINE and HT_RAIL):
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
    94
	 * (see ASCII art in autorail.h for a visual interpretation) */
4799
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    95
	HT_DIR_X  = 0,    ///< X direction
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    96
	HT_DIR_Y  = 1,    ///< Y direction
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    97
	HT_DIR_HU = 2,    ///< horizontal upper
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    98
	HT_DIR_HL = 3,    ///< horizontal lower
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
    99
	HT_DIR_VL = 4,    ///< vertical left
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
   100
	HT_DIR_VR = 5,    ///< vertical right
20311e38bedf (svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents: 4344
diff changeset
   101
	HT_DIR_MASK = 0x7 ///< masks the drag-direction
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   102
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   104
typedef struct TileHighlightData {
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   105
	Point size;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   106
	Point outersize;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   107
	Point pos;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   108
	Point offs;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   109
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   110
	Point new_pos;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   111
	Point new_size;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   112
	Point new_outersize;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   113
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   114
	Point selend, selstart;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   115
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   116
	byte dirty;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   117
	byte sizelimit;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   118
1070
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
   119
	byte drawstyle;      // lower bits 0-3 are reserved for detailed highlight information information
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
   120
	byte new_drawstyle;  // only used in UpdateTileSelection() to as a buffer to compare if there was a change between old and new
bd31ed783fd3 (svn r1571) Feature: Visually enhanced autorail placing
dominik
parents: 873
diff changeset
   121
	byte next_drawstyle; // queued, but not yet drawn style
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   122
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   123
	byte place_mode;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   124
	bool make_square_red;
873
732553f5b169 (svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
tron
parents: 849
diff changeset
   125
	WindowClass window_class;
732553f5b169 (svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
tron
parents: 849
diff changeset
   126
	WindowNumber window_number;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   127
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   128
	int userdata;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   129
	TileIndex redsq;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   130
} TileHighlightData;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   131
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   132
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   133
// common button handler
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   134
bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   135
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   136
/* viewport.c */
771
f08bcce4c58a (svn r1237) -Fix: Viewports crash when too many viewports are open. Their amount was not updated to reflect the updated windows amount (thx lefti)
darkvater
parents: 513
diff changeset
   137
// XXX - maximum viewports is maximum windows - 2 (main toolbar + status bar)
f08bcce4c58a (svn r1237) -Fix: Viewports crash when too many viewports are open. Their amount was not updated to reflect the updated windows amount (thx lefti)
darkvater
parents: 513
diff changeset
   138
VARDEF ViewPort _viewports[25 - 2];
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   139
VARDEF uint32 _active_viewports;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   140
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   141
VARDEF Point _tile_fract_coords;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   142
1863
74a8379bb868 (svn r2369) Remove _thd_ptr: It always holds the address of _thd
tron
parents: 1109
diff changeset
   143
extern TileHighlightData _thd;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   144
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   145
430
2e9a2e9fcf11 (svn r631) Merge r440, r444, r485, r630 to trunk:
tron
parents: 193
diff changeset
   146
void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom);
2e9a2e9fcf11 (svn r631) Merge r440, r444, r485, r630 to trunk:
tron
parents: 193
diff changeset
   147
2e9a2e9fcf11 (svn r631) Merge r440, r444, r485, r630 to trunk:
tron
parents: 193
diff changeset
   148
#endif /* VIEWPORT_H */