home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unneeded function; also some minor comment improvmenets.
[plomrogue]
/
src
/
rexit.c
diff --git
a/src/rexit.c
b/src/rexit.c
index 7bd4440ab7d429607788a657c76f13e81916bcfc..e39a9feaa658fae15e8e9a40568e0b8994546d32 100644
(file)
--- a/
src/rexit.c
+++ b/
src/rexit.c
@@
-10,8
+10,9
@@
#include "map.h" /* for Map struct */
#include "keybindings.h" /* for KeysWinData, KeyBinding structs */
#include "command_db.h" /* for free_command_db() */
#include "map.h" /* for Map struct */
#include "keybindings.h" /* for KeysWinData, KeyBinding structs */
#include "command_db.h" /* for free_command_db() */
-#include "windows.h" /* for Win struct */
-
+#include "windows.h" /* for Win struct, free_win(), free_winmeta() */
+#include "map_objects.h" /* for free_item_defs(), free_monster_defs() */
+#include "wincontrol.h" /* for get_win_by_id(), free_winconfs(), free_wins() */
/* The clean-up routine and the flag resource by which it decides what to do. */
/* The clean-up routine and the flag resource by which it decides what to do. */
@@
-48,21
+49,27
@@
static void cleanup(struct World * world)
{
free_command_db(world);
}
{
free_command_db(world);
}
- if (cleanup_flags & CLEANUP_WIN_INFO)
+ if (cleanup_flags & CLEANUP_MAP_OBJECTS)
+ {
+ free_items(world->item);
+ free_monsters(world->monster);
+ }
+ if (cleanup_flags & CLEANUP_MAP_OBJECT_DEFS)
{
{
- free(world->wins.info->_title);
+ free_item_defs(world->item_def);
+ free_monster_defs(world->monster_def);
}
}
- if (cleanup_flags & CLEANUP_WIN
_MAP
)
+ if (cleanup_flags & CLEANUP_WIN
S
)
{
{
- free
(world->wins.map->_title
);
+ free
_wins(world
);
}
}
- if (cleanup_flags & CLEANUP_WIN
_LOG
)
+ if (cleanup_flags & CLEANUP_WIN
CONFS
)
{
{
- free
(world->wins.log->_title
);
+ free
_winconfs(world
);
}
}
- if (cleanup_flags & CLEANUP_WIN_
KEYS
)
+ if (cleanup_flags & CLEANUP_WIN_
META
)
{
{
- free
(world->wins.keys->_title
);
+ free
_winmeta(world->wmeta
);
}
}
}
}