comparison ParticleEngine.cpp @ 49:5a08b193507f

22.01.13
author Ritor1
date Tue, 22 Jan 2013 17:37:50 +0600
parents a9e9c6989d04
children 2ee78ed62d37
comparison
equal deleted inserted replaced
47:5629105aa178 49:5a08b193507f
746 v14.field_10 = v13->field_58 >> 2; 746 v14.field_10 = v13->field_58 >> 2;
747 v14.field_14 = v13->field_58 >> 2; 747 v14.field_14 = v13->field_58 >> 2;
748 v14.uScreenSpaceX = v13->uScreenSpaceX; 748 v14.uScreenSpaceX = v13->uScreenSpaceX;
749 v14.uScreenSpaceY = v13->uScreenSpaceY; 749 v14.uScreenSpaceY = v13->uScreenSpaceY;
750 v14.sZValue = v13->sZValue; 750 v14.sZValue = v13->sZValue;
751 pRenderer->MakeParticleBillboardAndPush_ODM( 751 pRenderer->MakeParticleBillboardAndPush_ODM(&v14, 0, v13->uLightColor, v13->_rotation);
752 &v14,
753 0,
754 v13->uLightColor,
755 v13->_rotation);
756 return; 752 return;
757 } 753 }
758 if ( BYTE1(v8) & 2 ) 754 if ( BYTE1(v8) & 2 )
759 { 755 {
760 v9 = v1->pLines.uNumLines; 756 v9 = v1->pLines.uNumLines;
761 if ( v9 < 100 ) 757 if ( v9 < 100 )
762 { 758 {
763 v1->pLines.pLineVertices[2 * v9].pos.x = (double)*(signed int *)(v7 - 18); 759 v1->pLines.pLineVertices[2 * v9].pos.x = (double)*(signed int *)(v7 - 18);
764 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].pos.y = (double)*(signed int *)(v7 - 14); 760 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].pos.y = (double)*(signed int *)(v7 - 14);
765 v15 = *(short *)v7; 761 v15 = *(short *)v7;
766 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].pos.z = 1.0 762 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].pos.z = 1.0 - 1.0 / ((double)v15 * 1000.0 / (double)pOutdoorCamera->shading_dist_mist);
767 - 1.0
768 / ((double)v15
769 * 1000.0
770 / (double)pOutdoorCamera->shading_dist_mist);
771 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].rhw = 1.0; 763 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].rhw = 1.0;
772 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].diffuse = *(int *)(v7 + 18); 764 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].diffuse = *(int *)(v7 + 18);
773 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].specular = 0; 765 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].specular = 0;
774 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].texcoord.x = 0.0; 766 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines].texcoord.x = 0.0;
775 *((float *)&v1->pParticles[0].uType + 16 * (v1->pLines.uNumLines + 813)) = 0.0; 767 *((float *)&v1->pParticles[0].uType + 16 * (v1->pLines.uNumLines + 813)) = 0.0;
776 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.x = (double)*(signed int *)(v7 - 10); 768 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.x = (double)*(signed int *)(v7 - 10);
777 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.y = (double)*(signed int *)(v7 - 6); 769 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.y = (double)*(signed int *)(v7 - 6);
778 v15 = *(short *)v7; 770 v15 = *(short *)v7;
779 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.z = 1.0 771 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].pos.z = 1.0 - 1.0 / ((double)v15 * 1000.0 / (double)pOutdoorCamera->shading_dist_mist);
780 - 1.0
781 / ((double)v15
782 * 1000.0
783 / (double)pOutdoorCamera->shading_dist_mist);
784 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].rhw = 1.0; 772 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].rhw = 1.0;
785 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].diffuse = *(int *)(v7 + 18); 773 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].diffuse = *(int *)(v7 + 18);
786 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].specular = 0; 774 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].specular = 0;
787 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].texcoord.x = 0.0; 775 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines + 1].texcoord.x = 0.0;
788 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines++ + 1].texcoord.y = 0.0; 776 v1->pLines.pLineVertices[2 * v1->pLines.uNumLines++ + 1].texcoord.y = 0.0;
793 v14.field_10 = *(int *)(v7 + 6); 781 v14.field_10 = *(int *)(v7 + 6);
794 v14.field_14 = *(int *)(v7 + 6); 782 v14.field_14 = *(int *)(v7 + 6);
795 v14.uScreenSpaceX = *(int *)(v7 - 18); 783 v14.uScreenSpaceX = *(int *)(v7 - 18);
796 v14.uScreenSpaceY = *(int *)(v7 - 14); 784 v14.uScreenSpaceY = *(int *)(v7 - 14);
797 v14.sZValue = *(int *)(v7 - 2); 785 v14.sZValue = *(int *)(v7 - 2);
798 pRenderer->MakeParticleBillboardAndPush_ODM( 786 pRenderer->MakeParticleBillboardAndPush_ODM(&v14, pBitmaps_LOD->pHardwareTextures[*(int *)(v7 - 46)], *(int *)(v7 + 18), *(int *)(v7 - 22));
799 &v14,
800 pBitmaps_LOD->pHardwareTextures[*(int *)(v7 - 46)],
801 *(int *)(v7 + 18),
802 *(int *)(v7 - 22));
803 } 787 }
804 if ( *(v7 - 81) & 8 ) 788 if ( *(v7 - 81) & 8 )
805 { 789 {
806 v14.field_10 = *(int *)(v7 + 6); 790 v14.field_10 = *(int *)(v7 + 6);
807 v14.field_14 = *(int *)(v7 + 6); 791 v14.field_14 = *(int *)(v7 + 6);
808 v14.uScreenSpaceX = *(int *)(v7 - 18); 792 v14.uScreenSpaceX = *(int *)(v7 - 18);
809 v14.uScreenSpaceY = *(int *)(v7 - 14); 793 v14.uScreenSpaceY = *(int *)(v7 - 14);
810 v14.sZValue = *(int *)(v7 - 2); 794 v14.sZValue = *(int *)(v7 - 2);
811 pRenderer->MakeParticleBillboardAndPush_ODM( 795 pRenderer->MakeParticleBillboardAndPush_ODM(&v14, pSprites_LOD->pHardwareSprites[*(int *)(v7 - 46)].pTexture, *(int *)(v7 + 18),
812 &v14,
813 pSprites_LOD->pHardwareSprites[*(int *)(v7 - 46)].pTexture,
814 *(int *)(v7 + 18),
815 *(int *)(v7 - 22)); 796 *(int *)(v7 - 22));
816 } 797 }
817 } 798 }
818 else 799 else
819 { 800 {