Changeset - r771:536180419d28
[Not reviewed]
master
0 1 0
darkvater - 19 years ago 2004-12-22 21:37:28
darkvater@openttd.org
(svn r1237) -Fix: Viewports crash when too many viewports are open. Their amount was not updated to reflect the updated windows amount (thx lefti)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
viewport.h
Show inline comments
 
@@ -90,24 +90,25 @@ typedef struct TileHighlightData {
 
	bool make_square_red;
 
	uint16 window_number;
 

	
 
	int userdata;
 
	TileIndex redsq;
 
} TileHighlightData;
 

	
 

	
 
// common button handler
 
bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc);
 

	
 
/* viewport.c */
 
VARDEF ViewPort _viewports[18];
 
// XXX - maximum viewports is maximum windows - 2 (main toolbar + status bar)
 
VARDEF ViewPort _viewports[25 - 2];
 
VARDEF TileHighlightData _thd;
 
VARDEF uint32 _active_viewports;
 

	
 
VARDEF Point _tile_fract_coords;
 

	
 
extern TileHighlightData * const _thd_ptr;
 

	
 

	
 
void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom);
 

	
 
#endif /* VIEWPORT_H */
0 comments (0 inline, 0 general)