summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/koopatlas/core.cpp2
-rw-r--r--src/koopatlas/mapdata.cpp11
-rw-r--r--src/msgbox.cpp2
3 files changed, 12 insertions, 3 deletions
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp
index 03b64dc..7eaa339 100644
--- a/src/koopatlas/core.cpp
+++ b/src/koopatlas/core.cpp
@@ -360,6 +360,8 @@ int dScKoopatlas_c::onDelete() {
DVD_FreeFile(GetDVDClass2(), "SI_propeller");
DVD_FreeFile(GetDVDClass2(), "SI_star");
+ levelInfoLoader.unload();
+
return true;
}
diff --git a/src/koopatlas/mapdata.cpp b/src/koopatlas/mapdata.cpp
index a6031b1..fb09f1b 100644
--- a/src/koopatlas/mapdata.cpp
+++ b/src/koopatlas/mapdata.cpp
@@ -34,9 +34,9 @@ dKPMapData_c::dKPMapData_c() {
}
dKPMapData_c::~dKPMapData_c() {
- m_fileLoader.unload();
-
unloadTilesets();
+
+ m_fileLoader.unload();
}
bool dKPMapData_c::load(const char *filename) {
@@ -81,8 +81,13 @@ bool dKPMapData_c::loadTilesets() {
}
void dKPMapData_c::unloadTilesets() {
- if (tilesetLoaders != 0)
+ if (tilesetLoaders != 0) {
+ for (int i = 0; i < data->tilesetCount; i++) {
+ tilesetLoaders[i].unload();
+ }
+
delete[] tilesetLoaders;
+ }
}
void dKPMapData_c::fixup() {
diff --git a/src/msgbox.cpp b/src/msgbox.cpp
index a576189..99dd8c6 100644
--- a/src/msgbox.cpp
+++ b/src/msgbox.cpp
@@ -119,6 +119,8 @@ int dMsgBoxManager_c::onDraw() {
int dMsgBoxManager_c::onDelete() {
instance = 0;
+ msgDataLoader.unload();
+
return layout.free();
}