Simplify shadow rendering for objects by removing unused/useless hacks for droid transport.
parent
086a0fd4bc
commit
b72332ba42
|
@ -2691,8 +2691,7 @@ static BOOL renderWallSection(STRUCTURE *psStructure)
|
||||||
void renderShadow( DROID *psDroid, iIMDShape *psShadowIMD )
|
void renderShadow( DROID *psDroid, iIMDShape *psShadowIMD )
|
||||||
{
|
{
|
||||||
Vector3i dv;
|
Vector3i dv;
|
||||||
Vector3f *pVecTemp;
|
SDWORD rx, rz;
|
||||||
SDWORD shadowScale, rx, rz;
|
|
||||||
|
|
||||||
dv.x = (psDroid->pos.x - player.p.x) - terrainMidX*TILE_UNITS;
|
dv.x = (psDroid->pos.x - player.p.x) - terrainMidX*TILE_UNITS;
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
if(psDroid->droidType == DROID_TRANSPORTER)
|
||||||
|
@ -2714,27 +2713,11 @@ void renderShadow( DROID *psDroid, iIMDShape *psShadowIMD )
|
||||||
/* Translate */
|
/* Translate */
|
||||||
pie_TRANSLATE(rx,0,-rz);
|
pie_TRANSLATE(rx,0,-rz);
|
||||||
|
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
|
||||||
{
|
|
||||||
pie_MatRotY(-psDroid->rot.direction);
|
|
||||||
}
|
|
||||||
|
|
||||||
pVecTemp = psShadowIMD->points;
|
|
||||||
if(psDroid->droidType == DROID_TRANSPORTER)
|
|
||||||
{
|
|
||||||
flattenImd( psShadowIMD, psDroid->pos.x, psDroid->pos.y, 0);
|
|
||||||
shadowScale = 100-(psDroid->pos.z/100);
|
|
||||||
if(shadowScale < 50) shadowScale = 50;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pie_MatRotY(-psDroid->rot.direction);
|
pie_MatRotY(-psDroid->rot.direction);
|
||||||
pie_MatRotX(psDroid->rot.pitch);
|
pie_MatRotX(psDroid->rot.pitch);
|
||||||
pie_MatRotZ(psDroid->rot.roll);
|
pie_MatRotZ(psDroid->rot.roll);
|
||||||
}
|
|
||||||
|
|
||||||
pie_Draw3DShape(psShadowIMD, 0, 0, WZCOL_WHITE, WZCOL_BLACK, pie_TRANSLUCENT, 128);
|
pie_Draw3DShape(psShadowIMD, 0, 0, WZCOL_WHITE, WZCOL_BLACK, pie_TRANSLUCENT, 128);
|
||||||
psShadowIMD->points = pVecTemp;
|
|
||||||
|
|
||||||
pie_MatEnd();
|
pie_MatEnd();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue