# HG changeset patch # User Ritor1 # Date 1364200148 -21600 # Node ID 319b3532076078ba395b902e450cb6aade1bb91d # Parent 5f0029b4bf091fc8acf997ef83da7493370addf0# Parent 290afbd48b6b34faedbfe9d6a5c6dbb2ca397958 Слияние diff -r 5f0029b4bf09 -r 319b35320760 Indoor.cpp --- a/Indoor.cpp Mon Mar 25 14:29:01 2013 +0600 +++ b/Indoor.cpp Mon Mar 25 14:29:08 2013 +0600 @@ -3196,7 +3196,7 @@ v54 = 0; v50 = pVertices[pFace->pVertexIDs[0]].y >= sY; - for (uint k = 1; k < pFace->uNumVertices; k++) + for (uint k = 1; k <= pFace->uNumVertices; k++) { v59 = v50; @@ -3206,7 +3206,7 @@ auto v2 = &pVertices[pFace->pVertexIDs[k]]; v50 = v2->y >= sY; - if ( v59 == v50 ) + if (v59 == v50) continue; auto v1 = &pVertices[pFace->pVertexIDs[k - 1]]; @@ -3232,8 +3232,8 @@ //_a58 = v33 / (v1->y - v2->y); //_a59 = fixpoint_mul(_a58, sY - v2->y); auto x_div_y = fixpoint_div(v1->x - v2->x, v1->y - v2->y); - auto rval = fixpoint_mul(x_div_y, sY - v2->y); // a / b * c - looks like projection - if (rval + v2->x > sX) + auto res = fixpoint_mul(x_div_y, sY - v2->y); // a / b * c - looks like projection + if (res + v2->x > sX) ++v54; } else