Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIGrid Class Reference
Inheritance diagram for MOAIGrid:
MOAIGridSpace

List of all members.

Function List

  clearTileFlags
  fill
  getTile
  getTileFlags
  setRow
  setTile
  setTileFlags
  streamTilesIn
  streamTilesOut
  toggleTileFlags

Function Documentation

Clears bits specified in mask.


function clearTileFlags ( MOAIGrid self, number xTile, number yTile, number mask )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
mask ( number )
Returns:
nil

Set all tiles to a single value.


function fill ( MOAIGrid self, number value )
Parameters:
self ( MOAIGrid )
value ( number )
Returns:
nil

Returns the value of a given tile.


function getTile ( MOAIGrid self, number xTile, number yTile )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
Returns:
tile ( number )

Returns the masked value of a given tile.


function getTileFlags ( MOAIGrid self, number xTile, number yTile, number mask )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
mask ( number )
Returns:
tile ( number )

Initializes a grid row given a variable argument list of values.


function setRow ( MOAIGrid self, number row, ... )
Parameters:
self ( MOAIGrid )
row ( number )
( ... ) values
Returns:
nil

Sets the value of a given tile.


function setTile ( MOAIGrid self, number xTile, number yTile, number value )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
value ( number )
Returns:
nil

Sets a tile's flags given a mask.


function setTileFlags ( MOAIGrid self, number xTile, number yTile, number mask )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
mask ( number )
Returns:
nil

Reads tiles directly from a stream. Call this only after initializing the grid. Only the content of the tiles buffer is read.


function streamTilesIn ( MOAIGrid self, MOAIStream stream )
Parameters:
self ( MOAIGrid )
stream ( MOAIStream )
Returns:
bytesRead ( number )

Writes tiles directly to a stream. Only the content of the tiles buffer is written.


function streamTilesOut ( MOAIGrid self, MOAIStream stream )
Parameters:
self ( MOAIGrid )
stream ( MOAIStream )
Returns:
bytesWritten ( number )

Toggles a tile's flags given a mask.


function toggleTileFlags ( MOAIGrid self, number xTile, number yTile, number mask )
Parameters:
self ( MOAIGrid )
xTile ( number )
yTile ( number )
mask ( number )
Returns:
nil