| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef POWERUP_H |
| 20 |
#define POWERUP_H |
| 21 |
|
| 22 |
#include "pstypes.h" |
| 23 |
#include "manage.h" |
| 24 |
#include "object.h" |
| 25 |
|
| 26 |
#define MAX_POWERUPS 100 |
| 27 |
#define MAX_STATIC_POWERUPS 50 |
| 28 |
|
| 29 |
#define PF_IMAGE_BITMAP 1 |
| 30 |
|
| 31 |
|
| 32 |
#define POW_SHIELD 0 |
| 33 |
#define POW_ENERGY 1 |
| 34 |
|
| 35 |
#define POW_LASER 2 |
| 36 |
#define POW_VULCAN_WEAPON 3 |
| 37 |
#define POW_SPREADFIRE_WEAPON 4 |
| 38 |
#define POW_PLASMA_WEAPON 5 |
| 39 |
#define POW_FUSION_WEAPON 6 |
| 40 |
|
| 41 |
#define POW_SUPER_LASER 7 |
| 42 |
#define POW_GAUSS_WEAPON 8 |
| 43 |
#define POW_HELIX_WEAPON 9 |
| 44 |
#define POW_PHOENIX_WEAPON 10 |
| 45 |
#define POW_OMEGA_WEAPON 11 |
| 46 |
|
| 47 |
#define POW_MISSILE_1 12 |
| 48 |
#define POW_MISSILE_4 13 // 4-pack MUST follow single missile |
| 49 |
#define POW_HOMING_MISSILE_1 14 |
| 50 |
#define POW_HOMING_MISSILE_4 15 // 4-pack MUST follow single missile |
| 51 |
#define POW_PROXIMITY_WEAPON 16 |
| 52 |
#define POW_SMART_MISSILE_WEAPON 17 |
| 53 |
#define POW_MEGA_WEAPON 18 |
| 54 |
|
| 55 |
#define POW_FLASH_MISSILE_1 19 |
| 56 |
#define POW_FLASH_MISSILE_4 20 // 4-pack MUST follow single missile |
| 57 |
#define POW_GUIDED_MISSILE_1 21 |
| 58 |
#define POW_GUIDED_MISSILE_4 22 // 4-pack MUST follow single missile |
| 59 |
#define POW_SMART_MINE 23 |
| 60 |
#define POW_MERCURY_MISSILE_1 24 |
| 61 |
#define POW_MERCURY_MISSILE_4 25 // 4-pack MUST follow single missile |
| 62 |
#define POW_EARTHSHAKER_MISSILE 26 |
| 63 |
|
| 64 |
#define POW_EXTRA_LIFE 27 |
| 65 |
#define POW_QUAD_FIRE 28 |
| 66 |
#define POW_VULCAN_AMMO 29 |
| 67 |
#define POW_CLOAK 30 |
| 68 |
#define POW_TURBO 31 |
| 69 |
#define POW_INVULNERABILITY 32 |
| 70 |
#define POW_FULL_MAP 33 |
| 71 |
#define POW_CONVERTER 34 |
| 72 |
#define POW_AMMO_RACK 35 |
| 73 |
#define POW_AFTERBURNER 36 |
| 74 |
#define POW_HEADLIGHT 37 |
| 75 |
|
| 76 |
#define POW_FLAG_BLUE 38 |
| 77 |
#define POW_FLAG_RED 39 |
| 78 |
#define POW_HOARD_ORB 40 |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
#define MAX_POWERUP_SOUNDS 7 |
| 83 |
|
| 84 |
#define PSI_PICKUP 0 |
| 85 |
|
| 86 |
struct powerup { |
| 87 |
char name[PAGENAME_LEN]; |
| 88 |
float size; |
| 89 |
int score; |
| 90 |
int image_handle; |
| 91 |
char model_name[PAGENAME_LEN]; |
| 92 |
int flags; |
| 93 |
uint16_t used; |
| 94 |
|
| 95 |
int16_t sounds[MAX_POWERUP_SOUNDS]; |
| 96 |
|
| 97 |
|
| 98 |
physics_info phys_info; |
| 99 |
|
| 100 |
}; |
| 101 |
|
| 102 |
extern int Num_powerups; |
| 103 |
extern powerup Powerups[MAX_POWERUPS]; |
| 104 |
extern char *Static_powerup_names[]; |
| 105 |
|
| 106 |
|
| 107 |
void InitPowerups(); |
| 108 |
|
| 109 |
|
| 110 |
int AllocPowerup(); |
| 111 |
|
| 112 |
|
| 113 |
void FreePowerup(int n); |
| 114 |
|
| 115 |
|
| 116 |
int GetNextPowerup(int n); |
| 117 |
|
| 118 |
|
| 119 |
int GetPrevPowerup(int n); |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
int FindPowerupName(char *name); |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
int LoadPowerupImage(char *filename, int *type); |
| 128 |
|
| 129 |
|
| 130 |
int GetPowerupImage(int handle, int framenum); |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
void DrawPowerupObject(object *obj); |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
int MatchPowerupToIndex(char *name, int dest_index); |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
int MovePowerupFromIndex(int index); |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
void RemapPowerups(); |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
void RemapAllPowerupObjects(int old_index, int new_index); |
| 152 |
|
| 153 |
|
| 154 |
int DoPowerup(object *obj); |
| 155 |
|
| 156 |
#endif |