Advertisement
ZoriaRPG

bool IsSolidFFC(int x, int y)

Feb 15th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. // Utility function to check for ffc solidity at an arbitrary pixel.
  2. // There *must* be a faster way to do this...
  3. bool IsSolidFFC(int x, int y)
  4. {
  5.      ffc f; int q = 1;
  6.      for ( ; q < 33; ++q )
  7.      {
  8.           f = Screen->LoadFFC(q);
  9.           if ( f->Flags&FFCF_SOLID )
  10.           {
  11.                if ( RectCollision(f->X, f->Y, f->X+f->EffectWidth, f->Y+f->EffectHeight, x, y, x, y)
  12.                {
  13.                     return true;
  14.                }
  15.           }
  16.           return false;
  17.      }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement