diff options
author | Sven Hesse | 2007-11-03 13:46:45 +0000 |
---|---|---|
committer | Sven Hesse | 2007-11-03 13:46:45 +0000 |
commit | c06905149286c3fbd803d3ca7522bbe66a6ad129 (patch) | |
tree | 89419c30b537799822c34c84d47662e54a1c2983 /engines/cruise | |
parent | 7cce6c8c430135efb516fcd73355a810bc7c33d3 (diff) | |
download | scummvm-rg350-c06905149286c3fbd803d3ca7522bbe66a6ad129.tar.gz scummvm-rg350-c06905149286c3fbd803d3ca7522bbe66a6ad129.tar.bz2 scummvm-rg350-c06905149286c3fbd803d3ca7522bbe66a6ad129.zip |
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
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/mainDraw.cpp | 26 |
1 files 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; |