#pragma once #include "ObjectManager.h" #include "Vectors.h" #include "PhysicsManager.h" #include "Camera.h" typedef enum { AIEventInit, AIEventRun, AIEventCleanUp, AIEventCopyData } AIEvent; typedef void (*EnemyAIModule) (void * , AIEvent, float); #define ENEMYAVOIDRADIUS (3.0 * 3.0) #define PYRAMIDROTSPEED 0.001 #define PYRAMIDMOVESPEED 0.001 #define PYRAMIDRANGE (6.0 * 6.0) #define PYRAMIDSHOOTSPEED 1800.0 #define KAMIKAZEROTSPEED 0.004 #define KAMIKAZEMOVESPEED 0.005 #define KAMIKAZERANGE (40.0 * 40.0) #define SMARTSHOOTERROTSPEED 0.001 #define SMARTSHOOTERMOVESPEED 0.0025 #define SMARTSHOOTERRANGE (20.0 * 20.0) #define SMARTSHOOTERSHOOTSPEED 1400.0 #define SMARTSHOOTERSTATEFLY 0 #define SMARTSHOOTERSTATESHOOT 1 #define SMARTSHOOTERFLYTIME 3000.0 #define SMARTSHOOTERSHOOTTIME 4000.0 #define STATIONARYSHOOTERROTSPEED 0.0002 #define STATIONARYSHOOTERRANGE (16.0 * 16.0) #define STATIONARYSHOOTERSHOOTSPEED 1200.0 typedef struct VEnemy { EnemyAIModule Callback; void * Data; VObject Object; float Idle; struct VEnemy * next; /* Linked List */ Boolean taggedForRemoval; VPhysics Physics; int Shields; } VEnemy; typedef struct SmartShooterData { int State; float Idle2; Vector Angle; void * Data; } SmartShooterData; void DumbShooterAI(void * Enemy, AIEvent Event, float interval); void KamikazeAI(void * Enemy, AIEvent Event, float interval); void SmartShooterAI(void * Enemy, AIEvent Event, float interval); void StationaryAI(void * Enemy, AIEvent Event, float interval); void GuardAI(void * Enemy, AIEvent Event, float interval); void InitEnemy(VEnemy * e, void * Data); void SetEnemyAI(VEnemy * e, EnemyAIModule aiMod); void CleanUpEnemy(VEnemy * e); void DrawEnemy(VEnemy * e); void RunEnemy(VEnemy * e, float interval); void HitEnemy(VEnemy * e, int Damage); void CopyEnemy(VEnemy * src, VEnemy * dest);