1 /*************************************************************************** 2 ai.h - description 3 ------------------- 4 begin : Thu Jan 6 2000 5 copyright : (C) 2000 by Perdig 6 email : perdig@linuxbr.com.br 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef AI_H 19 #define AI_H 20 21 #include <stdlib.h> 22 #include "global.h" 23 #include "car.h" 24 25 void createAI(aiStruct *ai, mapStruct *map); 26 void destroyAI(); 27 void orderAI(aiStruct *ai, mapStruct *map); 28 void moveAI(aiStruct *ai, mapStruct *map); 29 int getDistance(int fx, int fy, int dx, int dy); 30 void goTo(carStruct *car, mapStruct *map, int dx, int dy); 31 32 // AI Orders 33 #define CONFUSED -2 34 #define WANDER -1 35 #define GET_BLUE 1 36 37 38 // AI Data 39 // When confused, data will hold how much time it will be left that way 40 41 // If defined, just one car will seek the blue, the others wander around 42 #define ONE_SEEK 43 // If defined, enemy can stop when lost 44 //#define ENEMY_STOP 45 // Time the car will be confused 46 #define CONFUSED_TIME (5 * FPS) / 2 47 // Time of unvulnerability after being confused 48 #define REST_TIME 2 49 50 #endif 51