This commit is contained in:
parent
7c42177848
commit
c2d7d07d8b
20 changed files with 261 additions and 844 deletions
|
@ -214,112 +214,6 @@ void CNpcDualPlatform::render()
|
|||
DVECTOR &renderPos=getRenderPos();
|
||||
|
||||
m_modelGfx->Render(renderPos);
|
||||
|
||||
#if defined (__USER_paul__) || defined (__USER_charles__)
|
||||
DVECTOR offset = CLevel::getCameraPos();
|
||||
DVECTOR size;
|
||||
DVECTOR centre;
|
||||
int halfLength;
|
||||
|
||||
centre=getCollisionCentre();
|
||||
size=getCollisionSize();
|
||||
halfLength=size.vx>>1;
|
||||
|
||||
x1=-halfLength*mcos(getCollisionAngle()&4095)>>12;
|
||||
y1=-halfLength*msin(getCollisionAngle()&4095)>>12;
|
||||
x2=+halfLength*mcos(getCollisionAngle()&4095)>>12;
|
||||
y2=+halfLength*msin(getCollisionAngle()&4095)>>12;
|
||||
|
||||
centre.vx-=offset.vx;
|
||||
centre.vy-=offset.vy;
|
||||
x1+=centre.vx;
|
||||
y1+=centre.vy;
|
||||
x2+=centre.vx;
|
||||
y2+=centre.vy;
|
||||
|
||||
DrawLine(x1,y1,x2,y2,0,255,0,0);
|
||||
#endif
|
||||
/*
|
||||
x1 = Pos.vx - offset.vx;
|
||||
x2 = m_lineBase.vx - offset.vx;
|
||||
|
||||
if ( x1 > x2 )
|
||||
{
|
||||
int tempX = x1;
|
||||
x1 = x2;
|
||||
x2 = tempX;
|
||||
}
|
||||
|
||||
y1 = Pos.vy - offset.vy;
|
||||
y2 = m_lineBase.vy - offset.vy;
|
||||
|
||||
if ( y1 > y2 )
|
||||
{
|
||||
int tempY = y1;
|
||||
y1 = y2;
|
||||
y2 = tempY;
|
||||
}
|
||||
|
||||
if ( y1 < 0 )
|
||||
{
|
||||
y1 = 0;
|
||||
}
|
||||
|
||||
if ( y2 > VidGetScrH() )
|
||||
{
|
||||
y2 = VidGetScrH();
|
||||
}
|
||||
|
||||
if ( x2 >= 0 && x1 <= VidGetScrW() )
|
||||
{
|
||||
if ( y2 >= 0 && y1 <= VidGetScrH() )
|
||||
{
|
||||
DrawLine( x1, y1, x2, y2, 0, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_isMaster )
|
||||
{
|
||||
DVECTOR otherLineBase = m_otherPlatform->getLineBase();
|
||||
|
||||
x1 = otherLineBase.vx - offset.vx;
|
||||
x2 = m_lineBase.vx - offset.vx;
|
||||
|
||||
if ( x1 > x2 )
|
||||
{
|
||||
int tempX = x1;
|
||||
x1 = x2;
|
||||
x2 = tempX;
|
||||
}
|
||||
|
||||
y1 = otherLineBase.vy - offset.vy;
|
||||
y2 = m_lineBase.vy - offset.vy;
|
||||
|
||||
if ( y1 > y2 )
|
||||
{
|
||||
int tempY = y1;
|
||||
y1 = y2;
|
||||
y2 = tempY;
|
||||
}
|
||||
|
||||
if ( x1 < 0 )
|
||||
{
|
||||
x1 = 0;
|
||||
}
|
||||
|
||||
if ( x2 > VidGetScrW() )
|
||||
{
|
||||
x2 = VidGetScrW();
|
||||
}
|
||||
|
||||
if ( x2 >= 0 && x1 <= VidGetScrW() )
|
||||
{
|
||||
if ( y2 >= 0 && y1 <= VidGetScrH() )
|
||||
{
|
||||
DrawLine( x1, y1, x2, y2, 0, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue