This commit is contained in:
Daveo 2001-08-04 21:06:19 +00:00
parent ff13d67687
commit 80a6c35255
4 changed files with 21 additions and 1 deletions

View file

@ -1184,6 +1184,23 @@ DVECTOR const &CamPos=CLevel::getCameraPos();
}
/****************************************************************************************/
bool CThing::isOnScreen(DVECTOR Pos)
{
// Check Is Onscreen
sBBox &ScrBBox=CThingManager::getRenderBBox();
DVECTOR const &CamPos=CLevel::getCameraPos();
Pos.vx-=CamPos.vx;
Pos.vy-=CamPos.vy;
if (Pos.vx<ScrBBox.XMin) return(false);
if (Pos.vx>ScrBBox.XMax) return(false);
if (Pos.vy<ScrBBox.YMin) return(false);
if (Pos.vy>ScrBBox.YMax) return(false);
return(true);
}
/****************************************************************************************/
void CThing::calcRenderPos(DVECTOR const &Pos,DVECTOR &renderPos)
{