diff options
-rw-r--r-- | src/terraform_gui.cpp | 8 | ||||
-rw-r--r-- | src/viewport.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 48be17d99..62f609b6d 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -107,16 +107,16 @@ bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_t switch (proc) { case DDSP_DEMOLISH_AREA: - DoCommandP(end_tile, start_tile, _ctrl_pressed, CMD_CLEAR_AREA | CMD_MSG(STR_ERROR_CAN_T_CLEAR_THIS_AREA), CcPlaySound10); + DoCommandP(end_tile, start_tile, _ctrl_pressed ? 1 : 0, CMD_CLEAR_AREA | CMD_MSG(STR_ERROR_CAN_T_CLEAR_THIS_AREA), CcPlaySound10); break; case DDSP_RAISE_AND_LEVEL_AREA: - DoCommandP(end_tile, start_tile, LM_RAISE << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_RAISE_LAND_HERE), CcTerraform); + DoCommandP(end_tile, start_tile, LM_RAISE << 1 | (_ctrl_pressed ? 1 : 0), CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_RAISE_LAND_HERE), CcTerraform); break; case DDSP_LOWER_AND_LEVEL_AREA: - DoCommandP(end_tile, start_tile, LM_LOWER << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LOWER_LAND_HERE), CcTerraform); + DoCommandP(end_tile, start_tile, LM_LOWER << 1 | (_ctrl_pressed ? 1 : 0), CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LOWER_LAND_HERE), CcTerraform); break; case DDSP_LEVEL_AREA: - DoCommandP(end_tile, start_tile, LM_LEVEL << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LEVEL_LAND_HERE), CcTerraform); + DoCommandP(end_tile, start_tile, LM_LEVEL << 1 | (_ctrl_pressed ? 1 : 0), CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LEVEL_LAND_HERE), CcTerraform); break; case DDSP_CREATE_ROCKS: GenerateRockyArea(end_tile, start_tile); diff --git a/src/viewport.cpp b/src/viewport.cpp index 71824e367..84f042022 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1764,8 +1764,8 @@ static void SetSelectionTilesDirty() /* a_size, b_size describe a rectangle with rotated coordinates */ int a_size = x_size + y_size, b_size = x_size - y_size; - int interval_a = a_size < 0 ? -TILE_SIZE : TILE_SIZE; - int interval_b = b_size < 0 ? -TILE_SIZE : TILE_SIZE; + int interval_a = a_size < 0 ? -(int)TILE_SIZE : TILE_SIZE; + int interval_b = b_size < 0 ? -(int)TILE_SIZE : TILE_SIZE; for (int a = -interval_a; a != a_size + interval_a; a += interval_a) { for (int b = -interval_b; b != b_size + interval_b; b += interval_b) { |