Fix HOB deallocation
Removed logging in library by default
This commit is contained in:
parent
7ba1037230
commit
a6ba8fe15a
@ -71,8 +71,6 @@ void RSPModel_freeHOB( T_RSPMODEL_HOB* hobStruct ) {
|
||||
}
|
||||
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
|
||||
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) {
|
||||
printf("[INFO] Can't process empty file!\n");
|
||||
if (pParams->verbose_mode) printf("[INFO] Can't process empty file!\n");
|
||||
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)
|
||||
+ sizeof(T_HOBFILE_OBJ_DESCRIPTOR) * i))->object_name, 16);
|
||||
|
||||
if (pParams->verbose_mode) printf("\n");
|
||||
printf("[INFO] - Process %s object...\n", pHobStruct->objects[i].name);
|
||||
if (pParams->verbose_mode) printf("\n[INFO] - Process %s object...\n", pHobStruct->objects[i].name);
|
||||
|
||||
|
||||
// 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.
|
||||
* 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))
|
||||
printf("[DBG] > Object parts / facegroup count are different!\n");
|
||||
if (pHobStruct->objects[i].object_part_count != pHobStruct->objects[i].face_group_count)
|
||||
if (pParams->verbose_mode) printf("[DBG] > Object parts / facegroup count are different!\n");
|
||||
|
||||
// Get facegroup datas
|
||||
ExtractObjParts(&pHobStruct->objects[i], pMemfile, pParams);
|
||||
|
Loading…
x
Reference in New Issue
Block a user