From aa2d52768ad526310d33423ca49880729b20e75f Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Fri, 19 Aug 2022 18:19:18 +0200 Subject: [PATCH] RSEModel tool clean up --- CMakeLists.txt | 2 +- RSEModel/src/{Model-Extractor.c => RSEModel.c} | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) rename RSEModel/src/{Model-Extractor.c => RSEModel.c} (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7429aab..01f939f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ option(RSPMODEL_SHARED "Build shared lib" ON) # 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}/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: diff --git a/RSEModel/src/Model-Extractor.c b/RSEModel/src/RSEModel.c similarity index 93% rename from RSEModel/src/Model-Extractor.c rename to RSEModel/src/RSEModel.c index f8ae431..d5d5eb7 100644 --- a/RSEModel/src/Model-Extractor.c +++ b/RSEModel/src/RSEModel.c @@ -1,6 +1,6 @@ /** - * @file Model-Extractor.c - * @date 25/07/2022 + * @file RSEModel.c + * @date 19/08/2022 * @author JackCarterSmith * @copyright GPL-v3.0 * @brief HOB model parser and export to Waveform OBJ format. @@ -16,7 +16,6 @@ #include #include #endif -#include "config.h" #include "options.h" #include #include @@ -43,7 +42,7 @@ int main(int argc, char *argv[]) { unsigned char p; // 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 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) { if (dirName == NULL) return; - char _dir[260]; //TODO: Change directory management - strcpy(_dir, dirName); - strcat(_dir, "-out"); + char _dir[1024]; + + sprintf_s(_dir, 1024, "%s-out", dirName); #ifdef _WIN32 CreateDirectory(_dir, NULL); @@ -181,6 +180,6 @@ static void dispHelp() { printf(" -no-subdir Export models inside current folder\n"); printf(" -mtl Export materials datas with model\n"); printf("\n"); - printf("Usage: RSE-Model_%s [options] \n", PRG_VERSION); + printf("Usage: RSEModel [options] \n"); printf("\n"); }