MCPcopy Create free account
hub / github.com/diasurgical/devilution / CheckBlock

Function CheckBlock

Source/missiles.cpp:201–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201BOOL CheckBlock(int fx, int fy, int tx, int ty)
202{
203 int pn;
204 BOOL coll;
205
206 coll = FALSE;
207 while (fx != tx || fy != ty) {
208 pn = GetDirection(fx, fy, tx, ty);
209 fx += XDirAdd[pn];
210 fy += YDirAdd[pn];
211 if (nSolidTable[dPiece[fx][fy]])
212 coll = TRUE;
213 }
214
215 return coll;
216}
217
218int FindClosest(int sx, int sy, int rad)
219{

Callers 3

FindClosestFunction · 0.85
MI_FireballFunction · 0.85
MI_ElementFunction · 0.85

Calls 1

GetDirectionFunction · 0.85

Tested by

no test coverage detected