Mercurial > mm7
comparison Render.cpp @ 4:8e33efd39355
15.01.13(work)
author | Ritor1 |
---|---|
date | Tue, 15 Jan 2013 17:44:23 +0600 |
parents | 9c0607679772 |
children | a9e9c6989d04 |
comparison
equal
deleted
inserted
replaced
3:bf31c505f4d3 | 4:8e33efd39355 |
---|---|
1838 { | 1838 { |
1839 v5 = abs(X);//v5 = 13108 | 1839 v5 = abs(X);//v5 = 13108 |
1840 v6 = abs(v83);//v6 = 13108 | 1840 v6 = abs(v83);//v6 = 13108 |
1841 --X; | 1841 --X; |
1842 v93 = &stru_76E5C8[(v5 << 7) + v6]; | 1842 v93 = &stru_76E5C8[(v5 << 7) + v6]; |
1843 if ( !v93->field_0 || ((v7 = 48 * v4, v8 = &pVerticesSR_806210[v4], a2 = v8, !v82) ? (v9 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7), | 1843 if ( !v93->field_0 || ((v7 = 48 * v4, v8 = &pVerticesSR_806210[v4], a2 = v8, !v82) ? (v9 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7), |
1844 v10 = &pVerticesSR_806210[1] + v7) : (v9 = &pVerticesSR_806210[1] + v7, v10 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7)), | 1844 v10 = &pVerticesSR_806210[1] + v7) : (v9 = &pVerticesSR_806210[1] + v7, v10 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7)), |
1845 ((a8 = v9, | 1845 ((a8 = v9, |
1846 pVertices = &pVerticesSR_801A10[1] + v7, | 1846 pVertices = &pVerticesSR_801A10[1] + v7, |
1847 v11 = v8->vWorldPosition.x, | 1847 v11 = v8->vWorldPosition.x, |
1848 v101 = v10, | 1848 v101 = v10, |
1893 v16->field_58 = LOBYTE(v25); | 1893 v16->field_58 = LOBYTE(v25); |
1894 if ( !(v26 ^ v27) ) | 1894 if ( !(v26 ^ v27) ) |
1895 return; | 1895 return; |
1896 ++pOutdoorCamera->numStru148s; | 1896 ++pOutdoorCamera->numStru148s; |
1897 if ( !sub_481FC9(v8, a8, v101, v16) ) | 1897 if ( !sub_481FC9(v8, a8, v101, v16) ) |
1898 goto LABEL_126; | 1898 //goto LABEL_126; |
1899 { | |
1900 --pOutdoorCamera->numStru148s; | |
1901 goto LABEL_162; | |
1902 } | |
1899 v28 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); | 1903 v28 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); |
1900 memcpy(array_50AC10, a2, 0x30u); | 1904 memcpy(array_50AC10, a2, 0x30u); |
1901 array_50AC10[0].flt_20 = v28; | 1905 array_50AC10[0].flt_20 = v28; |
1902 array_50AC10[0].u = 0.0; | 1906 array_50AC10[0].u = 0.0; |
1903 array_50AC10[0].v = 0.0; | 1907 array_50AC10[0].v = 0.0; |
2002 } | 2006 } |
2003 v79 = 0; | 2007 v79 = 0; |
2004 v78 = pBitmaps_LOD->pHardwareTextures[v39]; | 2008 v78 = pBitmaps_LOD->pHardwareTextures[v39]; |
2005 v77 = v16; | 2009 v77 = v16; |
2006 v76 = v16->uNumVertices; | 2010 v76 = v16->uNumVertices; |
2007 LABEL_161: | 2011 //LABEL_161: |
2008 pRenderer->DrawTerrainPolygon(v76, v77, v78, v79, v80); | 2012 pRenderer->DrawTerrainPolygon(v76, v77, v78, v79, v80); |
2009 goto LABEL_162; | 2013 goto LABEL_162; |
2010 } | 2014 } |
2011 v38 = v16; | 2015 v38 = v16; |
2012 LABEL_56: | 2016 LABEL_56: |
2048 v40->field_58 = 0; | 2052 v40->field_58 = 0; |
2049 if ( pOutdoorCamera->numStru148s >= 1999 ) | 2053 if ( pOutdoorCamera->numStru148s >= 1999 ) |
2050 return; | 2054 return; |
2051 ++pOutdoorCamera->numStru148s; | 2055 ++pOutdoorCamera->numStru148s; |
2052 if ( !sub_481FC9(a8, pVertices, v8, v40) ) | 2056 if ( !sub_481FC9(a8, pVertices, v8, v40) ) |
2053 goto LABEL_77; | 2057 //goto LABEL_77; |
2058 { | |
2059 --pOutdoorCamera->numStru148s; | |
2060 goto LABEL_112; | |
2061 } | |
2054 v51 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); | 2062 v51 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); |
2055 memcpy(array_50AC10, a2, 0x30u); | 2063 memcpy(array_50AC10, a2, 0x30u); |
2056 array_50AC10[0].flt_20 = v51; | 2064 array_50AC10[0].flt_20 = v51; |
2057 array_50AC10[0].u = 0.0; | 2065 array_50AC10[0].u = 0.0; |
2058 array_50AC10[0].v = 0.0; | 2066 array_50AC10[0].v = 0.0; |
2083 if ( byte_4D864C && pGame->uFlags & 0x80 ) | 2091 if ( byte_4D864C && pGame->uFlags & 0x80 ) |
2084 { | 2092 { |
2085 thisb = pGame->pIndoorCameraD3D; | 2093 thisb = pGame->pIndoorCameraD3D; |
2086 if ( pGame->pIndoorCameraD3D->_4371C3(array_50AC10, &uNumVertices, 0) == 1 && !uNumVertices ) | 2094 if ( pGame->pIndoorCameraD3D->_4371C3(array_50AC10, &uNumVertices, 0) == 1 && !uNumVertices ) |
2087 { | 2095 { |
2088 LABEL_77: | 2096 //LABEL_77: |
2089 --pOutdoorCamera->numStru148s; | 2097 --pOutdoorCamera->numStru148s; |
2090 goto LABEL_112; | 2098 goto LABEL_112; |
2091 } | 2099 } |
2092 thisb->ViewTransform(array_50AC10, uNumVertices); | 2100 thisb->ViewTransform(array_50AC10, uNumVertices); |
2093 thisb->Project(array_50AC10, uNumVertices, 0); | 2101 thisb->Project(array_50AC10, uNumVertices, 0); |
2186 if ( pOutdoorCamera->numStru148s >= 1999 ) | 2194 if ( pOutdoorCamera->numStru148s >= 1999 ) |
2187 return; | 2195 return; |
2188 ++pOutdoorCamera->numStru148s; | 2196 ++pOutdoorCamera->numStru148s; |
2189 if ( !sub_481FC9(v101, a2, pVertices, v59) ) | 2197 if ( !sub_481FC9(v101, a2, pVertices, v59) ) |
2190 { | 2198 { |
2191 LABEL_126: | 2199 //LABEL_126: |
2192 --pOutdoorCamera->numStru148s; | 2200 --pOutdoorCamera->numStru148s; |
2193 goto LABEL_162; | 2201 goto LABEL_162; |
2194 } | 2202 } |
2195 v66 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); | 2203 v66 = 1.0 / (a2->vWorldViewPosition.x + 0.0000001); |
2196 memcpy(array_50AC10, a2, 0x30u); | 2204 memcpy(array_50AC10, a2, 0x30u); |
2223 v100 = 3; | 2231 v100 = 3; |
2224 if ( byte_4D864C && pGame->uFlags & 0x80 ) | 2232 if ( byte_4D864C && pGame->uFlags & 0x80 ) |
2225 { | 2233 { |
2226 thisc = pGame->pIndoorCameraD3D; | 2234 thisc = pGame->pIndoorCameraD3D; |
2227 if ( pGame->pIndoorCameraD3D->_4371C3(array_50AC10, (unsigned int *)&v100, 0) == 1 && !v100 ) | 2235 if ( pGame->pIndoorCameraD3D->_4371C3(array_50AC10, (unsigned int *)&v100, 0) == 1 && !v100 ) |
2228 goto LABEL_126; | 2236 //goto LABEL_126; |
2237 { | |
2238 --pOutdoorCamera->numStru148s; | |
2239 goto LABEL_162; | |
2240 } | |
2229 thisc->ViewTransform(array_50AC10, v100); | 2241 thisc->ViewTransform(array_50AC10, v100); |
2230 thisc->Project(array_50AC10, v100, 0); | 2242 thisc->Project(array_50AC10, v100, 0); |
2231 } | 2243 } |
2232 this_3b = a2->vWorldViewPosition.x < 8.0 | 2244 this_3b = a2->vWorldViewPosition.x < 8.0 |
2233 || pVertices->vWorldViewPosition.x < 8.0 | 2245 || pVertices->vWorldViewPosition.x < 8.0 |
2242 LOBYTE(v70) = 3; | 2254 LOBYTE(v70) = 3; |
2243 else | 2255 else |
2244 v70 = v108 != 0 ? 5 : 0; | 2256 v70 = v108 != 0 ? 5 : 0; |
2245 static_sub_0048034E_stru_76D578._49B0C9(v99, v87); | 2257 static_sub_0048034E_stru_76D578._49B0C9(v99, v87); |
2246 if ( pDecalBuilder->uNumDecals > 0 ) | 2258 if ( pDecalBuilder->uNumDecals > 0 ) |
2247 pDecalBuilder->ApplyDecals( | 2259 pDecalBuilder->ApplyDecals(31 - v40->field_58, 4, &static_sub_0048034E_stru_76D578, v100, array_50AC10, 0, v70, -1); |
2248 31 - v40->field_58, | |
2249 4, | |
2250 &static_sub_0048034E_stru_76D578, | |
2251 v100, | |
2252 array_50AC10, | |
2253 0, | |
2254 v70, | |
2255 -1); | |
2256 } | 2260 } |
2257 if ( stru_F8AD28.uNumLightsApplied > 0 ) | 2261 if ( stru_F8AD28.uNumLightsApplied > 0 ) |
2258 v96->ApplyLights(&stru_F8AD28, &static_sub_0048034E_stru_76D578, v100, array_50AC10, 0, v70); | 2262 v96->ApplyLights(&stru_F8AD28, &static_sub_0048034E_stru_76D578, v100, array_50AC10, 0, v70); |
2259 v71 = a8; | 2263 v71 = a8; |
2260 v72 = v100; | 2264 v72 = v100; |
2286 } | 2290 } |
2287 v79 = 0; | 2291 v79 = 0; |
2288 v78 = pBitmaps_LOD->pHardwareTextures[v75]; | 2292 v78 = pBitmaps_LOD->pHardwareTextures[v75]; |
2289 v77 = (stru148 *)v71; | 2293 v77 = (stru148 *)v71; |
2290 v76 = LODWORD(v71->vWorldViewPosition.z); | 2294 v76 = LODWORD(v71->vWorldViewPosition.z); |
2291 goto LABEL_161; | 2295 //goto LABEL_161; |
2296 { | |
2297 pRenderer->DrawTerrainPolygon(v76, v77, v78, v79, v80); | |
2298 goto LABEL_162; | |
2299 } | |
2292 } | 2300 } |
2293 v38 = (stru148 *)v71; | 2301 v38 = (stru148 *)v71; |
2294 goto LABEL_56; | 2302 goto LABEL_56; |
2295 } | 2303 } |
2296 v73 = sr_424EE0_MakeFanFromTriangle(v72); | 2304 v73 = sr_424EE0_MakeFanFromTriangle(v72); |