[ Index ]

PHP Cross Reference of miniNEAB Engine

title

Body

[close]

/ -> map_util.php (summary)

Some utilities to deal with the map data

File Size: 366 lines (8 kb)
Included or required: 16 times
Referenced: 0 times
Includes or requires: 1 file
 walkable.php

Defines 8 functions

  map_extract()
  map2str()
  lenght_code()
  check_walkable_map()
  retreive_loc()
  unique_place()
  grid_link()
  map_count()

Functions
Functions that are not part of a class:

map_extract($str)   X-Ref
Convert a encoded map string into a 2D array.

param: string $str the encoded map data
return: array the 2D map

map2str($map)   X-Ref
Convert a 2D map array into a encoded map string.

param: array $map
return: string

lenght_code($str)   X-Ref
Run length encode the encoded map string. This saves space on
the database as well as network during the transfer at
the cost of some CPU.

param: string $str
return: string

check_walkable_map($type,$boat = false)   X-Ref
Determine is a cell type is walkable or not.

param: integer $type
param: boolean $boat
return: boolean

retreive_loc()   X-Ref
retreives the current player location and returns it in the global variables sx,sy;


unique_place($objid)   X-Ref
Insert an object on the map... used for a daily unique object.

param: unknown_type $objid

grid_link($x,$y)   X-Ref
Returns the link to go to a neirboor map locations

param: integer $x
param: integer $y
return: string

map_count($map,$type)   X-Ref
Returns the number of cells with a given type

param: array $map
param: integer $type
return: integer



Generated: Sun Mar 11 17:28:20 2007 Cross-referenced by PHPXref 0.7