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: 2017/08/31 05:24 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
{"cc_re__cc_re__cc_by_sa_3_0": ["on=\"/docs/doku.php\"><div class=\"no\"><input type=\"hidden\" name=\"do\" value=\"login\" /><input type=\"hidden\" name=\"sectok\" value=\"0fc858188fc032114972eb8bd1bb296f\" /><input type=\"hidden\" name=\"id\" value=\"libhfz:functions:hfzreadtile\" /><input type=\"submit\" value=\"Login\" class=\"button\" title=\"Login\" /></div></form>&nbsp;\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n\n  </div>\n\n  <div class=\"license\">Except where otherwise noted, content on this wiki is licensed under the following license:<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\" class=\"urlextern\">CC Attribution-Share Alike 3.0 Unported</a></div>\n</div>\n\n<div class=\"footerinc\">\n\n  <a  href=\"/docs/feed.php\" title=\"Recent changes RSS feed\"><img src=\"/docs/lib/tpl/l3dt/images/button-rss.png\" width=\"80\" height=\"15\" alt=\"Recent changes RSS feed\" /></a>\n\n        <a  href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\" title=\"CC Attribution-Share Alike 3.0 Unported\"><img src=\"/docs/lib/images/license/button/cc-by-sa.png\" width=\"80\" height=\"15\" alt=\"\" /></a>\n  \n  <a  href=\"http://w", "er\"></div>\n    </div>\n\n  </div>\n\n  <div class=\"license\">Except where otherwise noted, content on this wiki is licensed under the following license:<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\" class=\"urlextern\">CC Attribution-Share Alike 3.0 Unported</a></div>\n</div>\n\n<div class=\"footerinc\">\n\n  <a  href=\"/docs/feed.php\" title=\"Recent changes RSS feed\"><img src=\"/docs/lib/tpl/l3dt/images/button-rss.png\" width=\"80\" height=\"15\" alt=\"Recent changes RSS feed\" /></a>\n\n        <a  href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\" title=\"CC Attribution-Share Alike 3.0 Unported\"><img src=\"/docs/lib/images/license/button/cc-by-sa.png\" width=\"80\" height=\"15\" alt=\"\" /></a>\n  \n  <a  href=\"http://www.dokuwiki.org/donate\" title=\"Donate\"><img src=\"/docs/lib/tpl/l3dt/images/button-donate.gif\" alt=\"Donate\" width=\"80\" height=\"15\" /></a>\n\n  <a  href=\"http://www.php.net\" title=\"Powered by PHP\"><img src=\"/docs/lib/tpl/l3dt/images/button-php.gif\" width=\"80\" height=\"15\" alt=\"Powered by PHP\" /></a>\n\n  <a  href=\"http://validator.w3.org/check/referer\" title=\"Valid XHTML 1.0\"><img src=\"/d"]}