Fix HOB deallocation and removed logging from Lib #25
@ -71,8 +71,6 @@ void RSPModel_freeHOB( T_RSPMODEL_HOB* hobStruct ) {
|
|||||||
}
|
}
|
||||||
free(hobStruct->objects);
|
free(hobStruct->objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(hobStruct);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,9 +108,9 @@ static unsigned short ExtractObjects(T_RSPMODEL_HOB* pHobStruct, const MEMFILE p
|
|||||||
|
|
||||||
// Retrieve object count from the header
|
// Retrieve object count from the header
|
||||||
pHobStruct->obj_count = RSP_ModelLib_getObjectsCount(pMemfile);
|
pHobStruct->obj_count = RSP_ModelLib_getObjectsCount(pMemfile);
|
||||||
printf("[INFO] - Object(s) quantity: %d\n", pHobStruct->obj_count);
|
if (pParams->verbose_mode) printf("[INFO] - Object(s) quantity: %d\n", pHobStruct->obj_count);
|
||||||
if (pHobStruct->obj_count <= 0) {
|
if (pHobStruct->obj_count <= 0) {
|
||||||
printf("[INFO] Can't process empty file!\n");
|
if (pParams->verbose_mode) printf("[INFO] Can't process empty file!\n");
|
||||||
return RSPLIB_ERROR_GENERIC;
|
return RSPLIB_ERROR_GENERIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,8 +125,7 @@ static unsigned short ExtractObjects(T_RSPMODEL_HOB* pHobStruct, const MEMFILE p
|
|||||||
memcpy(pHobStruct->objects[i].name, ((T_HOBFILE_OBJ_DESCRIPTOR *)(pMemfile + sizeof(T_HOBFILE_HEADER)
|
memcpy(pHobStruct->objects[i].name, ((T_HOBFILE_OBJ_DESCRIPTOR *)(pMemfile + sizeof(T_HOBFILE_HEADER)
|
||||||
+ sizeof(T_HOBFILE_OBJ_DESCRIPTOR) * i))->object_name, 16);
|
+ sizeof(T_HOBFILE_OBJ_DESCRIPTOR) * i))->object_name, 16);
|
||||||
|
|
||||||
if (pParams->verbose_mode) printf("\n");
|
if (pParams->verbose_mode) printf("\n[INFO] - Process %s object...\n", pHobStruct->objects[i].name);
|
||||||
printf("[INFO] - Process %s object...\n", pHobStruct->objects[i].name);
|
|
||||||
|
|
||||||
|
|
||||||
// Get offsets
|
// Get offsets
|
||||||
@ -159,8 +158,8 @@ static unsigned short ExtractObjects(T_RSPMODEL_HOB* pHobStruct, const MEMFILE p
|
|||||||
* Seem "object" are independant structure like xwing, turret, etc.
|
* Seem "object" are independant structure like xwing, turret, etc.
|
||||||
* Facegroup is more like part of previous object, like wing-left, turret-barrel, etc.
|
* Facegroup is more like part of previous object, like wing-left, turret-barrel, etc.
|
||||||
*/
|
*/
|
||||||
if (pHobStruct->objects[i].object_part_count != pHobStruct->objects[i].face_group_count && (pParams->verbose_mode))
|
if (pHobStruct->objects[i].object_part_count != pHobStruct->objects[i].face_group_count)
|
||||||
printf("[DBG] > Object parts / facegroup count are different!\n");
|
if (pParams->verbose_mode) printf("[DBG] > Object parts / facegroup count are different!\n");
|
||||||
|
|
||||||
// Get facegroup datas
|
// Get facegroup datas
|
||||||
ExtractObjParts(&pHobStruct->objects[i], pMemfile, pParams);
|
ExtractObjParts(&pHobStruct->objects[i], pMemfile, pParams);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user