This commit is contained in:
parent
ff13d67687
commit
80a6c35255
4 changed files with 21 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue