52 lines
1.8 KiB
C
52 lines
1.8 KiB
C
/**
|
|
* @file hmp_parser.h
|
|
* @date 22/08/2022
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Process HMP file structure and extract its datas.
|
|
*
|
|
*/
|
|
|
|
#include "RSPTerrain_datatypes.h"
|
|
|
|
|
|
#ifndef RSPTERRAINLIB_HMP_PARSER_H_
|
|
#define RSPTERRAINLIB_HMP_PARSER_H_
|
|
|
|
/**
|
|
* @brief Process HMP file stored in memory.
|
|
* @details Parser will directly extract tiles count and information stored in
|
|
* HMP file and store them in T_RSPTERRAIN_HMP structure.
|
|
* @note Unmanaged mode
|
|
*
|
|
* @param[in] pMemFile Pointer to an in-memory HOB file location.
|
|
* @param[out] hmpStruct Allocated empty T_RSPTERRAIN_HMP structure instance to
|
|
* be filled with HMP datas.
|
|
* @param[in] pParams Parser options. See RSPTERRAIN_PARAMETERS.
|
|
*
|
|
* @return Processing error code, RSPLIB_SUCCESS if no error.
|
|
*/
|
|
unsigned short RSP_TerrainLib_ParseHMPMemFile(const MEMFILE pMemFile,
|
|
T_RSPTERRAIN_HMP* hmpStruct, const RSPTERRAIN_PARAMETERS* pParams);
|
|
|
|
/**
|
|
* @brief Process HMP file in file system.
|
|
* @details HMP file is dumped in memory before parsing in order to enhance
|
|
* performance during parser operation and in optic to protect data
|
|
* stored in the original file (read-only).
|
|
* Parser will extract tiles count and information stored in HMP file
|
|
* and store them in T_RSPTERRAIN_HMP structure.
|
|
* @note Managed mode
|
|
*
|
|
* @param[in] fileName String value of file name/path.
|
|
* @param[out] hmpStruct Allocated empty T_RSPTERRAIN_HMP structure instance to
|
|
* be filled with HMP datas.
|
|
* @param[in] pParams Parser options. See RSPTERRAIN_PARAMETERS.
|
|
*
|
|
* @return Processing error code, RSPLIB_SUCCESS if no error.
|
|
*/
|
|
unsigned short RSP_TerrainLib_ParseHMPFile(const char* fileName,
|
|
T_RSPTERRAIN_HMP* hmpStruct, const RSPTERRAIN_PARAMETERS* pParams);
|
|
|
|
#endif /* RSPTERRAINLIB_HMP_PARSER_H_ */
|