SYNOPSIS
|
DESCRIPTION
The
MAP interface implements a two-dimensional map of fixed-size tiles, which are
stacks of elements
Element types include:
Graphical elements define two displacements in pixels of the image from the tile's origin, the centering offset and the motion offset. The centering offset is typically assigned by a level designer, and the motion offset is for animation purposes. If the map is drawn scaled, the centering offset is scaled to the tile size, but the motion offset is not. Graphical elements provide the renderer with a list of graphical transformations that should be applied before the tile is drawn (the resulting tile is cached). A per-element layer attribute also defines the attributed layer. |
INHERITANCE HIERARCHY
AG_Object(3)-> MAP. |
INITIALIZATION
NODE INITIALIZATION
MAP_NodeInit() initializes the node structure. MAP_NodeDestroy() frees all resources allocated by node. MAP_NodeLoad() loads the contents of node (presumed initialized and empty), from data source ds. MAP_NodeSave() saves the contents of node to ds. Both functions are called implicitely by the load() and save() operations of MAP. |
MAP ITEMS
MAP_ItemInit() initializes the mi structure. MAP_ItemDestroy() frees all resources allocated for mi. |
NODE MANIPULATIONS
MAP_MoveItem() moves item miSrc from nodeSrc (of mapSrc) over to nodeDst (of mapDst). MAP_CopyItem() inserts a copy of miSrc on top of nodeDst. The copy is associated with layerDst (or -1 = the source layer). MAP_DelItem() deletes item mi from node. MAP_TileNew() creates a reference to the RG_Tile(3) element identified by tileID in the given RG_Tileset(3). MAP_LinkNew() Creates a link to the node x, y of targetMap. This is the pathname of the destination map (as returned by AG_ObjectCopyName()). |
ACTORS
MAP_AttachActor() attaches the given actor to the map. An object dependency is automatically created, and the map operation of the actor is invoked. This operation is usually responsible for inserting tiles onto the map. MAP_DetachActor() detaches the given actor from the map. Any pending timer events related to the actor are cancelled, tiles related to the actor are removed and the object dependency is removed. See MAP_Actor(3) for more information. |
SEE ALSO
AG_Object(3), MAP_Actor(3), MAP_View(3), SG_Intro(3) |
HISTORY
The MAP class first appeared in Agar 1.0. |