L3DT documentation
Large 3D terrain generator

hfzReadTile

Description

Read a map data tile from an open HF2/HFZ file.

Function prototype

long hfzReadTile(hfzFile* fs, hfzHeader& fh, long TileX, long TileY, float* pMapData);

Arguments

Name Type Description
fs hfzFile* A handle to an open hfzFile struct (see hfzOpen).
fh hfzHeader& The hfzHeader struct for the file.
TileX long The x-coordinate of the map tile.
TileY long The y-coordinate of the map tile.
pMapData float* A handle to the user-supplied map array (see comments).

Return value

LIBHFZ_STATUS_OK if the tile was read successfully, and otherwise an error code. Use hfzGetErrorStr to retrieve the error description.

Comments

Tile order

Please refer to the HF2 file specification for the required tile order.

Regarding pMapData

Please refer to hfzLoad comments for information regarding the correct initialisation of pMapData.

 
libhfz/functions/hfzreadtile.txt · Last modified: 2013/08/21 17:20 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki