CleverRaven/Cataclysm-DDA — pull request #8072 by BevapDin (2014-06-28 13:53:14+00:00)
Title: Simplify map [CR]

This is supposed to make some code a cleaner and remove dependencies.

- Removes the parameters from `map::save`, none of them has been needed at all, see commit message.
- Adds `map::load_abs` for loading a map with absolute (global) coordinates. Currently only used in mission_start.cpp and `game::nuke`. Getting the overmap pointer can now be omitted there. Changing the other calls of `map::load` to `load_abs` would currently not gain anything, it would only move the relative-to-absolute translation code from `map::load` out of that function and before it gets called. The overmap pointer for `map::load` is now non-optional to reflect that this function uses relative coordinates. Ideally `game::levx` would be absolute coordinates and `game:.cur_om` would not be needed at all.
- Removes the coordinates from `map::shift`. The map knows from where it is shifted from (similar to `map::save`). Vehicles store a submap coordinate relative to the overmap they are on, this is not good and needs work.
- Removes the enum `mapgen_function_type`, it's pointless overhead as the virtual functions work just fine there.
- Moves the initialization of new submap into its constructor and out of mapgen.cpp (mapgen should not need to known how a submap looks like and how it is initialized). Also adds a destructor that frees the vehicles in the submap to avoid memory leaks.
- Memory leaks avoided when loading a submap fails (deletes incomplete submap). Also adds some debug messages if the content of the map file is unexpected (does not contain the expected submap).
- Removes the list of submaps from `mapbuffer` as there is already a `std::map` that stores the same data.

Marked this as CR because it does not fix any bugs nor does it implement any new features, it can wait in case it conflicts or requests for changes.

What happened to #7496?