Mercurial > mm7
comparison LightmapBuilder.cpp @ 2274:90f56da08d76
small cleaning
author | Ritor1 |
---|---|
date | Fri, 14 Mar 2014 09:32:25 +0600 |
parents | 2e02c384c62b |
children | 25f771e528f0 |
comparison
equal
deleted
inserted
replaced
2257:8878fba164fd | 2274:90f56da08d76 |
---|---|
854 } | 854 } |
855 for ( uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i ) | 855 for ( uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i ) |
856 { | 856 { |
857 if ( pSlot >= 20 ) | 857 if ( pSlot >= 20 ) |
858 break; | 858 break; |
859 ApplyLight_ODM(pStationaryLightsStack[i].pLights, pFace, (unsigned int *)&pSlot, 0); | 859 ApplyLight_ODM(&pStationaryLightsStack->pLights[i], pFace, (unsigned int *)&pSlot, 0); |
860 } | 860 } |
861 result = pSlot; | 861 result = pSlot; |
862 stru_F8AD28.uNumLightsApplied = pSlot; | 862 stru_F8AD28.uNumLightsApplied = pSlot; |
863 return true; | 863 return true; |
864 } | 864 } |
1086 goto LABEL_5; | 1086 goto LABEL_5; |
1087 } | 1087 } |
1088 pLight = (StationaryLight *)LODWORD(a1[1].vWorldPosition.x); | 1088 pLight = (StationaryLight *)LODWORD(a1[1].vWorldPosition.x); |
1089 v12 = a1[2].vWorldPosition.x; | 1089 v12 = a1[2].vWorldPosition.x; |
1090 } | 1090 } |
1091 uStripType = LODWORD(v12); | 1091 //uStripType = LODWORD(v12); |
1092 a1 = (RenderVertexSoft *)LODWORD(a1[1].vWorldPosition.y); | 1092 a1 = (RenderVertexSoft *)LODWORD(a1[1].vWorldPosition.y); |
1093 v13 = v11->vWorldPosition.y; | 1093 v13 = v11->vWorldPosition.y; |
1094 LABEL_5: | 1094 LABEL_5: |
1095 v64 = v13; | 1095 v64 = v13; |
1096 LABEL_11: | 1096 LABEL_11: |
1097 //v60 = v10; | 1097 //v60 = v10; |
1098 v59 = (const char *)v11; | 1098 v59 = (const char *)v11; |
1099 v60 = uStripType; | 1099 v60 = v12;//uStripType; |
1100 minz = pGame->pIndoorCameraD3D->GetPolygonMinZ(v11, uStripType); | 1100 minz = pGame->pIndoorCameraD3D->GetPolygonMinZ(v11, uStripType); |
1101 maxz = pGame->pIndoorCameraD3D->GetPolygonMaxZ(v11, uStripType); | 1101 maxz = pGame->pIndoorCameraD3D->GetPolygonMaxZ(v11, uStripType); |
1102 result = v8->vPosition.x; | 1102 result = v8->vPosition.x; |
1103 *((float *)&v61 + 1) = maxz; | 1103 *((float *)&v61 + 1) = maxz; |
1104 v16 = (double)result; | 1104 v16 = (double)result; |
1171 stru_F8AD28._blv_lights_radii[*pSlot] = v63; | 1171 stru_F8AD28._blv_lights_radii[*pSlot] = v63; |
1172 stru_F8AD28._blv_lights_inv_radii[*v53] = 65536 / v63; | 1172 stru_F8AD28._blv_lights_inv_radii[*v53] = 65536 / v63; |
1173 stru_F8AD28._blv_lights_xs[*v53] = v8->vPosition.x; | 1173 stru_F8AD28._blv_lights_xs[*v53] = v8->vPosition.x; |
1174 stru_F8AD28._blv_lights_ys[*v53] = v8->vPosition.y; | 1174 stru_F8AD28._blv_lights_ys[*v53] = v8->vPosition.y; |
1175 stru_F8AD28._blv_lights_zs[*v53] = v8->vPosition.z; | 1175 stru_F8AD28._blv_lights_zs[*v53] = v8->vPosition.z; |
1176 a3 = (float *)v8->uLightColorR; | 1176 //a3 = (float *)v8->uLightColorR; |
1177 stru_F8AD28._blv_lights_rs[*v53] = (double)(signed int)a3 * 0.003921568859368563; | 1177 stru_F8AD28._blv_lights_rs[*v53] = v8->uLightColorR / 255.0f; |
1178 a3 = (float *)v8->uLightColorG; | 1178 //a3 = (float *)v8->uLightColorG; |
1179 stru_F8AD28._blv_lights_gs[*v53] = (double)(signed int)a3 * 0.003921568859368563; | 1179 stru_F8AD28._blv_lights_gs[*v53] = v8->uLightColorG / 255.0f; |
1180 a3 = (float *)v8->uLightColorB; | 1180 //a3 = (float *)v8->uLightColorB; |
1181 stru_F8AD28._blv_lights_bs[*v53] = (double)(signed int)a3 * 0.003921568859368563; | 1181 stru_F8AD28._blv_lights_bs[*v53] = v8->uLightColorB / 255.0f; |
1182 v54 = abs(v60); | 1182 v54 = abs(v63); |
1183 v55 = pRenderer->bUsingSpecular; | 1183 v55 = pRenderer->bUsingSpecular; |
1184 stru_F8AD28._blv_lights_light_dot_faces[*v53] = v54; | 1184 stru_F8AD28._blv_lights_light_dot_faces[*v53] = v54; |
1185 stru_F8AD28._blv_lights_types[*v53] = v8->uLightType; | 1185 stru_F8AD28._blv_lights_types[*v53] = v8->uLightType; |
1186 //v56 = pRenderer->pRenderD3D; | 1186 //v56 = pRenderer->pRenderD3D; |
1187 v57 = stru_F8AD28._blv_lights_types[*v53]; | 1187 v57 = stru_F8AD28._blv_lights_types[*v53]; |
1191 result = 4 * *v53; | 1191 result = 4 * *v53; |
1192 if ( /*v56 &&*/ v55 ) | 1192 if ( /*v56 &&*/ v55 ) |
1193 { | 1193 { |
1194 if ( stru_F8AD28._blv_lights_types[*v53] & 4 ) | 1194 if ( stru_F8AD28._blv_lights_types[*v53] & 4 ) |
1195 { | 1195 { |
1196 *(float *)((char *)stru_F8AD28._blv_lights_rs + result) = *(float *)((char *)stru_F8AD28._blv_lights_rs + result) | 1196 stru_F8AD28._blv_lights_rs[result] = stru_F8AD28._blv_lights_rs[result] * 0.3300000131130219; |
1197 * 0.3300000131130219; | 1197 stru_F8AD28._blv_lights_gs[result] = stru_F8AD28._blv_lights_gs[result] * 0.3300000131130219; |
1198 *(float *)((char *)stru_F8AD28._blv_lights_gs + result) = *(float *)((char *)stru_F8AD28._blv_lights_gs + result) | 1198 stru_F8AD28._blv_lights_bs[result] = stru_F8AD28._blv_lights_bs[result] * 0.3300000131130219; |
1199 * 0.3300000131130219; | |
1200 *(float *)((char *)stru_F8AD28._blv_lights_bs + result) = *(float *)((char *)stru_F8AD28._blv_lights_bs + result) | |
1201 * 0.3300000131130219; | |
1202 } | 1199 } |
1203 } | 1200 } |
1204 ++*v53; | 1201 ++*v53; |
1205 return 1; | 1202 return 1; |
1206 } | 1203 } |