1 line
2.1 KiB
C
Executable File
1 line
2.1 KiB
C
Executable File
//============================================================
|
|
//============================================================
|
|
//== ==
|
|
//== Dynamics Header ==
|
|
//== ==
|
|
//============================================================
|
|
//============================================================
|
|
|
|
|
|
//======================================================== Defines
|
|
|
|
#define kPersonMass 4 // purely relative & arbitrary unit
|
|
#define kPersonSmallMass 2 // for colliding with ball
|
|
#define kBallMass 1
|
|
#define kPersonBallMass 5
|
|
#define kPersonPersonMass 8
|
|
|
|
#define kPersonDampening 2 // fraction subtracted when wall collided
|
|
#define kBallDampening 3 // bigger => more energy lost
|
|
|
|
#define kLoopsImpactless 6
|
|
#define kFrameToDampen 5
|
|
#define kEnergyAbsorbed 32 // fraction of velocity subtracted @ impact
|
|
#define kPBEnergyAbsorbed 4 // as above but for player/ball collisions
|
|
|
|
//======================================================== Prototypes
|
|
|
|
void DoPersonBallMerged (playerType *); // catching/dropping the ball
|
|
void DoPersonBallParted (playerType *);
|
|
void DoPersonBallCollided (playerType *); // ball/person dynamics
|
|
void DoPersonPersonCollided (void);
|
|
void CheckPersonBallCollision (playerType *); // test ball/person coll.
|
|
void CheckPersonPersonCollision (void);
|
|
void CheckPersonBallCollision (playerType *);
|
|
short GetPlaceOnArena (short, short);
|
|
void HandlePersonWallCollision (playerType *); // handle collisions with the wall
|
|
void CheckUpOnBall (void);
|
|
void HandleBallWallCollision (void);
|
|
void HandleCollisions (void); // handle non-wall collisions
|
|
|
|
|
|
//======================================================== External Variables
|
|
|
|
extern playerType theOpponent;
|
|
extern playerType thePlayer;
|
|
extern ballType theBall;
|
|
extern long oldDistSquared;
|
|
extern short whosGotBall, loopsBallHeld, leftGoalLeague, rightGoalLeague;
|
|
extern short *littleForceTable, *juniorForceTable, *varsityForceTable;
|
|
extern short *minorForceTable, *proForceTable;
|
|
extern short boardForceTable[9][2];
|
|
extern Boolean imTheMaster, netGameInSession, drawThisFrame;
|
|
|