Loading

Paste #p1xfftxyo

  1. Index: src/gfx.cpp
  2. ===================================================================
  3. --- src/gfx.cpp (revision 27323)
  4. +++ src/gfx.cpp (working copy)
  5. @@ -175,22 +175,11 @@
  6.  
  7.     assert(width > 0);
  8.  
  9. -   if (y2 == y) {
  10. -       /* Special case: horizontal line. */
  11. -       blitter->DrawLine(video,
  12. -               Clamp(x, 0, screen_width), y,
  13. -               Clamp(x2, 0, screen_width), y2,
  14. -               screen_width, screen_height, colour, width, dash);
  15. +   if (y2 == y || x2 == x) {
  16. +       /* Special case: horizontal/vertical line. All checks already done in GfxPreprocessLine. */
  17. +       blitter->DrawLine(video, x, y, x2, y2, screen_width, screen_height, colour, width, dash);
  18.         return;
  19.     }
  20. -   if (x2 == x) {
  21. -       /* Special case: vertical line. */
  22. -       blitter->DrawLine(video,
  23. -               x, Clamp(y, 0, screen_height),
  24. -               x2, Clamp(y2, 0, screen_height),
  25. -               screen_width, screen_height, colour, width, dash);
  26. -       return;
  27. -   }
  28.  
  29.     int grade_y = y2 - y;
  30.     int grade_x = x2 - x;
  31.  

Comments