aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-17 15:51:42 +0530
committerEugene Sandulenko2019-09-03 17:17:22 +0200
commit74931e720508c978bc6d035466f74c6125ce6762 (patch)
tree0ed466cb93433d50402fe34336f0788d67614fc9
parente1c616e06f200d275ff1cf725971f98056bf1a23 (diff)
downloadscummvm-rg350-74931e720508c978bc6d035466f74c6125ce6762.tar.gz
scummvm-rg350-74931e720508c978bc6d035466f74c6125ce6762.tar.bz2
scummvm-rg350-74931e720508c978bc6d035466f74c6125ce6762.zip
HDB: Add destructor to AIEntity and AnimTarget
-rw-r--r--engines/hdb/ai.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index f24000738b..8b25008648 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -546,6 +546,57 @@ struct AIEntity {
moverightGfx[i] = new Tile;
}
}
+ ~AIEntity() {
+ blinkFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete blinkGfx[i];
+ }
+
+ special1Frames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete special1Gfx[i];
+ }
+
+ standdownFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete standdownGfx[i];
+ }
+
+ standupFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete standupGfx[i];
+ }
+
+ standleftFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete standleftGfx[i];
+ }
+
+ standrightFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete standrightGfx[i];
+ }
+
+ movedownFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete movedownGfx[i];
+ }
+
+ moveupFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete moveupGfx[i];
+ }
+
+ moveleftFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete moveleftGfx[i];
+ }
+
+ moverightFrames = 0;
+ for (int i = 0; i < kMaxAnimFrames; i++) {
+ delete moverightGfx[i];
+ }
+ }
void save(Common::OutSaveFile *out);
void load(Common::InSaveFile *in);
@@ -597,6 +648,12 @@ struct AnimTarget {
gfxList[i] = new Tile;
}
}
+
+ ~AnimTarget() {
+ for (int i = 0; i < kMaxAnimTFrames; i++) {
+ delete gfxList[i];
+ }
+ }
};
struct InvEnt {