JackCarterSmith be31c972c4
All checks were successful
JCS-Prod/RSE-Model/pipeline/pr-master This commit looks good
Deconstruct mega-parser in sub parts
2022-08-18 21:47:54 +02:00

59 lines
1.3 KiB
C

/**
* @file RSPModel.c
* @date 11/08/2022
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief HOB model parser and export to Waveform OBJ format.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "options.h"
#include "RSPModel_errordefs.h"
#include "hob_parser.h"
#include "RSPModel.h"
char* RSPModel_getVersion( void ) {
return PRG_VERSION;
}
unsigned short RSPModel_processHOBFile( T_RSPMODEL_HOB* hob, const char* const filePath ) {
if ( hob == NULL || filePath == NULL ) return RSPLIB_ERROR_ARGS_NULL;
T_PROG_OPTIONS canard;
canard.god_mode = 1;
canard.debug_mode = 1;
canard.verbose_mode = 1;
RSP_ModelLib_ParseHOBFile(filePath, hob, &canard);
return RSPLIB_SUCCESS;
}
unsigned short RSPModel_processHOBFileMemory( T_RSPMODEL_HOB* hob, const void* const memFilePtr, const long memFileSize ) {
if ( hob == NULL || memFilePtr == NULL ) return RSPLIB_ERROR_ARGS_NULL;
return RSPLIB_SUCCESS;
}
unsigned short RSPModel_objectToGL( const T_RSPMODEL_OBJECT* objStruct, void* glObj ) {
#ifndef GL_SUPPORT
return RSPLIB_ERROR_MOD_DISABLED;
#endif
return RSPLIB_SUCCESS;
}
unsigned short RSPModel_objectToD3D( const T_RSPMODEL_OBJECT* objStruct, void* D3DObj ) {
#ifndef D3D_SUPPORT
return RSPLIB_ERROR_MOD_DISABLED;
#endif
return RSPLIB_SUCCESS;
}