From aec87e7058c788e7d37d1e639056d616b1ff56e2 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Fri, 21 Jun 2019 09:34:05 +0530 Subject: HDB: Add _floats data Addition includes struct and member variables --- engines/hdb/ai-init.cpp | 10 ++++++++++ engines/hdb/ai.h | 1 + 2 files changed, 11 insertions(+) diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index 183f0288ad..e03f456bbc 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -668,12 +668,22 @@ AIEntTypeInfo aiEntList[] = { AI::AI() { _ents = new Common::Array; + _floats = new Common::Array; + + for (int i = 0; i < kMaxLevel2Ents;i++) { + _entsLevel2[i] = new AIEntLevel2; + } + // REMOVE: Remove for final. Used here due to lack of a MENU _numGems = _numGooCups = _numMonkeystones = _numInventory = 0; } AI::~AI() { delete _ents; + delete _floats; + for (int i = 0; i < kMaxLevel2Ents;i++) { + delete _entsLevel2[i]; + } } bool AI::init() { diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 6ab3a8b86d..c29f1c8ad8 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -747,6 +747,7 @@ public: private: Common::Array *_ents; + Common::Array *_floats; AIEntity *_player; // Cinematics Variables -- cgit v1.2.3