22 #ifndef SCUMM_HE_BASKETBALL_BASKETBALL_H 23 #define SCUMM_HE_BASKETBALL_BASKETBALL_H 27 #include "scumm/he/intern_he.h" 28 #include "scumm/he/logic_he.h" 29 #include "scumm/he/basketball/court.h" 30 #include "scumm/he/basketball/collision/bball_collision_player.h" 31 #include "scumm/he/basketball/collision/bball_collision_shields.h" 33 #include "common/array.h" 34 #include "common/stack.h" 35 #include "common/queue.h" 36 #include "common/std/set.h" 40 class LogicHEBasketball;
45 Basketball(ScummEngine_v100he *vm);
48 int u32FloatToInt(
float input);
49 int u32DoubleToInt(
double input);
51 int numOpponentsInCone(
int team,
float widthDistanceRatio,
const U32FltVector2D &end,
const U32FltVector2D &focus);
52 float congestion(U32FltVector2D pos,
bool ignore,
int whichPlayer);
53 void fillPlayerTargetList(
const CCollisionPlayer *sourceObject, CCollisionObjectVector *targetList);
54 void fillBallTargetList(
const CCollisionSphere *sourceObject, CCollisionObjectVector *targetList);
55 double getLaunchAngle(
int velocity,
int hDist,
int vDist,
int gravity);
56 float getAvoidanceDistance(
const U32Circle &playerMarker,
const CCollisionPlayer &obstacle);
57 CCollisionPlayer *detectObstacle(
const U32Circle &playerMarker,
int playerID,
const U32FltPoint2D &targetLocation,
bool targetIsObstacle, U32FltPoint2D *intersection, CBBallCourt *court);
58 bool avoidObstacle(
const U32Circle &playerMarker,
const U32FltPoint2D &targetLocation,
const CCollisionPlayer &obstacle, ERevDirection whichDirection, U32FltPoint2D *newTarget);
59 ERevDirection getAvoidanceDirection(
const U32Circle &playerMarker,
const U32FltPoint2D &targetLocation,
const CCollisionPlayer &obstacle);
62 void pushTargetOutOfObstacle(
const U32Circle &playerMarker,
63 const CCollisionPlayer &obstacle,
66 ERevDirection getBestPath(
const U32Circle &playerMarker,
69 CCollisionPlayer *obstacle,
70 ERevDirection lastTurn,
77 CCollisionShieldVector *_shields;
80 ScummEngine_v100he *_vm;
87 #endif // SCUMM_HE_BASKETBALL_BASKETBALL_H