CleverRaven/Cataclysm-DDA — pull request #2176 by atomicdryad (2013-07-24 22:43:17+00:00)
Title: game::independant map::loading, coordinate translation helpers, optimizations

* map: load / save / generate will properly handle areas beyond game->cur_om,
load accepts optional *overmap argument to allow creation of additional
long distance map areas ( for nukes and such ).
* map::loadn: don't iterate vehicles if update_vehicles==false. Skip spoilage check too
* submap: store absolute submap coordinate (as in maps.txt) as x,y,z
* map: store absolute submap coordinate of top-left submap as point abs_sub
* map: getabs(x, y) converts local-to-map tile coordinates to absolute tile
coordinate (ie, if cur_om() = -1,0 and levx = 1,2, getabs(0,-500) will return
-4308,-476
* map: getabs: [TEMPORARY/TESTING] perform sanity check that grid[0] and abs_sub agree.
* map: inboundabs(x, y): works with absolute tile coordinates instead of local-top-map
coordinates
* map: getspawns(x,y); returns std::vector& for the appropriate submap

* real_coords: fromabs(x, y) will subdivide absolute tile coordinates to standard
overmap / submap values, ie:
-4308,-476 = abs_sub: -359,-40, abs_sub_pos: 0,4, abs_om: -1,-1, abs_om_pos: 1,320
This is the start of refactoring real_coords, which has to loop to take oob values
into account and doesn't provide abs_om_pos ( submap constrained by overmap limit )
* real_coords: fromomap(omx, omy, suboffsetx, suboffsety) will populate abs_ coordinate
values based on overmap & relative-to-overmap (unwrapped) overmap pos. Specifically
for dealing with overmap::draw_overmap:
point target=cur_om->draw_overmap(this, 0);
real_coords tgt;
tgt.fromomap( cur_om->pos().x, cur_om->pos().y, target.x, target.y);