Aw terrain next

From ActiveWiki
Revision as of 12:55, 26 October 2008 by Macavity (talk | contribs) (Added in, cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 3.3
SDKbuild 24


int aw_terrain_next (void)

Description

Returns the next node in an enumeration of all terrain nodes in a world.

Callback

AW_CALLBACK_TERRAIN_NEXT_RESULT

Notes

The primary purpose of this method is to enumerate all terrain nodes for generating a terrain dump in the world server administration tool. SDK applications that wish to query terrain for should use aw_terrain_query instead for most purposes.

The node data is returned via the event AW_EVENT_TERRAIN_DATA.

For version 4.1 and later: The application must set AW_TERRAIN_VERSION_NEEDED to the required version. Version 1 of the terrain (pre 4.1) represented heights in short integers (16 bits) and textures in bytes (8 bits). Version 2 of terrain data represents heights in integers (32 bits) and textures in short integerts (16 bits). Version 2 is the default for version 4.1 applications and is reset to a value of 2 each entering a world.

See the terrain section for more information on manipulating terrain from the SDK.

Arguments

None

Argument attributes

AW_TERRAIN_VERSION_NEEDED
AW_TERRAIN_PAGE_X (1)
AW_TERRAIN_PAGE_Z (1)
AW_TERRAIN_NODE_X (1)
AW_TERRAIN_NODE_Z (1)
AW_TERRAIN_NODE_SIZE (1)

(1) Holds the current state of the enumeration.

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_NO_CONNECTION
The connection to the world is down.

Returned attributes

AW_TERRAIN_COMPLETE

See also