22 #ifndef SCUMM_HE_MOONBASE_AI_MAIN_H 23 #define SCUMM_HE_MOONBASE_AI_MAIN_H 25 #include "common/array.h" 26 #include "scumm/he/moonbase/ai_tree.h" 30 class ScummEngine_v100he;
35 TERRAIN_TYPE_GOOD = 0,
36 TERRAIN_TYPE_SLOPE = 1,
37 TERRAIN_TYPE_WATER = 2,
60 ITEM_TIME_EXPIRED = 18,
65 BUILDING_ENERGY_COLLECTOR = 3,
66 BUILDING_MAIN_BASE = 4,
69 BUILDING_EXPLOSIVE_MINE = 7,
71 BUILDING_ANTI_AIR = 9,
72 BUILDING_OFFENSIVE_LAUNCHER = 10,
73 BUILDING_BALLOON = 11,
80 ENERGY_POOL_UNITS_ON = 47,
87 AI(ScummEngine_v100he *vm);
91 void setAIType(
const int paramCount,
const int32 *params);
92 int masterControlProgram(
const int paramCount,
const int32 *params);
96 int chooseTarget(
int behavior);
98 Tree *initApproachTarget(
int targetX,
int targetY,
Node **retNode);
99 int *approachTarget(
Tree *myTree,
int &x,
int &y,
Node **currentNode);
100 Tree *initAcquireTarget(
int targetX,
int targetY,
Node **retNode);
101 int *acquireTarget(
int targetX,
int targetY);
102 int *acquireTarget(
int targetX,
int targetY,
Tree *myTree,
int &errorCode);
103 int *offendTarget(
int &targetX,
int &targetY,
int index);
104 int *defendTarget(
int &targetX,
int &targetY,
int index);
105 int *energizeTarget(
int &targetX,
int &targetY,
int index);
108 int getClosestUnit(
int x,
int y,
int radius,
int player,
int alignment,
int unitType,
int checkUnitEnabled);
109 int getClosestUnit(
int x,
int y,
int radius,
int player,
int alignment,
int unitType,
int checkUnitEnabled,
int minDist);
111 int getDistance(
int originX,
int originY,
int endX,
int endY);
112 int calcAngle(
int originX,
int originY,
int endX,
int endY);
113 int calcAngle(
int originX,
int originY,
int endX,
int endY,
int noWrapFlag);
114 int getTerrain(
int x,
int y);
116 int getHubX(
int hub);
117 int getHubY(
int hub);
121 int getCurrentPlayer();
124 int getTerrainSquareSize();
125 int getBuildingOwner(
int building);
126 int getBuildingState(
int building);
127 int getBuildingType(
int building);
128 int getBuildingArmor(
int building);
129 int getBuildingMaxArmor(
int building);
130 int getBuildingWorth(
int building);
131 int getBuildingTeam(
int building);
133 int getPlayerEnergy();
134 int getPlayerMaxTime();
135 int getTimerValue(
int timerNum);
136 int getPlayerTeam(
int player);
140 int simulateBuildingLaunch(
int x,
int y,
int power,
int angle,
int numSteps,
int isEnergy);
142 int getPowerAngleFromPoint(
int originX,
int originY,
int endX,
int endY,
int threshold,
int olFlag);
143 int getPowerAngleFromPoint(
int originX,
int originY,
int endX,
int endY,
int threshold);
144 int checkIfWaterState(
int x,
int y);
145 int getUnitsWithinRadius(
int x,
int y,
int radius);
147 float degToRad(
float degrees);
149 int getEnergyHogType();
152 int getEnergyPoolsArray();
153 int getCoordinateVisibility(
int x,
int y,
int playerNum);
154 int getUnitVisibility(
int unit,
int playerNum);
155 int getEnergyPoolVisibility(
int pool,
int playerNum);
156 int getNumberOfPools();
157 int getNumberOfPlayers();
160 int getTotalWindSpeed();
161 int getWindXSpeedMax();
162 int getWindYSpeedMax();
165 int getEnergyPoolWidth(
int pool);
166 int getLastAttacked(
int &x,
int &y);
168 int getBuildingStackPtr();
169 int getTurnCounter();
171 int getGroundAltitude(
int x,
int y);
172 int checkForCordOverlap(
int xStart,
int yStart,
int affectRadius,
int simulateFlag);
173 int checkForAngleOverlap(
int unit,
int angle);
174 int estimateNextRoundEnergy(
int player);
175 int checkForUnitOverlap(
int x,
int y,
int radius,
int ignoredUnit);
176 int checkForEnergySquare(
int x,
int y);
179 int simulateWeaponLaunch(
int x,
int y,
int power,
int angle,
int numSteps);
180 int fakeSimulateWeaponLaunch(
int x,
int y,
int power,
int angle);
182 int checkIfWaterSquare(
int x,
int y);
184 int getLandingPoint(
int x,
int y,
int power,
int angle);
185 int getEnemyUnitsVisible(
int playerNum);
187 void limitLocation(
int &a,
int &b,
int c,
int d);
188 int energyPoolSize(
int pool);
189 int getMaxCollectors(
int pool);
195 ScummEngine_v100he *_vm;
205 const int32 *_mcpParams;
Definition: ai_pattern.h:109
Definition: ai_types.h:61