Bigmap (Programming)

From Hellmoo Wiki Archive
Revision as of 10:19, 25 December 2008 by 24.16.135.162 (talk) (New page: Big maps ($bigmap) are now used instead of the old contiguous map system. They work as a central settings database that rooms use when rendering maps. When a room renders its map ($room:_...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Big maps ($bigmap) are now used instead of the old contiguous map system. They work as a central settings database that rooms use when rendering maps.

When a room renders its map ($room:_render_map) it will look to see if the room's area has a valid .bigmap property, if it does, it uses the bigmap for data instead of the area.


The following verbs are available:

  * @setup-areas &lt;bigmap object&gt;<br>
  Will set .bigmap on all areas in .areas to this object, if it already isn't set to this object.
  
  * @reset-maps &lt;bigmap object&gt;<br>
  Will go through every area in .areas and cause them to reset their maps.

The following functions are available:

  * area_link_icons()<br>
  Returns a lists of lists of icon_block data from all areas in .areas, formatted as {{#area, {data...}}, ...}. Used by $room:_render_map when rendering in bigmap mode.

The following properties are available:

  * areas<br>
  A list of areas in the big map.
  
  * blank_normal_icon<br>
  The blank icon for the normal map (non-client).
  
  * blank_client_icon<br>
  The blank icon for client mode.
  
  * sky_z<br>
  A room.z lesser or equal to this value (negative values represent up in coordinate system) will result in sky_normal_icon / sky_client_icon instead of the blanks and that Z entry in icon block data always being used for coordinates below or equal to sky_z value.
  
  * sky_normal_icon, sky_client_icon<br>
  Icons for rooms that meet sky_z criteria.
  
  * underground_z<br>
  A room.z greater or equal to this value (positive values represent down in coordinate system) will result in using underground_normal_icon / sky_client_icon instead of the blanks and that Z entry in icon block data always being used for coordinates greater or equal to underground_z value.
  
  * underground_normal_icon, underground_client_icon<br>
  Icons for rooms that meet underground_z criteria.
  
  * icon_block_z<br>
  A list of Z values, this corresponds with icon_block_data, so you can find the appropriate icon block data for your z (bigmap.icon_block_data[room.z in bigmap.icon_block_z]). This helps efficiency when a large number of icon blocks are present.
  
  * icon_block_data<br>
  Icon block data, a list of lists, the top level is per-z. For each Z the format is the same as normal $area icon blocks, {z, x1, y1, x2, y2, icon}. For big maps, the Z in the actual icon block data is ignored.

-- Main.MarvIn - 04 Sep 2007