From c06905149286c3fbd803d3ca7522bbe66a6ad129 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 3 Nov 2007 13:46:45 +0000 Subject: Unleashing the polygon virus! (I.e. fixing a compiler warning and a, what I think is a, logical error. Also changing swaps to use the template SWAP.) svn-id: r29385 --- engines/cruise/mainDraw.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp index 106be81782..d8741f30ec 100644 --- a/engines/cruise/mainDraw.cpp +++ b/engines/cruise/mainDraw.cpp @@ -397,11 +397,7 @@ void buildSegment(void) if(Y2 >= Y1) { - int16* temp; - - temp=BX; - BX = DI; - DI = temp; + SWAP(BX, DI); } do @@ -425,20 +421,11 @@ void buildSegment(void) cx = -cx; dx = Y2; - int temp; - temp = X1; - X1 = X2; - X2 = temp; - - temp = Y1; - Y1 = Y2; - Y2 = temp; + SWAP(X1, X2); + SWAP(Y1, Y2); } // swap again ? - int temp; - temp = X1; - X1 = X2; - X2 = temp; + SWAP(X1, X2); int patchAdd = 2; @@ -480,10 +467,7 @@ void buildSegment(void) { stepType = 1; // DX < DY - int temp; - temp = dy; - dy = cx; - cx = dy; + SWAP(dy, cx); } int patchinc1 = 2*dy; -- cgit v1.2.3