This commit is contained in:
Charles 2001-05-05 14:58:49 +00:00
parent a74745a7b2
commit a4b8372440
19 changed files with 160 additions and 40 deletions

View file

@ -48,9 +48,15 @@ void CEnemyAsProjectile::render()
renderPos.vx = Pos.vx - offset.vx;
renderPos.vy = Pos.vy - offset.vy;
if ( renderPos.vx >= 0 && renderPos.vx <= VidGetScrW() )
CRECT collisionRect = getCollisionArea();
collisionRect.x1 -= Pos.vx;
collisionRect.x2 -= Pos.vx;
collisionRect.y1 -= Pos.vy;
collisionRect.y2 -= Pos.vy;
if ( renderPos.vx + collisionRect.x2 >= 0 && renderPos.vx + collisionRect.x1 <= VidGetScrW() )
{
if ( renderPos.vy >= 0 && renderPos.vy <= VidGetScrH() )
if ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
{
SprFrame = m_actorGfx->Render(renderPos,0,0,0);
m_actorGfx->RotateScale( SprFrame, renderPos, m_rotation, 4096, 4096 );