- misc code changes in TannerShadow

This commit is contained in:
Ilya Shurumov 2021-04-29 19:29:13 +06:00
parent 2d6c794595
commit e462cced53

View File

@ -1849,36 +1849,21 @@ void TannerShadow(PEDESTRIAN* pDrawingPed, VECTOR* pPedPos, SVECTOR* pLightPos,
Tangle = ratan2(-pLightPos->vx, pLightPos->vz); Tangle = ratan2(-pLightPos->vx, pLightPos->vz);
vert[0].vx = -128; SetVec(&vert[0], -128, 0, -320);
vert[0].vy = 0; SetVec(&vert[1], 128, 0, -320);
vert[0].vz = -320; SetVec(&vert[2], -128, 0, 40);
SetVec(&vert[3], 128, 0, 40);
vert[1].vx = 128;
vert[1].vy = 0;
vert[1].vz = -320;
vert[2].vx = -128;
vert[2].vy = 0;
vert[2].vz = 40;
vert[3].vx = 128;
vert[3].vy = 0;
vert[3].vz = 40;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
cn = rcos(Tangle); cn = rcos(Tangle); sn = rsin(Tangle);
sn = rsin(Tangle);
vx = vert[i].vx; vx = vert[i].vx; vz = vert[i].vz;
vz = vert[i].vz;
vert[i].vx = FIXED(vx * cn) - FIXED(vz * sn); vert[i].vx = FIXED(vx * cn) - FIXED(vz * sn);
vert[i].vz = FIXED(vx * sn) + FIXED(vz * cn); vert[i].vz = FIXED(vx * sn) + FIXED(vz * cn);
vert[i].vx += pPedPos->vx; VecAdd(&vert[i], &vert[i], pPedPos);
vert[i].vy += pPedPos->vy;
vert[i].vz += pPedPos->vz;
} }
gte_SetRotMatrix(&inv_camera_matrix); gte_SetRotMatrix(&inv_camera_matrix);