DLL export patch
This commit is contained in:
parent
e2b5f4c841
commit
49fa1278ad
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file RSPTexture.h
|
||||
* @date 25/08/2022
|
||||
* @date 14/09/2022
|
||||
* @author JackCarterSmith
|
||||
* @copyright GPL-v3.0
|
||||
* @brief Rogue Squadron Parser texture library, used to decode HMT datas
|
||||
@ -54,6 +54,10 @@ extern "C" {
|
||||
*/
|
||||
RSPTEXTURE_EXTERN char* RSPTexture_getVersion( void );
|
||||
|
||||
/**
|
||||
* @brief Constructor for T_RSPTEXTURE_HMT struct
|
||||
* @return Pointer to a new T_RSPTEXTURE_HMT struct.
|
||||
*/
|
||||
RSPTEXTURE_EXTERN T_RSPTEXTURE_HMT* RSPTexture_createHMT( void );
|
||||
|
||||
/**
|
||||
@ -104,10 +108,24 @@ RSPTEXTURE_EXTERN T_RSPTEXTURE_MATERIAL* RSPTexture_getMaterialFromID(
|
||||
const T_RSPTEXTURE_HMT* pHmt, const unsigned short mat_id
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Retrieve material name of a T_RSPTEXTURE_MATERIAL structure.
|
||||
* @return '0' terminated name string (max: 16 chars).
|
||||
*/
|
||||
RSPTEXTURE_EXTERN char* RSPTexture_getMaterialName( const T_RSPTEXTURE_MATERIAL* mat );
|
||||
|
||||
/**
|
||||
* @brief Retrieve opacity value from T_RSPTEXTURE_MATERIAL structure.
|
||||
* @return Float opacity value.
|
||||
* @warning Experimental method.
|
||||
*/
|
||||
RSPTEXTURE_EXTERN float RSPTexture_getMaterialOpacity( const T_RSPTEXTURE_MATERIAL* mat );
|
||||
|
||||
/**
|
||||
* @brief Retrieve ambient light value from T_RSPTEXTURE_MATERIAL structure.
|
||||
* @return Float ambient light value.
|
||||
* @warning Experimental method.
|
||||
*/
|
||||
RSPTEXTURE_EXTERN float RSPTexture_getMaterialAmbient( const T_RSPTEXTURE_MATERIAL* mat );
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,16 @@
|
||||
/**
|
||||
* @file RSPTexture.c
|
||||
* @date 31/08/2022
|
||||
* @date 14/09/2022
|
||||
* @author JackCarterSmith
|
||||
* @copyright GPL-v3.0
|
||||
* @brief HMT textures datas parser and export to PNG format.
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(RSPTEXTURE_DLL)
|
||||
# define RSPTEXTURE_DLLBUILD
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -57,19 +61,19 @@ T_RSPTEXTURE_MATERIAL* RSPTexture_getMaterialFromID( const T_RSPTEXTURE_HMT* pHm
|
||||
return &(pHmt->materials[mat_id]);
|
||||
}
|
||||
|
||||
char* RSPTexture_getMaterialName( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
inline char* RSPTexture_getMaterialName( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
if ( mat == NULL ) return NULL;
|
||||
|
||||
return (char*)mat->name;
|
||||
}
|
||||
|
||||
float RSPTexture_getMaterialOpacity( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
inline float RSPTexture_getMaterialOpacity( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
if ( mat == NULL ) return 1.0;
|
||||
|
||||
return mat->opacity;
|
||||
}
|
||||
|
||||
float RSPTexture_getMaterialAmbient( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
inline float RSPTexture_getMaterialAmbient( const T_RSPTEXTURE_MATERIAL* mat ) {
|
||||
if ( mat == NULL ) return 1.0;
|
||||
|
||||
return mat->ambient;
|
||||
|
Loading…
x
Reference in New Issue
Block a user