// File : DogFight.h // Author : John Wojcik ( QuietBloke ) // Created : September 2000 // Desc : My first game written using my 2D Game framework. // The game is very simple. Two biplanes battle it out in the // Yaroze sky for air supremacy. // // History : // Date Author Description // -------- --------------- ---------------------------------------- #include #include #include "fw.h" #include "pad.h" #define TEXTURE_PLANE ( 0x080090000 ) #define TEXTURE_SHOT ( 0x80090A20 ) #define TEXTURE_AAFIRE ( 0x80090A90 ) #define TEXTURE_GROUND ( 0x800924B0 ) #define TEXTURE_HANGER ( 0x80092900 ) #define TEXTURE_WALL ( 0x80093550 ) #define TEXTURE_DOGFIGHT ( 0x800937E0 ) #define TEXTURE_ELOGO ( 0x80096400 ) #define TEXTURE_SCORE ( 0x80099E20 ) #define STAGE_SHIFT 8 #define MAX_SHOTS 10 #define PLANE_ACCEL_SHIFT 0 // Each player can be in one of several stages. #define PLAYER_LANDED 1 #define PLAYER_TAKE_OFF 2 #define PLAYER_FLYING 3 #define PLAYER_STALLED 4 #define PLAYER_FALLING 5 // Global vars for all actors and thier costumes. extern int PlaneCostume; // Store the 2 plane costume id's extern int ShotCostume; // Store the shot costume id extern int AAFireCostume; // Store the 6 Anti Aircraft fire costume id's extern int GroundCostume; // Store the Ground Costume id extern int HangerCostume; // Store the 2 Hanger costume id's extern int WallCostume; // Store the Wall costume id extern int DogfightCostume; // Store the Dogfight Text costume id extern int ELogoCostume; // Store the Eclipse Logo costume id extern int SmokeCostume; // Store the smoke cloud costume id extern int ScoreCostume; // Digits 0-9 to show scores extern int WallActor; // Store the wall actor id extern int HangerActor[2]; // Store the two hanger actor id's extern int GroundActor[10]; // Store the ground actor id's ( many as required to fill screen width ) extern int PlaneActor[2]; // Store the two actor id's extern int ShotActor[2][MAX_SHOTS]; // Store the shot actor id's. 5 shots per plane. extern int AAFireActor[12]; // Store the Anti Aircraft fire actor id's. 5 + 2 ( one for each plane ) extern int XPlaneAnim[2]; // Store the animation id's for the x movement for each plane. extern int YPlaneAnim[2]; // Store the animation id's for the y movement for each plane. extern int XShotAnim[2][MAX_SHOTS]; // Store the animation id's for the x movement for each shot. extern int YShotAnim[2][MAX_SHOTS]; // Store the animation id's for the y movement for each shot. extern int CostumeAAFireAnim[12]; // Costume animations for each AAFire actor. extern int PlayerStage[2]; // Current stage of each player. extern int PlaneAccel[2]; // How fast does a plane accelerate in the direction its pointing. extern int SmokeActor[2][10]; // puffs of smoke from dying plane extern int ScaleSmokeAnim[2][10]; // Store the animation ids for the scaled smoke extern int PlayerKills[2]; // Store how many times each player has made a kill extern int ScoreActor[2]; // Actor to show the kill score for each player. NOTE : Currently only 1 digit each // All global variables used to customize gameplay extern int PlaneAcceleration; // How fast does a plane accelerate in horizontal flight extern int PlaneStallSpeed; // Speed at which plane will stall extern int PlaneDeceleration; // How fast a plane decelerates. This is applied to x and y speed individually // for the sake of speed. Otherwise we would have to calculate the square root // of x*x + y*y. Square root is not good... sloooow extern int PlaneRotation; // Number of degrees per frame that a plane can rotate extern int ShotSpeed; // How fast a shot travels. This is the actual combined x,y velocity extern int ShotLife; // How many frames a shot travels before it dies. extern int TotalAAFire; // Total number of AAFire on screen ( including 1 for each plane ). extern int MaxShots; // Max shots on screen per plane. extern int Gravity; // Gravity on planes