Mercurial > mm7
comparison mm7_1.cpp @ 486:7887a9cf9e7b
Spells
author | Nomad |
---|---|
date | Wed, 27 Feb 2013 17:29:05 +0200 |
parents | 4bd56919f075 |
children | 0e27362ac1d9 |
comparison
equal
deleted
inserted
replaced
485:b6bdfaa3ae0f | 486:7887a9cf9e7b |
---|---|
5943 v12 = v10 - v11; | 5943 v12 = v10 - v11; |
5944 v13 = 0x80000 - v11; | 5944 v13 = 0x80000 - v11; |
5945 LODWORD(v14) = v13 << 16; | 5945 LODWORD(v14) = v13 << 16; |
5946 HIDWORD(v14) = v13 >> 16; | 5946 HIDWORD(v14) = v13 >> 16; |
5947 v15 = &_50B744_view_transformed_ys[i - 1]; | 5947 v15 = &_50B744_view_transformed_ys[i - 1]; |
5948 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i] - _50B834_view_transformed_zs[i - 1]) | 5948 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i] - _50B834_view_transformed_zs[i - 1]) * v14 / v12) >> 16) + _50B834_view_transformed_zs[i - 1]; |
5949 * v14 | |
5950 / v12) >> 16) | |
5951 + _50B834_view_transformed_zs[i - 1]; | |
5952 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i] - _50B744_view_transformed_ys[i - 1]) * v14 / v12) >> 16; | 5949 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i] - _50B744_view_transformed_ys[i - 1]) * v14 / v12) >> 16; |
5953 } | 5950 } |
5954 else | 5951 else |
5955 { | 5952 { |
5956 v16 = v11 - v10; | 5953 v16 = v11 - v10; |
6031 v31 = v30 - 1; | 6028 v31 = v30 - 1; |
6032 v32 = (v31 & 0x800000) - 0x400000; | 6029 v32 = (v31 & 0x800000) - 0x400000; |
6033 } | 6030 } |
6034 } | 6031 } |
6035 dword_50BA08[v22] = v32; | 6032 dword_50BA08[v22] = v32; |
6036 dword_50BAF4_xs[v22 + 1] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) | 6033 dword_50BAF4_xs[v22 + 1] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BAF4_xs[v22 + 1]) >> 16; |
6037 * (signed __int64)dword_50BAF4_xs[v22 + 1]) >> 16; | |
6038 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BA08[v22]) >> 16; | 6034 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BA08[v22]) >> 16; |
6039 dword_50BAF4_xs[v22 + 1] = pBLVRenderParams->uViewportCenterX - dword_50BAF4_xs[v22 + 1]; | 6035 dword_50BAF4_xs[v22 + 1] = pBLVRenderParams->uViewportCenterX - dword_50BAF4_xs[v22 + 1]; |
6040 ++ia; | 6036 ++ia; |
6041 } | 6037 } |
6042 v36 = 0; | 6038 v36 = 0; |
6056 v82 = v41 >= (signed int)v37; | 6052 v82 = v41 >= (signed int)v37; |
6057 if ( v38 ^ v82 ) | 6053 if ( v38 ^ v82 ) |
6058 { | 6054 { |
6059 if ( v41 >= (signed int)v37 ) | 6055 if ( v41 >= (signed int)v37 ) |
6060 { | 6056 { |
6061 v67 = (signed int)(v37 - dword_50BAF4_xs[v40]) | 6057 v67 = (signed int)(v37 - dword_50BAF4_xs[v40]) * (signed __int64)(dword_50BA08[v40] - dword_50B9F8[v40 + 3]) / (v41 - dword_50BAF4_xs[v40]); |
6062 * (signed __int64)(dword_50BA08[v40] - dword_50B9F8[v40 + 3]) | |
6063 / (v41 - dword_50BAF4_xs[v40]); | |
6064 v42 = dword_50B9F8[v40 + 3]; | 6058 v42 = dword_50B9F8[v40 + 3]; |
6065 } | 6059 } |
6066 else | 6060 else |
6067 { | 6061 { |
6068 v67 = (signed int)(v37 - v41) | 6062 v67 = (signed int)(v37 - v41) * (signed __int64)(dword_50B9F8[v40 + 3] - dword_50BA08[v40]) / (dword_50BAF4_xs[v40] - v41); |
6069 * (signed __int64)(dword_50B9F8[v40 + 3] - dword_50BA08[v40]) | |
6070 / (dword_50BAF4_xs[v40] - v41); | |
6071 v42 = dword_50BA08[v40]; | 6063 v42 = dword_50BA08[v40]; |
6072 } | 6064 } |
6073 ++v36; | 6065 ++v36; |
6074 dword_50B9F8[v36] = v67 + v42; | 6066 dword_50B9F8[v36] = v67 + v42; |
6075 v37 = pBLVRenderParams->uViewportX; | 6067 v37 = pBLVRenderParams->uViewportX; |
6083 } | 6075 } |
6084 v39 = ib++ + 1; | 6076 v39 = ib++ + 1; |
6085 } | 6077 } |
6086 while ( ib <= v79 ); | 6078 while ( ib <= v79 ); |
6087 | 6079 |
6088 if ( !v36 | 6080 if (v36 < 1) |
6089 || (v43 = 0, | |
6090 dword_50BAE8_xs[v36 + 1] = dword_50BAE8_xs[1], | |
6091 dword_50B9F8[v36 + 1] = dword_50B9F8[1], | |
6092 v44 = pBLVRenderParams->uViewportZ, | |
6093 thisd = dword_50BAE8_xs[1] <= (signed int)pBLVRenderParams->uViewportZ, | |
6094 ic = 1, | |
6095 v36 < 1) ) | |
6096 return 0; | 6081 return 0; |
6082 | |
6083 v43 = 0; | |
6084 dword_50BAE8_xs[v36 + 1] = dword_50BAE8_xs[1]; | |
6085 dword_50B9F8[v36 + 1] = dword_50B9F8[1]; | |
6086 v44 = pBLVRenderParams->uViewportZ; | |
6087 thisd = dword_50BAE8_xs[1] <= (signed int)pBLVRenderParams->uViewportZ; | |
6088 ic = 1; | |
6097 | 6089 |
6098 do | 6090 do |
6099 { | 6091 { |
6100 v45 = ic; | 6092 v45 = ic; |
6101 v46 = dword_50BAE8_xs[ic + 1]; | 6093 v46 = dword_50BAE8_xs[ic + 1]; |
6102 v83 = v46 <= (signed int)v44; | 6094 v83 = v46 <= (signed int)v44; |
6103 if ( thisd ^ v83 ) | 6095 if ( thisd ^ v83 ) |
6104 { | 6096 { |
6105 if ( v46 <= (signed int)v44 ) | 6097 if ( v46 <= (signed int)v44 ) |
6106 { | 6098 { |
6107 v68 = (signed int)(v44 - dword_50BAE8_xs[v45]) | 6099 v68 = (signed int)(v44 - dword_50BAE8_xs[v45]) * (signed __int64)(dword_50B9F8[v45 + 1] - dword_50B9F8[v45]) / (v46 - dword_50BAE8_xs[v45]); |
6108 * (signed __int64)(dword_50B9F8[v45 + 1] - dword_50B9F8[v45]) | |
6109 / (v46 - dword_50BAE8_xs[v45]); | |
6110 v47 = dword_50B9F8[v45]; | 6100 v47 = dword_50B9F8[v45]; |
6111 } | 6101 } |
6112 else | 6102 else |
6113 { | 6103 { |
6114 v68 = (signed int)(v44 - v46) | 6104 v68 = (signed int)(v44 - v46) * (signed __int64)(dword_50B9F8[v45] - dword_50B9F8[v45 + 1]) / (dword_50BAE8_xs[v45] - v46); |
6115 * (signed __int64)(dword_50B9F8[v45] - dword_50B9F8[v45 + 1]) | |
6116 / (dword_50BAE8_xs[v45] - v46); | |
6117 v47 = dword_50B9F8[v45 + 1]; | 6105 v47 = dword_50B9F8[v45 + 1]; |
6118 } | 6106 } |
6119 ++v43; | 6107 ++v43; |
6120 dword_50B9EC[v43] = v68 + v47; | 6108 dword_50B9EC[v43] = v68 + v47; |
6121 v44 = pBLVRenderParams->uViewportZ; | 6109 v44 = pBLVRenderParams->uViewportZ; |
6128 } | 6116 } |
6129 ++ic; | 6117 ++ic; |
6130 thisd = v83; | 6118 thisd = v83; |
6131 } | 6119 } |
6132 while ( ic <= v36 ); | 6120 while ( ic <= v36 ); |
6133 if ( !v43 | 6121 |
6134 || (v48 = 0, | 6122 if (v43 < 1) |
6135 dword_50BAE0[v43] = dword_50BAE0[0], | |
6136 dword_50B9F0[v43] = dword_50B9F0[0], | |
6137 v49 = pBLVRenderParams->uViewportY, | |
6138 v50 = dword_50B9F0[0] < (signed int)pBLVRenderParams->uViewportY, | |
6139 LOBYTE(v50) = dword_50B9F0[0] >= (signed int)pBLVRenderParams->uViewportY, | |
6140 v51 = 1, | |
6141 id = 1, | |
6142 v43 < 1) ) | |
6143 return 0; | 6123 return 0; |
6124 | |
6125 v48 = 0; | |
6126 dword_50BAE0[v43] = dword_50BAE0[0]; | |
6127 dword_50B9F0[v43] = dword_50B9F0[0]; | |
6128 v49 = pBLVRenderParams->uViewportY; | |
6129 v50 = dword_50B9F0[0] < (signed int)pBLVRenderParams->uViewportY; | |
6130 LOBYTE(v50) = dword_50B9F0[0] >= (signed int)pBLVRenderParams->uViewportY; | |
6131 v51 = 1; | |
6132 id = 1; | |
6144 do | 6133 do |
6145 { | 6134 { |
6146 v52 = v51; | 6135 v52 = v51; |
6147 v53 = dword_50B9F0[v52]; | 6136 v53 = dword_50B9F0[v52]; |
6148 v84 = v53 >= (signed int)v49; | 6137 v84 = v53 >= (signed int)v49; |
6149 if ( v50 ^ v84 ) | 6138 if ( v50 ^ v84 ) |
6150 { | 6139 { |
6151 if ( v53 >= (signed int)v49 ) | 6140 if ( v53 >= (signed int)v49 ) |
6152 { | 6141 { |
6153 v69 = (signed int)(v49 - dword_50B9EC[v52]) | 6142 v69 = (signed int)(v49 - dword_50B9EC[v52]) * (signed __int64)(dword_50BAE0[v52] - dword_50BADC_xs[v52]) / (v53 - dword_50B9EC[v52]); |
6154 * (signed __int64)(dword_50BAE0[v52] - dword_50BADC_xs[v52]) | |
6155 / (v53 - dword_50B9EC[v52]); | |
6156 v54 = dword_50BADC_xs[v52]; | 6143 v54 = dword_50BADC_xs[v52]; |
6157 } | 6144 } |
6158 else | 6145 else |
6159 { | 6146 { |
6160 v69 = (signed int)(v49 - v53) | 6147 v69 = (signed int)(v49 - v53) * (signed __int64)(dword_50BADC_xs[v52] - dword_50BAE0[v52]) / (dword_50B9EC[v52] - v53); |
6161 * (signed __int64)(dword_50BADC_xs[v52] - dword_50BAE0[v52]) | |
6162 / (dword_50B9EC[v52] - v53); | |
6163 v54 = dword_50BAE0[v52]; | 6148 v54 = dword_50BAE0[v52]; |
6164 } | 6149 } |
6165 ++v48; | 6150 ++v48; |
6166 dword_50BAD0[v48] = v69 + v54; | 6151 dword_50BAD0[v48] = v69 + v54; |
6167 v49 = pBLVRenderParams->uViewportY; | 6152 v49 = pBLVRenderParams->uViewportY; |
6174 dword_50B9E0_ys[v48++ + 1] = dword_50B9F0[v52]; | 6159 dword_50B9E0_ys[v48++ + 1] = dword_50B9F0[v52]; |
6175 } | 6160 } |
6176 v51 = id++ + 1; | 6161 v51 = id++ + 1; |
6177 } | 6162 } |
6178 while ( id <= v43 ); | 6163 while ( id <= v43 ); |
6179 if ( !v48 | 6164 |
6180 || (v55 = 0, | 6165 if (v48 < 1) |
6181 dword_50BAD4[v48] = dword_50BAD4[0], | |
6182 dword_50B9E0_ys[v48 + 1] = dword_50B9E0_ys[1], | |
6183 v56 = pBLVRenderParams->uViewportW, | |
6184 thise = dword_50B9E0_ys[1] <= (signed int)pBLVRenderParams->uViewportW, | |
6185 ie = 1, | |
6186 v48 < 1) ) | |
6187 return 0; | 6166 return 0; |
6167 | |
6168 v55 = 0; | |
6169 dword_50BAD4[v48] = dword_50BAD4[0]; | |
6170 dword_50B9E0_ys[v48 + 1] = dword_50B9E0_ys[1]; | |
6171 v56 = pBLVRenderParams->uViewportW; | |
6172 thise = dword_50B9E0_ys[1] <= (signed int)pBLVRenderParams->uViewportW; | |
6173 ie = 1; | |
6188 do | 6174 do |
6189 { | 6175 { |
6190 v57 = ie; | 6176 v57 = ie; |
6191 v58 = dword_50B9E0_ys[ie + 1]; | 6177 v58 = dword_50B9E0_ys[ie + 1]; |
6192 v85 = v58 <= (signed int)v56; | 6178 v85 = v58 <= (signed int)v56; |
6193 if ( thise ^ v85 ) | 6179 if ( thise ^ v85 ) |
6194 { | 6180 { |
6195 if ( v58 <= (signed int)v56 ) | 6181 if ( v58 <= (signed int)v56 ) |
6196 { | 6182 { |
6197 v70 = (signed int)(v56 - dword_50B9E0_ys[v57]) | 6183 v70 = (signed int)(v56 - dword_50B9E0_ys[v57]) * (signed __int64)(dword_50BAD4[v57] - dword_50BAD0[v57]) / (v58 - dword_50B9E0_ys[v57]); |
6198 * (signed __int64)(dword_50BAD4[v57] - dword_50BAD0[v57]) | |
6199 / (v58 - dword_50B9E0_ys[v57]); | |
6200 v59 = dword_50BAD0[v57]; | 6184 v59 = dword_50BAD0[v57]; |
6201 } | 6185 } |
6202 else | 6186 else |
6203 { | 6187 { |
6204 v70 = (signed int)(v56 - v58) | 6188 v70 = (signed int)(v56 - v58) * (signed __int64)(dword_50BAD0[v57] - dword_50BAD4[v57]) / (dword_50B9E0_ys[v57] - v58); |
6205 * (signed __int64)(dword_50BAD0[v57] - dword_50BAD4[v57]) | |
6206 / (dword_50B9E0_ys[v57] - v58); | |
6207 v59 = dword_50BAD4[v57]; | 6189 v59 = dword_50BAD4[v57]; |
6208 } | 6190 } |
6209 ++v55; | 6191 ++v55; |
6210 dword_50BAC4[v55] = v70 + v59; | 6192 dword_50BAC4[v55] = v70 + v59; |
6211 v56 = pBLVRenderParams->uViewportW; | 6193 v56 = pBLVRenderParams->uViewportW; |
6218 } | 6200 } |
6219 ++ie; | 6201 ++ie; |
6220 thise = v85; | 6202 thise = v85; |
6221 } | 6203 } |
6222 while ( ie <= v48 ); | 6204 while ( ie <= v48 ); |
6205 | |
6223 if ( !v55 ) | 6206 if ( !v55 ) |
6224 return 0; | 6207 return 0; |
6225 v61 = pRenderer->pRenderD3D == 0; | 6208 v61 = pRenderer->pRenderD3D == 0; |
6226 dword_50BAC8[v55] = dword_50BAC8[0]; | 6209 dword_50BAC8[v55] = dword_50BAC8[0]; |
6227 dword_50B9D8_ys[v55] = dword_50B9D8_ys[0]; | 6210 dword_50B9D8_ys[v55] = dword_50B9D8_ys[0]; |