From dd180a1e1883336a1edc3b4d6eac440f06e3685b Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Apr 2006 13:48:16 +0000 Subject: (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums --- dock_gui.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dock_gui.c') diff --git a/dock_gui.c b/dock_gui.c index da664345d..123d60923 100644 --- a/dock_gui.c +++ b/dock_gui.c @@ -173,10 +173,11 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e) tile_from = tile_to = e->place.tile; switch (GetTileSlope(tile_from, NULL)) { - case 3: tile_to += TileDiffXY(-1, 0); break; - case 6: tile_to += TileDiffXY( 0, -1); break; - case 9: tile_to += TileDiffXY( 0, 1); break; - case 12: tile_to += TileDiffXY( 1, 0); break; + case SLOPE_SW: tile_to += TileDiffXY(-1, 0); break; + case SLOPE_SE: tile_to += TileDiffXY( 0, -1); break; + case SLOPE_NW: tile_to += TileDiffXY( 0, 1); break; + case SLOPE_NE: tile_to += TileDiffXY( 1, 0); break; + default: break; } VpSetPresizeRange(tile_from, tile_to); } break; -- cgit v1.2.3-54-g00ecf