equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
|
2 |
|
3 /** @file terraform_gui.cpp */ |
2 |
4 |
3 #include "stdafx.h" |
5 #include "stdafx.h" |
4 #include "openttd.h" |
6 #include "openttd.h" |
5 #include "bridge_map.h" |
7 #include "bridge_map.h" |
6 #include "clear_map.h" |
8 #include "clear_map.h" |
89 if (success) SndPlayTileFx(SND_1F_SPLAT, end); |
91 if (success) SndPlayTileFx(SND_1F_SPLAT, end); |
90 } |
92 } |
91 |
93 |
92 /** |
94 /** |
93 * A central place to handle all X_AND_Y dragged GUI functions. |
95 * A central place to handle all X_AND_Y dragged GUI functions. |
94 * @param e @WindowEvent variable holding in its higher bits (excluding the lower |
96 * @param e WindowEvent variable holding in its higher bits (excluding the lower |
95 * 4, since that defined the X_Y drag) the type of action to be performed |
97 * 4, since that defined the X_Y drag) the type of action to be performed |
96 * @return Returns true if the action was found and handled, and false otherwise. This |
98 * @return Returns true if the action was found and handled, and false otherwise. This |
97 * allows for additional implements that are more local. For example X_Y drag |
99 * allows for additional implements that are more local. For example X_Y drag |
98 * of convertrail which belongs in rail_gui.c and not terraform_gui.c |
100 * of convertrail which belongs in rail_gui.cpp and not terraform_gui.cpp |
99 **/ |
101 **/ |
100 bool GUIPlaceProcDragXY(const WindowEvent *e) |
102 bool GUIPlaceProcDragXY(const WindowEvent *e) |
101 { |
103 { |
102 TileIndex start_tile = e->we.place.starttile; |
104 TileIndex start_tile = e->we.place.starttile; |
103 TileIndex end_tile = e->we.place.tile; |
105 TileIndex end_tile = e->we.place.tile; |