Mercurial > mm7
comparison Render.cpp @ 1424:5930342f092b
fall to the water
author | Ritor1 |
---|---|
date | Tue, 30 Jul 2013 15:14:46 +0600 |
parents | 3881d2f94eb1 |
children | 1987f2cca08f |
comparison
equal
deleted
inserted
replaced
1423:350959f13283 | 1424:5930342f092b |
---|---|
313 pTile->uNumVertices = 4; | 313 pTile->uNumVertices = 4; |
314 pTile->field_59 = 5; | 314 pTile->field_59 = 5; |
315 | 315 |
316 //shading (затенение)---------------------------------------------------------------------------- | 316 //shading (затенение)---------------------------------------------------------------------------- |
317 //uint norm_idx = pTerrainNormalIndices[2 * (z * 128 + x) + 1]; | 317 //uint norm_idx = pTerrainNormalIndices[2 * (z * 128 + x) + 1]; |
318 uint norm_idx = pTerrainNormalIndices[2 * (x * 128 + z) + 1];//есть несовпадение в 1 кубик, тень надо поднять на 1 | 318 uint norm_idx = pTerrainNormalIndices[2 * (x * 128 + z) + 2]; |
319 assert(norm_idx < uNumTerrainNormals); | 319 assert(norm_idx < uNumTerrainNormals); |
320 | 320 |
321 auto norm = pTerrainNormals + norm_idx; | 321 auto norm = pTerrainNormals + norm_idx; |
322 float _f = ((norm->x * (float)pOutdoor->vSunlight.x / 65536.0) - | 322 float _f = ((norm->x * (float)pOutdoor->vSunlight.x / 65536.0) - |
323 (norm->y * (float)pOutdoor->vSunlight.y / 65536.0) - | 323 (norm->y * (float)pOutdoor->vSunlight.y / 65536.0) - |
340 | 340 |
341 // check the transparency and texture (tiles) mapping (проверка прозрачности и наложение текстур (тайлов))---------------------- | 341 // check the transparency and texture (tiles) mapping (проверка прозрачности и наложение текстур (тайлов))---------------------- |
342 bool transparent = false; | 342 bool transparent = false; |
343 if ( !( pTile->flags & 1 ) ) // не поддерживается TextureFrameTable | 343 if ( !( pTile->flags & 1 ) ) // не поддерживается TextureFrameTable |
344 { | 344 { |
345 if ( pTile->flags & 2 && pTile->uTileBitmapID == pRenderer->hd_water_tile_id) | 345 if ( /*pTile->flags & 2 && */pTile->uTileBitmapID == pRenderer->hd_water_tile_id) |
346 { | 346 { |
347 //transparent = false; | 347 //transparent = false; |
348 v6 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; | 348 v6 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; |
349 } | 349 } |
350 else | 350 else |