コード例 #1
0
bool block::inside(block & drop)
{
  bool ret=0;
  if(type==BLK_BRACKET){
    int inLine=y+ttlSize.y/2;
    //int bottomSpace=orig.height-(interior.y+interior.height);
    int inH=h-((inLine-y)+bottomBar/2);
    if(drop.inBounds(x+interior.x, inLine, fullWidth()-interior.x, inH))
      ret=true;
  }
  return ret;
}
コード例 #2
0
bool block::beneath(block & chk,signed int blw)
{
  if(blw<ttlSize.y/2-5){
    blw=ttlSize.y;
  }
  else blw+=ttlSize.y;
  int midLine=y+h-ttlSize.y/2;
  
  if(type==BLK_BRACKET){
    midLine=y+(interior.y+interior.height+bottomBar/2);
    blw=blw+(y+h)-midLine;
  }
  
  return (chk.inBounds(x, midLine, fullWidth(), blw));
}