RSEModel tool clean up

This commit is contained in:
JackCarterSmith 2022-08-19 18:19:18 +02:00
parent be65b73bb6
commit aa2d52768a
Signed by: JackCarterSmith
GPG Key ID: 832E52F4E23F8F24
2 changed files with 8 additions and 9 deletions

View File

@ -31,7 +31,7 @@ option(RSPMODEL_SHARED "Build shared lib" ON)
# Push compile infos to source # Push compile infos to source
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/RSPModelLib/src/config.h @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/RSPModelLib/src/config.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/RSEModel/src/config.h @ONLY) #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/RSEModel/src/config.h @ONLY)
# The project is divided in two parts: # The project is divided in two parts:

View File

@ -1,6 +1,6 @@
/** /**
* @file Model-Extractor.c * @file RSEModel.c
* @date 25/07/2022 * @date 19/08/2022
* @author JackCarterSmith * @author JackCarterSmith
* @copyright GPL-v3.0 * @copyright GPL-v3.0
* @brief HOB model parser and export to Waveform OBJ format. * @brief HOB model parser and export to Waveform OBJ format.
@ -16,7 +16,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#include "config.h"
#include "options.h" #include "options.h"
#include <RSPModel.h> #include <RSPModel.h>
#include <RSPModel_errordefs.h> #include <RSPModel_errordefs.h>
@ -43,7 +42,7 @@ int main(int argc, char *argv[]) {
unsigned char p; unsigned char p;
// Hello world! // Hello world!
printf("\n*** RogueSquadron Extractor (RSE) - MODEL module - v%s ***\n", RSPModel_getVersion()); printf("\n*** RogueSquadron Extractor (RSE) - MODEL module - RSPModelLib v%s ***\n", RSPModel_getVersion());
// Check for arguments // Check for arguments
if (argc < 2) { if (argc < 2) {
@ -146,9 +145,9 @@ static unsigned char checkInputArgs(T_PROG_OPTIONS* opt_ptr, int p_arg_nbr, char
static void createSubDir(char *dirName) { static void createSubDir(char *dirName) {
if (dirName == NULL) return; if (dirName == NULL) return;
char _dir[260]; //TODO: Change directory management char _dir[1024];
strcpy(_dir, dirName);
strcat(_dir, "-out"); sprintf_s(_dir, 1024, "%s-out", dirName);
#ifdef _WIN32 #ifdef _WIN32
CreateDirectory(_dir, NULL); CreateDirectory(_dir, NULL);
@ -181,6 +180,6 @@ static void dispHelp() {
printf(" -no-subdir Export models inside current folder\n"); printf(" -no-subdir Export models inside current folder\n");
printf(" -mtl Export materials datas with model\n"); printf(" -mtl Export materials datas with model\n");
printf("\n"); printf("\n");
printf("Usage: RSE-Model_%s [options] <hob files...>\n", PRG_VERSION); printf("Usage: RSEModel [options] <hob files...>\n");
printf("\n"); printf("\n");
} }