From f1cfbe9065bece88d167af9e9dc33c007cd53616 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Aug 2004 00:07:17 +0000 Subject: Forgot to implement destructor for ActionMap svn-id: r14400 --- saga/actionmap.cpp | 5 +++++ saga/actionmap.h | 1 + saga/saga.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/saga/actionmap.cpp b/saga/actionmap.cpp index f8887909da..49ec489b65 100644 --- a/saga/actionmap.cpp +++ b/saga/actionmap.cpp @@ -46,6 +46,11 @@ ActionMap::ActionMap(void) { _initialized = true; } +ActionMap::~ActionMap(void) { + freeMap(); +} + + int ActionMap::load(const byte * exmap_res, size_t exmap_res_len) { // Loads exit map data from specified exit map resource R_ACTIONMAP_ENTRY *exmap_entry; diff --git a/saga/actionmap.h b/saga/actionmap.h index 782f6ffe91..fd1d8f3fa4 100644 --- a/saga/actionmap.h +++ b/saga/actionmap.h @@ -42,6 +42,7 @@ class ActionMap { public: int reg(void); ActionMap(void); + ~ActionMap(void); int load(const byte *exmap_res, size_t exmap_res_len); int draw(R_SURFACE *ds, int color); diff --git a/saga/saga.cpp b/saga/saga.cpp index 4b813c2000..b5b814a60e 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -245,6 +245,7 @@ void SagaEngine::shutdown() { EVENT_Shutdown(); delete _render; + delete _actionMap; delete _sndRes; // Shutdown system modules */ delete _music; -- cgit v1.2.3