22 #ifndef SCUMM_HE_MOONBASE_AI_TARGETACQUISITION_H 23 #define SCUMM_HE_MOONBASE_AI_TARGETACQUISITION_H 25 #include "scumm/he/moonbase/ai_defenseunit.h" 26 #include "scumm/he/moonbase/ai_node.h" 27 #include "scumm/he/moonbase/ai_tree.h" 31 const int NUM_IMPT_UNITS = 3;
32 const int NUM_SHOT_POSITIONS = 1;
33 const int NUM_WEAPONS = 3;
44 int _shotPosX, _shotPosY;
49 Sortie(
AI *ai) { _ai = ai; _unitType = 0; _shotPosX = _shotPosY = 0; }
52 static void setSourcePos(
int x,
int y) {
56 static void setTargetPos(
int x,
int y) {
61 void setUnitType(
int unitType) { _unitType = unitType; }
63 void setShotPosX(
int shotPosX) { _shotPosX = shotPosX; }
64 void setShotPosY(
int shotPosY) { _shotPosY = shotPosY; }
65 void setShotPos(
int shotPosX,
int shotPosY) {
71 _enemyDefenses = enemyDefenses;
73 void setEnemyDefenses(
int enemyDefensesScummArray,
int defendX,
int defendY);
75 void printEnemyDefenses();
77 static int getSourcePosX() {
return _sSourceX; }
78 static int getSourcePosY() {
return _sSourceY; }
79 static int getTargetPosX() {
return _sTargetX; }
80 static int getTargetPosY() {
return _sTargetY; }
82 int getUnitType()
const {
return _unitType; }
84 int getShotPosX()
const {
return _shotPosX; }
85 int getShotPosY()
const {
return _shotPosY; }
86 int *getShotPos()
const;
92 int numChildrenToGen()
override;
96 float calcH()
override;
97 int checkSuccess()
override;
98 float calcT()
override;
115 void setSourceX(
int sourceX) { _sourceX = sourceX; }
116 void setSourceY(
int sourceY) { _sourceY = sourceY; }
117 void setTargetX(
int targetX) { _targetX = targetX; }
118 void setTargetY(
int targetY) { _targetY = targetY; }
119 void setSourceUnit(
int sourceUnit) { _sourceUnit = sourceUnit; }
120 void setPower(
int power) { _power = power; }
121 void setAngle(
int angle) { _angle = angle; }
122 void setUnit(
int unit) { _unit = unit; }
124 int getSourceX()
const {
return _sourceX; }
125 int getSourceY()
const {
return _sourceY; }
126 int getTargetX()
const {
return _targetX; }
127 int getTargetY()
const {
return _targetY; }
128 int getSourceUnit()
const {
return _sourceUnit; }
129 int getPower()
const {
return _power; }
130 int getAngle()
const {
return _angle; }
131 int getUnit()
const {
return _unit; }
133 int calculateDefenseUnitPosition(
int targetX,
int targetY,
int index);
140 if (x->getState() == DUS_OFF) {
141 debugC(DEBUG_MOONBASE_AI,
"OFF");
145 return x->getDistanceTo() < y->getDistanceTo();
Definition: ai_targetacquisition.h:136
Definition: ai_targetacquisition.h:101
Definition: ai_targetacquisition.h:35
Definition: ai_defenseunit.h:47
void void void void void debugC(int level, uint32 debugChannels, MSVC_PRINTF const char *s,...) GCC_PRINTF(3