Mercurial > mm7
diff mm7_1.cpp @ 1187:02e2a5c1ebc0
BspRernderer refactoring continued
author | Ritor1 |
---|---|
date | Fri, 07 Jun 2013 11:30:29 +0600 |
parents | 883eaee77094 |
children | 1f92c110a4f2 312e895a6439 |
line wrap: on
line diff
--- a/mm7_1.cpp Wed Jun 05 17:40:17 2013 +0600 +++ b/mm7_1.cpp Fri Jun 07 11:30:29 2013 +0600 @@ -2306,7 +2306,7 @@ //try graphic engine with function returning 1 always, and without //return true; - if ( !pNumVertices ) + if ( pNumVertices <= 1 ) return false; v7 = stru_50B700._screen_space_y[0]; v65 = 0; @@ -2321,8 +2321,7 @@ v63 = -1; v64 = 1; } - if ( pNumVertices <= 1 ) - return false; + for ( v6 = 1; v6 < pNumVertices; ++v6 ) { if ( stru_50B700._screen_space_y[v6] >= v7 ) @@ -2338,33 +2337,29 @@ } if ( v8 == v7 ) return false; + v10 = v65; a2->_viewport_space_y = v7; a2->_viewport_space_w = v8; v55 = v65; - if ( pNumVertices > 0 ) + + for ( v68 = 0; v68 < pNumVertices; ++v68 ) { - //v11 = v65; - for ( v68 = 0; v68 < pNumVertices; ++v68 ) + v10 += v64; + if ( v10 < pNumVertices ) { - v10 += v64; - if ( v10 < pNumVertices ) - { - if ( v10 < 0 ) - v10 += pNumVertices; - } - else - { - v10 -= pNumVertices; - } - if ( stru_50B700._screen_space_y[v10] <= stru_50B700._screen_space_y[v65] ) - { - v55 = v10; - v65 = v10; - } - if ( stru_50B700._screen_space_y[v10] == v8 ) - break; + if ( v10 < 0 ) + v10 += pNumVertices; } + else + v10 -= pNumVertices; + if ( stru_50B700._screen_space_y[v10] <= stru_50B700._screen_space_y[v65] ) + { + v55 = v10; + v65 = v10; + } + if ( stru_50B700._screen_space_y[v10] == v8 ) + break; } v13 = v55 + v64; if ( v13 < pNumVertices ) @@ -2373,9 +2368,7 @@ v13 += pNumVertices; } else - { v13 -= pNumVertices; - } if ( stru_50B700._screen_space_y[v13] != stru_50B700._screen_space_y[v55] ) { v62 = stru_50B700._screen_space_x[v55] << 16; @@ -2384,29 +2377,24 @@ } v15 = v65; v61 = v65; - if ( pNumVertices > 0 ) + + for ( v69 = 0; v69 < pNumVertices; ++v69 ) { - //v16 = v65; - for ( v69 = 0; v69 < pNumVertices; ++v69 ) + v15 += v63; + if ( v15 < pNumVertices ) { - v15 += v63; - if ( v15 < pNumVertices ) - { - if ( v15 < 0 ) - v15 += pNumVertices; - } - else - { - v15 -= pNumVertices; - } - if ( stru_50B700._screen_space_y[v15] <= stru_50B700._screen_space_y[v65] ) - { - v61 = v15; - v65 = v15; - } - if ( stru_50B700._screen_space_y[v15] == v8 ) - break; + if ( v15 < 0 ) + v15 += pNumVertices; } + else + v15 -= pNumVertices; + if ( stru_50B700._screen_space_y[v15] <= stru_50B700._screen_space_y[v65] ) + { + v61 = v15; + v65 = v15; + } + if ( stru_50B700._screen_space_y[v15] == v8 ) + break; } v18 = v63 + v61; if ( v18 < pNumVertices ) @@ -2415,9 +2403,7 @@ v18 += pNumVertices; } else - { v18 -= pNumVertices; - } v19 = v18; v20 = v61; if ( stru_50B700._screen_space_y[v19] != stru_50B700._screen_space_y[v61] ) @@ -2443,9 +2429,7 @@ v13 += pNumVertices; } else - { v13 -= pNumVertices; - } v26 = v13; //v27 = stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; if ( stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24] > 0 ) @@ -2464,9 +2448,7 @@ v18 += pNumVertices; } else - { v18 -= pNumVertices; - } v31 = v18; //v32 = stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; if ( stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29] > 0 )