diff options
author | rubidium <rubidium@openttd.org> | 2008-05-08 13:21:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-08 13:21:55 +0000 |
commit | cabd771fc0b99d42aaa7e172172ad39211933461 (patch) | |
tree | 5b59a1c33296df3cf6d606314b7975d74eed399c /src | |
parent | e48a351f8e006b19d9e2c7bf9ef672a1e141d85f (diff) | |
download | openttd-cabd771fc0b99d42aaa7e172172ad39211933461.tar.xz |
(svn r13009) -Codechange: move more tile highlighting related functions/types to tilehighlight_*.h.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui.h | 29 | ||||
-rw-r--r-- | src/tilehighlight_func.h | 5 | ||||
-rw-r--r-- | src/tilehighlight_type.h | 2 | ||||
-rw-r--r-- | src/viewport.cpp | 2 | ||||
-rw-r--r-- | src/viewport_func.h | 5 | ||||
-rw-r--r-- | src/viewport_type.h | 29 |
6 files changed, 36 insertions, 36 deletions
@@ -48,35 +48,6 @@ void ShowBuildAirToolbar(); void ShowGenerateLandscape(); void ShowHeightmapLoad(); -/** Drag and drop selection process, or, what to do with an area of land when - * you've selected it. */ -enum { - DDSP_DEMOLISH_AREA, - DDSP_RAISE_AND_LEVEL_AREA, - DDSP_LOWER_AND_LEVEL_AREA, - DDSP_LEVEL_AREA, - DDSP_CREATE_DESERT, - DDSP_CREATE_ROCKS, - DDSP_CREATE_WATER, - DDSP_CREATE_RIVER, - DDSP_PLANT_TREES, - DDSP_BUILD_BRIDGE, - - /* Rail specific actions */ - DDSP_PLACE_RAIL_NE, - DDSP_PLACE_RAIL_NW, - DDSP_PLACE_AUTORAIL, - DDSP_BUILD_SIGNALS, - DDSP_BUILD_STATION, - DDSP_REMOVE_STATION, - DDSP_CONVERT_RAIL, - - /* Road specific actions */ - DDSP_PLACE_ROAD_X_DIR, - DDSP_PLACE_ROAD_Y_DIR, - DDSP_PLACE_AUTOROAD, -}; - /* misc_gui.cpp */ void PlaceLandBlockInfo(); void ShowAboutWindow(); diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h index 13278aa5f..3789134b1 100644 --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -20,6 +20,11 @@ bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, ViewportHighl void SetObjectToPlaceWnd(CursorID icon, SpriteID pal, ViewportHighlightMode mode, Window *w); void SetObjectToPlace(CursorID icon, SpriteID pal, ViewportHighlightMode mode, WindowClass window_class, WindowNumber window_num); +void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method); +void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process); +void VpSetPresizeRange(TileIndex from, TileIndex to); +void VpSetPlaceSizingLimit(int limit); + extern PlaceProc *_place_proc; extern TileHighlightData _thd; diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h index 0637d374e..1ad04d9ea 100644 --- a/src/tilehighlight_type.h +++ b/src/tilehighlight_type.h @@ -69,7 +69,7 @@ struct TileHighlightData { WindowNumber window_number; ViewportPlaceMethod select_method; - byte select_proc; + ViewportDragDropSelectionProcess select_proc; TileIndex redsq; }; diff --git a/src/viewport.cpp b/src/viewport.cpp index 3de54e987..fed5d26e9 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2228,7 +2228,7 @@ void UpdateTileSelection() } /** highlighting tiles while only going over them with the mouse */ -void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, byte process) +void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process) { _thd.select_method = method; _thd.select_proc = process; diff --git a/src/viewport_func.h b/src/viewport_func.h index 7be3e733e..3cada2a1d 100644 --- a/src/viewport_func.h +++ b/src/viewport_func.h @@ -51,11 +51,6 @@ void SetTileSelectBigSize(int ox, int oy, int sx, int sy); Vehicle *CheckMouseOverVehicle(); -void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method); -void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, byte process); -void VpSetPresizeRange(TileIndex from, TileIndex to); -void VpSetPlaceSizingLimit(int limit); - void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom); void ResetObjectToPlace(); diff --git a/src/viewport_type.h b/src/viewport_type.h index 166ca6593..98f56b885 100644 --- a/src/viewport_type.h +++ b/src/viewport_type.h @@ -58,4 +58,33 @@ enum ViewportPlaceMethod { VPM_SIGNALDIRS = 6, ///< similiar to VMP_RAILDIRS, but with different cursor }; +/** Drag and drop selection process, or, what to do with an area of land when + * you've selected it. */ +enum ViewportDragDropSelectionProcess { + DDSP_DEMOLISH_AREA, + DDSP_RAISE_AND_LEVEL_AREA, + DDSP_LOWER_AND_LEVEL_AREA, + DDSP_LEVEL_AREA, + DDSP_CREATE_DESERT, + DDSP_CREATE_ROCKS, + DDSP_CREATE_WATER, + DDSP_CREATE_RIVER, + DDSP_PLANT_TREES, + DDSP_BUILD_BRIDGE, + + /* Rail specific actions */ + DDSP_PLACE_RAIL_NE, + DDSP_PLACE_RAIL_NW, + DDSP_PLACE_AUTORAIL, + DDSP_BUILD_SIGNALS, + DDSP_BUILD_STATION, + DDSP_REMOVE_STATION, + DDSP_CONVERT_RAIL, + + /* Road specific actions */ + DDSP_PLACE_ROAD_X_DIR, + DDSP_PLACE_ROAD_Y_DIR, + DDSP_PLACE_AUTOROAD, +}; + #endif /* VIEWPORT_TYPE_H */ |