comparison _deleted.cpp @ 2316:25f771e528f0

Draw terrain
author Ritor1
date Wed, 19 Mar 2014 17:30:14 +0600
parents aff7a7b072b7
children a59892f99d31
comparison
equal deleted inserted replaced
2315:58be29479e75 2316:25f771e528f0
2558 i = v124 - pODMRenderParams->outdoor_grid_band_3; 2558 i = v124 - pODMRenderParams->outdoor_grid_band_3;
2559 v122 = v123 - pODMRenderParams->outdoor_grid_band_3; 2559 v122 = v123 - pODMRenderParams->outdoor_grid_band_3;
2560 2560
2561 if ( v2 > 90 ) 2561 if ( v2 > 90 )
2562 v2 = 90; 2562 v2 = 90;
2563 v3 = (v2 << 11) / 720; 2563 //v3 = (v2 << 11) / 720;
2564 v4 = stru_5C6E00->uDoublePiMask & (pDirectionIndicator1 - v3); 2564 v4 = stru_5C6E00->uDoublePiMask & (pDirectionIndicator1 - ((v2 << 11) / 720));
2565 v5 = stru_5C6E00->uDoublePiMask & (v3 + pDirectionIndicator1); 2565 v5 = stru_5C6E00->uDoublePiMask & (((v2 << 11) / 720) + pDirectionIndicator1);
2566 2566
2567 v106 = stru_5C6E00->Cos(v4); 2567 v106 = stru_5C6E00->Cos(v4);
2568 uEndZ = stru_5C6E00->Sin(v4); 2568 uEndZ = stru_5C6E00->Sin(v4);
2569 2569
2570 v111 = stru_5C6E00->Cos(v5); 2570 v111 = stru_5C6E00->Cos(v5);
2677 v16 = 0; 2677 v16 = 0;
2678 v126 = 0; 2678 v126 = 0;
2679 v17 = j - 1; 2679 v17 = j - 1;
2680 v18 = _i - 1; 2680 v18 = _i - 1;
2681 2681
2682 switch ( v105 ) 2682 switch ( v105 )//напрвление камеры
2683 { 2683 {
2684 case 0: 2684 case 0:
2685 case 7: 2685 case 7:
2686 { 2686 {
2687 //v116 = terrain_76DFC8[v17]; 2687 //v116 = terrain_76DFC8[v17];
2702 v16 = v126; 2702 v16 = v126;
2703 --v17; 2703 --v17;
2704 } 2704 }
2705 if ( v17 < 0 ) 2705 if ( v17 < 0 )
2706 v17 = 0; 2706 v17 = 0;
2707 v21 = terrain_76DFC8[v17]; 2707
2708 while ( 1 ) 2708 //while ( 1 )
2709 { 2709 for ( v21 = terrain_76DFC8[v17]; v21 < v124; v21 = terrain_76DFC8[v17] - 1; )
2710 v125 = terrain_76DFC8[v17]; 2710 {
2711 if ( v21 < v124 ) 2711 //v125 = terrain_76DFC8[v17];
2712 break;
2713 terrain_76DBC8[v16] = v21; 2712 terrain_76DBC8[v16] = v21;
2714 //v22 = terrain_76DDC8[v17] == 65535; 2713 //v22 = terrain_76DDC8[v17] == 65535;
2715 terrain_76D9C8[v16] = terrain_76DDC8[v17] + 1; 2714 terrain_76D9C8[v16] = terrain_76DDC8[v17] + 1;
2716 if ( terrain_76DDC8[v17] == 65535 ) 2715 if ( terrain_76DDC8[v17] == 65535 )
2717 { 2716 {
2725 do 2724 do
2726 v23 = terrain_76DDC8[v17-- -1]; 2725 v23 = terrain_76DDC8[v17-- -1];
2727 while ( v23 == terrain_76DDC8[v17 -1] ); 2726 while ( v23 == terrain_76DDC8[v17 -1] );
2728 } 2727 }
2729 --v17; 2728 --v17;
2730 v21 = v125 - 1;
2731 ++v16; 2729 ++v16;
2732 } 2730 }
2733 v16 = 0; 2731 v16 = 0;
2734 //v24 = terrain_76E3C8[v18]; 2732 //v24 = terrain_76E3C8[v18];
2735 v126 = 0; 2733 v126 = 0;
2904 v125 = terrain_76DDC8[v17]; 2902 v125 = terrain_76DDC8[v17];
2905 while ( v47 >= v123 ) 2903 while ( v47 >= v123 )
2906 { 2904 {
2907 //v22 = terrain_76DFC8[v17] == 65535; 2905 //v22 = terrain_76DFC8[v17] == 65535;
2908 terrain_76DBC8[v16] = terrain_76DFC8[v17]; 2906 terrain_76DBC8[v16] = terrain_76DFC8[v17];
2909 terrain_76D9C8[v16] = v125; 2907 terrain_76D9C8[v16] = terrain_76DDC8[v17];
2910 if ( terrain_76DFC8[v17] == 65535 ) 2908 if ( terrain_76DFC8[v17] == 65535 )
2911 { 2909 {
2912 terrain_76DBC8[v16] = v124; 2910 terrain_76DBC8[v16] = v124;
2913 break; 2911 break;
2914 } 2912 }
3003 if ( v17 < 0 ) 3001 if ( v17 < 0 )
3004 v17 = 0; 3002 v17 = 0;
3005 v59 = terrain_76DFC8[v17]; 3003 v59 = terrain_76DFC8[v17];
3006 while ( 1 ) 3004 while ( 1 )
3007 { 3005 {
3008 v125 = v59; 3006 v125 = terrain_76DFC8[v17];
3009 if ( v59 > v124 ) 3007 if ( terrain_76DFC8[v17] > v124 )
3010 break; 3008 break;
3011 terrain_76DBC8[v16] = v59; 3009 terrain_76DBC8[v16] = terrain_76DFC8[v17];
3012 //v60 = terrain_76DDC8[v17]; 3010 //v60 = terrain_76DDC8[v17];
3013 terrain_76D9C8[v16] = terrain_76DDC8[v17]; 3011 terrain_76D9C8[v16] = terrain_76DDC8[v17];
3014 if ( terrain_76DDC8[v17] == 65535 ) 3012 if ( terrain_76DDC8[v17] == 65535 )
3015 { 3013 {
3016 terrain_76D9C8[v16] = v123; 3014 terrain_76D9C8[v16] = v123;
3058 v66 = terrain_76E3C8[v18]; 3056 v66 = terrain_76E3C8[v18];
3059 while ( v66 <= v124 ) 3057 while ( v66 <= v124 )
3060 { 3058 {
3061 v67 = terrain_76E1C8[v18]; 3059 v67 = terrain_76E1C8[v18];
3062 terrain_76D7C8[v16] = v66; 3060 terrain_76D7C8[v16] = v66;
3063 terrain_76D5C8[v16] = v67 + 1; 3061 terrain_76D5C8[v16] = terrain_76E1C8[v18] + 1;
3064 if ( terrain_76E1C8[v18] == 65535 ) 3062 if ( terrain_76E1C8[v18] == 65535 )
3065 { 3063 {
3066 v31 = v123 + 1; 3064 v31 = v123 + 1;
3067 terrain_76D5C8[v16] = v31; 3065 terrain_76D5C8[v16] = v31;
3068 break; 3066 break;
3087 //v69 = v16 - 1; 3085 //v69 = v16 - 1;
3088 ptr_801A08 = pVerticesSR_806210; 3086 ptr_801A08 = pVerticesSR_806210;
3089 ptr_801A04 = pVerticesSR_801A10; 3087 ptr_801A04 = pVerticesSR_801A10;
3090 //v126 = v69; 3088 //v126 = v69;
3091 3089
3092 if ( v105 && v105 != 7 && v105 != 3 && v105 != 4 )//блок 3090 if ( v105 && v105 != 7 && v105 != 3 && v105 != 4 )//блок, ориентация камеры 1(СВ), 2(С), 5(ЮЗ), 6(Ю)
3093 { 3091 {
3094 for ( i = v16 - 1; i >= 1; --i ) 3092 for ( i = v16 - 1; i >= 1; --i )
3095 { 3093 {
3096 //v70 = i; 3094 //v70 = i;
3097 //v71 = terrain_76D7C8[i];//88 3095 //v71 = terrain_76D7C8[i];//88
3152 //Render::RenderTerrainD3D(); 3150 //Render::RenderTerrainD3D();
3153 else 3151 else
3154 Render::DrawTerrainSW(v111, 0, v103, v104); 3152 Render::DrawTerrainSW(v111, 0, v103, v104);
3155 } 3153 }
3156 } 3154 }
3157 else 3155 else//ориентация камеры 0(В), 3(СЗ), 4(З), 7(ЮВ)
3158 { 3156 {
3159 for ( i = v16 - 1; i >= 1; --i ) 3157 for ( i = v16 - 1; i >= 1; --i )
3160 { 3158 {
3161 //v86 = i; 3159 //v86 = i;
3162 //v87 = terrain_76D5C8[i]; 3160 //v87 = terrain_76D5C8[i];