HOB file handler prototype Mesh building should be moved to RSPModel lib Tree rendering unicode chars fix Updated version detection HOB file handler Debug HOB handler Pointer probably deallocated, need to check it Fix HOB loader and disposer Using HOB instance instead of static methods Review DLL support for MSVC build Vertices values calculation fix Added export obj method to debug tool Missed levels name separation Cleaned model processing Multithreading branch reported to later
90 lines
2.4 KiB
C++
90 lines
2.4 KiB
C++
/**
|
|
* @file RDI.hpp
|
|
* @date 22/01/2023
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Rogue Data Interface library main entry file.
|
|
*
|
|
*/
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "RDI_Datatypes.h"
|
|
#include "FileHandler/HOB.h"
|
|
|
|
|
|
#ifndef RDI_HPP_
|
|
#define RDI_HPP_
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
# define RDI_ABI_EXPORT __declspec(dllexport)
|
|
# define RDI_ABI_IMPORT __declspec(dllimport)
|
|
#elif __GNUC__ >= 4
|
|
# define RDI_ABI_EXPORT __attribute__ ((visibility("default")))
|
|
# define RDI_ABI_IMPORT __attribute__ ((visibility("default")))
|
|
#else
|
|
# define RDI_ABI_EXPORT
|
|
# define RDI_ABI_IMPORT
|
|
#endif
|
|
|
|
#if defined(RDI_DLL)
|
|
# if defined(WIN32)
|
|
# if defined(RDI_DLLBUILD)
|
|
# define RDI_EXTERN RDI_ABI_EXPORT
|
|
# else
|
|
# define RDI_EXTERN RDI_ABI_IMPORT
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#ifndef RDI_EXTERN
|
|
# define RDI_EXTERN
|
|
#endif
|
|
|
|
|
|
namespace RDI {
|
|
|
|
/**
|
|
* @brief Get the current library version.
|
|
* @return String of the version.
|
|
*/
|
|
RDI_EXTERN const std::string RDI_getLibVersion( void ) noexcept;
|
|
|
|
/**
|
|
* @brief Allocate memory and create default structure to access datas.
|
|
* @details Try to open DATA.DAT file at location specified by roguePath.
|
|
* If file can be opened, it's mapped in memory and process files list.
|
|
* @param[in] roguePath Path to DATA.DAT and DATA.HDR location.
|
|
*/
|
|
RDI_EXTERN void RDI_Init( std::string roguePath );
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Erso specific methods */
|
|
RDI_EXTERN const unsigned char RDI_getSectionCount( void );
|
|
RDI_EXTERN const std::string RDI_getSectionName( unsigned char id );
|
|
RDI_EXTERN const unsigned int RDI_getSectionOffset( unsigned char id );
|
|
|
|
RDI_EXTERN const unsigned int RDI_getDirectoryElementCount( std::string path );
|
|
RDI_EXTERN const std::vector<std::string> RDI_getDirectoryElements( std::string path );
|
|
RDI_EXTERN const bool RDI_isElementDirectory( std::string path );
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Krennic specific methods */
|
|
RDI_EXTERN const std::vector<std::string> RDI_getLevelsName( void );
|
|
RDI_EXTERN const std::vector<std::string> RDI_getModelsName( void );
|
|
RDI_EXTERN const std::vector<std::string> RDI_getTexturesName( void );
|
|
RDI_EXTERN const std::vector<std::string> RDI_getMusicsName( void );
|
|
|
|
RDI_EXTERN HOB* RDI_getModel( std::string modelName );
|
|
|
|
|
|
/**
|
|
* @brief Clean up global resources.
|
|
*/
|
|
RDI_EXTERN void RDI_CleanUp( void );
|
|
}
|
|
|
|
#endif /* RDI_HPP_ */
|