#pragma once #include "ObjectManager.h" #include "Vectors.h" #ifndef __MWERKS__ #include "ObjectManager.c" #include "Vectors.c" #endif #define MAXBULLETDISTANCE 20.0 enum weaponTypes { WEAPONTYPEBULLET /* Add more as necessary. Rockets? Bombs? Mines? */ }; typedef struct VWeapon { int Type; Vector InitialPos; Vector Position; Vector Target; /* For bullets, this is a direction vector */ VObject Object; struct VWeapon * next; Boolean taggedForRemoval; } VWeapon; void InitWeapon(VWeapon * w, int type); void CleanUpWeapon(VWeapon * w); void StartWeapon(VWeapon * w, Vector * startPos, Vector * target); void RunWeapon(VWeapon * w, float interval); void DrawWeapon(VWeapon * w);