mirror of
https://github.com/softdorothy/Pararena2.git
synced 2024-05-28 12:41:35 +00:00
806b9b47db
This project was originally compiled with THINK C for the Macintosh. The project file is a THINK C project file. Then there is the assembly static library (SMS) that is linked in to provide fast, 4-channel sound (written by Patrick Buckland). Resource files, a balloon file for “balloon help” when it was a thing…. Good luck to anyone trying to bring this beast back to life.
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;
|
|
|