aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-19 22:44:24 +0200
committerEugene Sandulenko2016-05-22 00:45:03 +0200
commitadc884ae8f484a439bf13a0371f0fea95cd50392 (patch)
tree4f2c085bb7b96080666ec93ea8cb9df8c6a9bf23
parent9d60209a33d2eab4075662e9ed4f1e9215c719a2 (diff)
downloadscummvm-rg350-adc884ae8f484a439bf13a0371f0fea95cd50392.tar.gz
scummvm-rg350-adc884ae8f484a439bf13a0371f0fea95cd50392.tar.bz2
scummvm-rg350-adc884ae8f484a439bf13a0371f0fea95cd50392.zip
SCUMM HE: AIEntity class implementation
-rw-r--r--engines/scumm/he/moonbase/ai_types.cpp175
-rw-r--r--engines/scumm/he/moonbase/ai_types.h97
-rw-r--r--engines/scumm/module.mk1
3 files changed, 273 insertions, 0 deletions
diff --git a/engines/scumm/he/moonbase/ai_types.cpp b/engines/scumm/he/moonbase/ai_types.cpp
new file mode 100644
index 0000000000..1674e03777
--- /dev/null
+++ b/engines/scumm/he/moonbase/ai_types.cpp
@@ -0,0 +1,175 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/textconsole.h"
+#include "scumm/he/moonbase/ai_types.h"
+
+namespace Scumm {
+
+AIEntity::AIEntity(int id) {
+ switch (id) {
+ case BRUTAKAS:
+ warning("BRUTAKAS");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "BRUTAKAS");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+
+ case AGI:
+ warning("Agi");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Agi");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_MEDIUM;
+ _angleVariation = AI_VAR_MEDIUM;
+ _powerVariation = AI_VAR_LARGE;
+ break;
+
+ case EL_GATO:
+ warning("El Gato de la Noche");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "El Gato de la Noche");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_MEDIUM;
+ break;
+
+ case PIXELAHT:
+ warning("Pixelaht");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Pixelaht");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_LARGE;
+ _angleVariation = AI_VAR_MEDIUM;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+
+ case CYBALL:
+ warning("cYbaLL");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "cYbaLL");
+ _behaviorVariation = AI_VAR_LARGE;
+ _targetVariation = AI_VAR_LARGE;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+
+ case NEEP:
+ warning("Neep! Neep!");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Neep! Neep!");
+ _behaviorVariation = AI_VAR_MEDIUM;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_LARGE;
+ break;
+
+ case WARCUPINE:
+ warning("WARcupine");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "WARcupine");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_LARGE;
+ _powerVariation = AI_VAR_MEDIUM;
+ break;
+
+ case AONE:
+ warning("aone");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "aone");
+ _behaviorVariation = AI_VAR_MEDIUM;
+ _targetVariation = AI_VAR_MEDIUM;
+ _angleVariation = AI_VAR_MEDIUM;
+ _powerVariation = AI_VAR_MEDIUM;
+ break;
+
+ case SPANDO:
+ warning("S p a n d o");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "S p a n d o");
+ _behaviorVariation = AI_VAR_LARGE;
+ _targetVariation = AI_VAR_LARGE;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+
+ case ORBNU_LUNATEK:
+ warning("Bonur J Lunatek");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Bonur J Lunatek");
+ _behaviorVariation = AI_VAR_HUGE;
+ _targetVariation = AI_VAR_HUGE;
+ _angleVariation = AI_VAR_HUGE;
+ _powerVariation = AI_VAR_HUGE;
+ break;
+
+ case CRAWLER_CHUCKER:
+ warning("Le Chuckre des Crawlres");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Le Chuckre des Crawlres");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_MEDIUM;
+ _angleVariation = AI_VAR_MEDIUM;
+ _powerVariation = AI_VAR_LARGE;
+ break;
+
+ case ENERGY_HOG:
+ warning("Energy Hog");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Energy Hog\n");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+
+ case RANGER:
+ warning("Ranger");
+ _id = id;
+ _nameString = new char[64];
+ strcpy(_nameString, "Ranger\n");
+ _behaviorVariation = AI_VAR_SMALL;
+ _targetVariation = AI_VAR_SMALL;
+ _angleVariation = AI_VAR_SMALL;
+ _powerVariation = AI_VAR_SMALL;
+ break;
+ }
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/he/moonbase/ai_types.h b/engines/scumm/he/moonbase/ai_types.h
new file mode 100644
index 0000000000..1e8c829d81
--- /dev/null
+++ b/engines/scumm/he/moonbase/ai_types.h
@@ -0,0 +1,97 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SCUMM_HE_MOONBASE_AI_TYPES_H
+#define SCUMM_HE_MOONBASE_AI_TYPES_H
+
+namespace Scumm {
+
+enum {
+ AGI = 1,
+ AONE = 2,
+ BRUTAKAS = 3,
+ CYBALL = 4,
+ EL_GATO = 5,
+ NEEP = 6,
+ ORBNU_LUNATEK = 7,
+ PIXELAHT = 8,
+ SPANDO = 9,
+ WARCUPINE = 10
+};
+
+enum {
+ CRAWLER_CHUCKER = 11,
+ ENERGY_HOG = 12,
+ RANGER = 13
+};
+
+enum {
+ AI_VAR_NONE = -1,
+ AI_VAR_SMALL = 0,
+ AI_VAR_MEDIUM = 1,
+ AI_VAR_LARGE = 2,
+ AI_VAR_HUGE = 5
+};
+
+enum {
+ AI_VAR_BASE_BEHAVIOR = 10,
+ AI_VAR_BASE_TARGET = 10,
+ AI_VAR_BASE_ANGLE = 2,
+ AI_VAR_BASE_POWER = 5
+};
+
+class AIEntity {
+private:
+ int _id;
+ char *_nameString;
+ int _behaviorVariation;
+ int _targetVariation;
+ int _angleVariation;
+ int _powerVariation;
+
+public:
+ AIEntity(int id);
+ ~AIEntity() {
+ if (_nameString) {
+ delete _nameString;
+ _nameString = 0;
+ }
+ }
+
+ int GetID() const { return _id; }
+ char *GetNameString() const { return _nameString; }
+ int GetBehaviorVariation() const { return _behaviorVariation; }
+ int GetTargetVariation() const { return _targetVariation; }
+ int GetAngleVariation() const { return _angleVariation; }
+ int GetPowerVariation() const { return _powerVariation; }
+
+ void SetID(int id) { _id = id; }
+ void SetNameString(char *nameString) { _nameString = nameString; }
+ void SetBehaviorVariation(int behaviorVariation) { _behaviorVariation = behaviorVariation; }
+ void SetTargetVariation(int targetVariation) { _targetVariation = targetVariation; }
+ void SetAngleVariation(int angleVariation) { _angleVariation = angleVariation; }
+ void SetPowerVariation(int powerVariation) { _powerVariation = powerVariation; }
+};
+
+} // End of namespace Scumm
+
+#endif
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index f1551b2bd2..717ca8146e 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -140,6 +140,7 @@ MODULE_OBJS += \
he/logic/puttrace.o \
he/logic/soccer.o \
he/moonbase/ai_defenseunit.o \
+ he/moonbase/ai_types.o \
he/moonbase/moonbase.o \
he/moonbase/moonbase_fow.o
endif