68 lines
2.3 KiB
C
68 lines
2.3 KiB
C
/**
|
|
* @file lib_interface.h
|
|
* @date 01/09/2022
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Interface functions to external RSP libraries.
|
|
*
|
|
*/
|
|
|
|
#include "options.h"
|
|
|
|
|
|
#ifndef RSEMODEL_LIB_INTERFACE_H_
|
|
#define RSEMODEL_LIB_INTERFACE_H_
|
|
|
|
#define RSPTEXTURE_VERSION "21"
|
|
#define RSPTEXTURE_LIBFILE "libRSPTexture" RSPTEXTURE_VERSION
|
|
#if defined(_WIN32)
|
|
#define RSPTEXTURE_OSLIBFILE RSPTEXTURE_LIBFILE ".dll"
|
|
#else
|
|
#define RSPTEXTURE_OSLIBFILE RSPTEXTURE_LIBFILE ".so"
|
|
#endif
|
|
|
|
#define RSPTEXTURE_FUNCNAME_GET_VERSION "RSPTexture_getVersion"
|
|
#define RSPTEXTURE_FUNCNAME_NEW_HMT "RSPTexture_createHMT"
|
|
#define RSPTEXTURE_FUNCNAME_PROC_HMT "RSPTexture_processHMTFile"
|
|
#define RSPTEXTURE_FUNCNAME_GET_MAT "RSPTexture_getMaterialFromID"
|
|
#define RSPTEXTURE_FUNCNAME_GET_NAME "RSPTexture_getMaterialName"
|
|
#define RSPTEXTURE_FUNCNAME_GET_OPACITY "RSPTexture_getMaterialOpacity"
|
|
#define RSPTEXTURE_FUNCNAME_GET_AMBIENT "RSPTexture_getMaterialAmbient"
|
|
#define RSPTEXTURE_FUNCNAME_FREE_HMT "RSPTexture_freeHMT"
|
|
|
|
/* External libraries functions signatures */
|
|
typedef char* (*__RSPTexture_getVersion)(void);
|
|
typedef void* (*__RSPTexture_createHMT)(void);
|
|
typedef unsigned short (*__RSPTexture_processHMTFile)(
|
|
void* hmtStruct,
|
|
const char* const filePath,
|
|
const unsigned char params
|
|
);
|
|
typedef void* (*__RSPTexture_getMaterialFromID)(
|
|
const void* hmtStruct,
|
|
const unsigned short mat_id
|
|
);
|
|
typedef char* (*__RSPTexture_getMaterialName)(const void* material);
|
|
typedef float (*__RSPTexture_getMaterialOpacity)(const void* material);
|
|
typedef float (*__RSPTexture_getMaterialAmbient)(const void* material);
|
|
typedef void (*__RSPTexture_freeHMT)(void* hmtStruct);
|
|
|
|
|
|
/* External libraries proxies functions */
|
|
extern __RSPTexture_getVersion RSPTexture_getVersion;
|
|
extern __RSPTexture_createHMT RSPTexture_createHMT;
|
|
extern __RSPTexture_processHMTFile RSPTexture_processHMTFile;
|
|
extern __RSPTexture_getMaterialFromID RSPTexture_getMaterialFromID;
|
|
extern __RSPTexture_getMaterialName RSPTexture_getMaterialName;
|
|
extern __RSPTexture_getMaterialOpacity RSPTexture_getMaterialOpacity;
|
|
extern __RSPTexture_getMaterialAmbient RSPTexture_getMaterialAmbient;
|
|
extern __RSPTexture_freeHMT RSPTexture_freeHMT;
|
|
|
|
|
|
/* Linker functions declarations */
|
|
void* linkTextureLib(T_PROG_OPTIONS* opt_ptr);
|
|
void unlinkTextureLib(void);
|
|
|
|
|
|
#endif /* RSEMODEL_LIB_INTERFACE_H_ */
|