diff --git a/Jenkinsfile b/Jenkinsfile index 7e55eb0..c5ccb41 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { } environment { CI_OUTPUT_NAME = "RSEModel" - CI_VERSION = "2.1.0" + CI_VERSION = "2.1.1" CI_BUILD_NUMBER = "$BUILD_NUMBER" } stages { @@ -33,7 +33,7 @@ pipeline { checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Model'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Model.git']]]) sh 'git submodule update --init --recursive' dir("build") { - rtConanRun(clientId: "conan", command: "install .. --profile=windows --build=missing") + rtConanRun(clientId: "conan", command: "install .. -pr:b=default -pr:h=windows --build=missing") } cmakeBuild buildDir: 'build', cmakeArgs: '-DGNU_HOST=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_cross_toolchain.cmake', installation: 'latest', steps: [[args: 'all']] } diff --git a/RSPModelLib/include/RSPModel_datatypes.h b/RSPModelLib/include/RSPModel_datatypes.h index 5646f19..67d707b 100644 --- a/RSPModelLib/include/RSPModel_datatypes.h +++ b/RSPModelLib/include/RSPModel_datatypes.h @@ -79,7 +79,7 @@ typedef struct hob_face { unsigned char b2; unsigned char b3; unsigned char bsize; - unsigned short material_index; + unsigned short mt_index; // Material/texture index, if texture it's correspond to texture_index, otherwise it's mat_'X' unsigned short indices[4]; T_RGBA vertex_colors[4]; //TODO: convert in R:8_G:8_B:8_A:8 format? Caution with BE/LE conversion T_TEXCOORD tex_coords[4]; diff --git a/RSPModelLib/src/RSPModel.c b/RSPModelLib/src/RSPModel.c index 795d1c4..b3b4c83 100644 --- a/RSPModelLib/src/RSPModel.c +++ b/RSPModelLib/src/RSPModel.c @@ -65,7 +65,7 @@ void RSPModel_freeHOB( T_RSPMODEL_HOB* hobStruct ) { if (hobStruct->objects) { for ( i=0; iobj_count; i++ ) { if (hobStruct->objects[i].object_parts) { - for ( j=0; jobjects[i].face_group_count; j++ ) { + for ( j=0; jobjects[i].object_part_count; j++ ) { if (hobStruct->objects[i].object_parts[j].faces) free(hobStruct->objects[i].object_parts[j].faces); diff --git a/RSPModelLib/src/hob_parser.c b/RSPModelLib/src/hob_parser.c index f44579e..0fe2b2c 100644 --- a/RSPModelLib/src/hob_parser.c +++ b/RSPModelLib/src/hob_parser.c @@ -291,7 +291,7 @@ static unsigned short ExtractObjParts_faces(T_RSPMODEL_OBJ_PARTS* pObjPart, cons } // Get materials index - pObjPart->faces[i].material_index = ((T_HOBFILE_FACES_HEADER *)(pMemfile + pObjPart->face_block_offset + pObjPart->faces[i].mt_index = ((T_HOBFILE_FACES_HEADER *)(pMemfile + pObjPart->face_block_offset + sizeof(T_HOBFILE_FACEBLOCK) + sizeof(T_HOBFILE_FACES_HEADER) * i + facesExtraOffset))->materialIndex; // Get vertex indices @@ -320,7 +320,9 @@ static unsigned short ExtractObjParts_faces(T_RSPMODEL_OBJ_PARTS* pObjPart, cons printf("[DBG] > Face %d details: flags:0x%X b1:%d b2:%d b3%d bsize:%d\n", i, pObjPart->faces[i].flags, pObjPart->faces[i].b1, pObjPart->faces[i].b2, pObjPart->faces[i].b3, pObjPart->faces[i].bsize); printf("[DBG] - Type is Quad: %d\n", pObjPart->faces[i].flags_bits.fIsQuad); - printf("[DBG] - Material offset: 0x%X\n", pObjPart->faces[i].material_index); + printf("[DBG] - Have color: %d\n", pObjPart->faces[i].flags_bits.fHasColor); + printf("[DBG] - Have texture: %d\n", pObjPart->faces[i].flags_bits.fHasTexture); + printf("[DBG] - Material/texture index: %d\n", pObjPart->faces[i].mt_index); printf("[DBG] - Vertex indices: %d, %d, %d, %d\n", pObjPart->faces[i].indices[0], pObjPart->faces[i].indices[1], pObjPart->faces[i].indices[2], pObjPart->faces[i].indices[3]); printf("[DBG] - Vertex colors: 0x%X, 0x%X, 0x%X, 0x%X\n", pObjPart->faces[i].vertex_colors[0],