====== hfzWriteTile2 ====== ===== Description ===== Write a map data tile to an open HF2/HFZ file. This function uses a smaller memory block (tile-sized) for loading the map data, as opposed to the complete memory block (map-sized) used in [[libhfz:functions:hfzWriteTile]]. ===== Function prototype ===== long hfzWriteTile2(hfzFile* fs, hfzHeader& fh, long TileX, long TileY, float* pTileData); ===== 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. | | pTileData | float* | A handle to the user-supplied tile array (see comments). | ===== Return value ===== LIBHFZ_STATUS_OK if the tile was written successfully, and otherwise an error code. Use [[libhfz:functions:hfzGetErrorStr]] to retrieve the error description. ===== Comments ===== ==== Tile order ==== Please refer to the [[:l3dt:formats:specs:hf2#map_data|HF2 file specification]] for the required tile order. ==== Regarding pTileData ==== Please refer to [[libhfz:functions:hfzReadTile2#regarding_pTileData|hfzReadTile2 comments]] for information regarding the correct initialisation and use of //pTileData//.