summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 68af110a8..775d44f32 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2522,8 +2522,8 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth
int dx = thd->selstart.x - (thd->selend.x & ~0xF);
int dy = thd->selstart.y - (thd->selend.y & ~0xF);
- w = myabs(dx) + 16;
- h = myabs(dy) + 16;
+ w = abs(dx) + 16;
+ h = abs(dy) + 16;
if (TileVirtXY(thd->selstart.x, thd->selstart.y) == TileVirtXY(x, y)) { // check if we're only within one tile
if (method == VPM_RAILDIRS) {
@@ -2678,7 +2678,7 @@ void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
switch (method) {
case VPM_X_OR_Y: /* drag in X or Y direction */
- if (myabs(sy - y) < myabs(sx - x)) {
+ if (abs(sy - y) < abs(sx - x)) {
y = sy;
style = HT_DIR_X;
} else {