// Header File // Created 01/04/2007 01:53:03 PM // Star Blaster by Tyler Cassidy // Version 1.00 // Email: tyler@tylerc.org || altadogsledder89@yahoo.ca // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. /* Be careful! Unit Registry calling is based on this enumeration! */ /* YOUR_SHIP=0, ALLY_SHIP=Num You, ENEMY_SHIP=Num Ally+You, BOSS_SHIP=Num You+Ally+Enemy */ /* 5 Ships for you, 3 Ally Ships, 6 Enemy Ships, 4 Boss Ships */ enum unitOwners { YOUR_SHIP=0, ALLY_SHIP=5, ENEMY_SHIP=8, BOSS_SHIP=14 }; enum shipYourTypes { MONKEY_RAIDER=0, FORK=1, TANK=2, DRILL_WINDER=3, DOOM_MASTER=4 }; enum shipAllyTypes { DELTA_V=0, FLYING_BOX=1, FLAMER=3 }; enum shipEnemyTypes { BOOMERANG=0, THE_BOMB=1, STINGER=2, R_73=3, X_BLASTER=4, JUMPER=5 }; enum shipBossTypes { BUMBLE_BEE=0, THE_KEY=1, HORNET=2, MAC=3 }; #define MAX_POPULATION 16 // 16 max ships #define MAX_PROJECTILES 500 // 500 Bullets at one time on field #define MAX_POWERUPS 12 // 12 Special Items at one time. #define NUM_YOURSHIPS 5 // You have 5 ships #define NUM_ALLYSHIPS 3 // 3 Ally Ships #define NUM_ENEMYSHIPS 6 // 6 Enemy Ships #define NUM_BOSSSHIPS 4 // 4 Boss Ships typedef struct { unsigned char ship; // Ship 1, 2, etc. unsigned char owner; // Ally, Enemy, Boss (built for Unit Reg) unsigned char class; // Class of Ship (Ally, Enemy, Boss; for Rotated) unsigned short health; unsigned short shield; unsigned char gun, armor, speed_boost; long x, y; long velocity; unsigned char direction; short mode; long mode_1, mode_2; unsigned char dying_sequence; // use health for alive } UnitPopulation; // 34 bytes typedef struct { unsigned char ammo_type; long x, y; unsigned char direction; long velocity; unsigned char owner; } ProjectilePopulation; // 15 Bytes typedef struct { unsigned char object; long x, y; unsigned char direction; long velocity; unsigned long timing; unsigned char sequence; } PowerupHandler; // 19 Bytes typedef struct { const char *name; // Ship Name unsigned char ship; // Ship 1, 2, etc. unsigned char owner; // You, Ally, Enemy, Boss unsigned char gun, armor, speed_boost; unsigned char dual_fire, fire_speed; unsigned char gun_y, dgun_x; // Spacing for Gun from top of sprite, and spacing from center for dual guns unsigned char score_kill; unsigned char intellect; } UnitRegistryEntry; extern UnitPopulation *Population; extern ProjectilePopulation *Projectiles; extern PowerupHandler *Powerups; extern UnitRegistryEntry UnitRegistry[]; extern const char *YourShipsText[]; extern const char *AllyShipsText[]; extern const char *EnemyShipsText[]; extern const char *BossShipsText[]; extern const char *DifficultyText[]; extern const char *WeaponsText[]; extern const char *ArmorText[];