Find new transform elements
This commit is contained in:
parent
023c63617d
commit
88c90b39bb
@ -20,7 +20,7 @@ if(DEFINED ENV{CI}) # Jenkins CI integration mode
|
||||
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MODEL_NAME $ENV{CI_OUTPUT_NAME})
|
||||
else() # Standalone project mode, should not be used for release.
|
||||
project(rse-model VERSION 2.3.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
project(rse-model VERSION 2.4.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MODEL_NAME RSEModel)
|
||||
endif()
|
||||
set(RSP_MODEL_LIB_NAME RSPModel${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR})
|
||||
|
@ -90,6 +90,9 @@ typedef struct rspmodel_obj_parts {
|
||||
unsigned int vertex_block_offset;
|
||||
|
||||
unsigned int id;
|
||||
T_RSPMODEL_VECTOR3 vec1r;
|
||||
T_RSPMODEL_VECTOR3 vec2s;
|
||||
T_RSPMODEL_VECTOR3 vec3t;
|
||||
T_RSPMODEL_VECTOR3 transform;
|
||||
|
||||
unsigned int face_count;
|
||||
|
@ -350,17 +350,45 @@ static unsigned short ParseObjectMeshDef(T_RSPMODEL_OBJ_PARTS* pObjPartStruct, c
|
||||
|
||||
// Get meshdef0 datas
|
||||
//pObjPartStruct->id = hobObjMeshDef0->object_id; // Get object part ID, used by animation? bones?
|
||||
pObjPartStruct->transform.x = hobObjMeshDef0->transform_x; // Get the transform matrix, used by complex objects like at-st and at-at (at this time)
|
||||
pObjPartStruct->vec1r.x = hobObjMeshDef0->vec_1_x; // used by complex objects like at-st and at-at (at this time)
|
||||
pObjPartStruct->vec1r.y = hobObjMeshDef0->vec_1_y;
|
||||
pObjPartStruct->vec1r.z = hobObjMeshDef0->vec_1_z;
|
||||
pObjPartStruct->vec2s.x = hobObjMeshDef0->vec_2_x; // used by complex objects like at-st and at-at (at this time)
|
||||
pObjPartStruct->vec2s.y = hobObjMeshDef0->vec_2_y;
|
||||
pObjPartStruct->vec2s.z = hobObjMeshDef0->vec_2_z;
|
||||
pObjPartStruct->vec3t.x = hobObjMeshDef0->vec_3_x; // used by complex objects like at-st and at-at (at this time)
|
||||
pObjPartStruct->vec3t.y = hobObjMeshDef0->vec_3_y;
|
||||
pObjPartStruct->vec3t.z = hobObjMeshDef0->vec_3_z;
|
||||
pObjPartStruct->transform.x = hobObjMeshDef0->transform_x; // used by complex objects like at-st and at-at (at this time)
|
||||
pObjPartStruct->transform.y = hobObjMeshDef0->transform_y;
|
||||
pObjPartStruct->transform.z = hobObjMeshDef0->transform_z;
|
||||
if (pParams->verbose_mode) {
|
||||
printf("[DBG] > Facegroup/object transform matrix: [%.8f %.8f %.8f]\n",
|
||||
printf("[DBG] > Parent meshdef0 offset: 0x%X\n", hobObjMeshDef0->parent_meshdef0_offset);
|
||||
printf("[DBG] > Children meshdef0 offset: 0x%X\n", hobObjMeshDef0->children_meshdef0_offset);
|
||||
printf("[DBG] > Have rotation? vector: %d\n", hobObjMeshDef0->vecsFlags & 0x1);
|
||||
printf("[DBG] > Have scaling? vector: %d\n", hobObjMeshDef0->vecsFlags & 0x2);
|
||||
printf("[DBG] > Have translation? vector: %d\n", hobObjMeshDef0->vecsFlags & 0x4);
|
||||
printf("[DBG] > Have offset? vector: %d\n", hobObjMeshDef0->vecsFlags & 0x8);
|
||||
printf("[DBG] > Facegroup/object rotation? vector: [%.8f %.8f %.8f]\n",
|
||||
pObjPartStruct->vec1r.x,
|
||||
pObjPartStruct->vec1r.y,
|
||||
pObjPartStruct->vec1r.z
|
||||
);
|
||||
printf("[DBG] > Facegroup/object scaling? vector: [%.8f %.8f %.8f]\n",
|
||||
pObjPartStruct->vec2s.x,
|
||||
pObjPartStruct->vec2s.y,
|
||||
pObjPartStruct->vec2s.z
|
||||
);
|
||||
printf("[DBG] > Facegroup/object translation? vector: [%.8f %.8f %.8f]\n",
|
||||
pObjPartStruct->vec3t.x,
|
||||
pObjPartStruct->vec3t.y,
|
||||
pObjPartStruct->vec3t.z
|
||||
);
|
||||
printf("[DBG] > Facegroup/object offset? vector: [%.8f %.8f %.8f]\n",
|
||||
pObjPartStruct->transform.x,
|
||||
pObjPartStruct->transform.y,
|
||||
pObjPartStruct->transform.z
|
||||
);
|
||||
printf("[DBG] > Prev meshdef0 offset: 0x%X\n", hobObjMeshDef0->prev_meshdef0_offset);
|
||||
printf("[DBG] > Next meshdef0 offset: 0x%X\n", hobObjMeshDef0->next_meshdef0_offset);
|
||||
}
|
||||
if (pParams->god_mode) {
|
||||
printf("[DBG] > meshdef0 offset1: 0x%X\n", hobObjMeshDef0->offset1);
|
||||
@ -370,20 +398,6 @@ static unsigned short ParseObjectMeshDef(T_RSPMODEL_OBJ_PARTS* pObjPartStruct, c
|
||||
printf("[DBG] > meshdef0 unknown4: %.8f\n", hobObjMeshDef0->unknown4);
|
||||
printf("[DBG] > meshdef0 unknown5: %.8f\n", hobObjMeshDef0->unknown5);
|
||||
|
||||
printf("[DBG] > meshdef0 unknown6: 0x%X\n", hobObjMeshDef0->unknown6);
|
||||
|
||||
printf("[DBG] > meshdef0 unknown7: %.8f\n", hobObjMeshDef0->unknown7);
|
||||
printf("[DBG] > meshdef0 unknown8: %.8f\n", hobObjMeshDef0->unknown8);
|
||||
printf("[DBG] > meshdef0 unknown9: %.8f\n", hobObjMeshDef0->unknown9);
|
||||
|
||||
printf("[DBG] > meshdef0 unknown10: %.8f\n", hobObjMeshDef0->unknown10);
|
||||
printf("[DBG] > meshdef0 unknown11: %.8f\n", hobObjMeshDef0->unknown11);
|
||||
printf("[DBG] > meshdef0 unknown12: %.8f\n", hobObjMeshDef0->unknown12);
|
||||
|
||||
printf("[DBG] > meshdef0 unknown13: %.8f\n", hobObjMeshDef0->unknown13);
|
||||
printf("[DBG] > meshdef0 unknown14: %.8f\n", hobObjMeshDef0->unknown14);
|
||||
printf("[DBG] > meshdef0 unknown15: %.8f\n", hobObjMeshDef0->unknown15);
|
||||
|
||||
printf("[DBG] > meshdef0 unknown16: %.8f\n", hobObjMeshDef0->unknown16);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file hob_struct.h
|
||||
* @date 21/02/2023
|
||||
* @date 18/09/2023
|
||||
* @author JackCarterSmith
|
||||
* @copyright GPL-v3.0
|
||||
* @brief HOB file mapping definition.
|
||||
@ -69,18 +69,18 @@ typedef struct PACK hobfile_obj_header {
|
||||
unsigned int effects_offset; // Empty in gun_turret and no datas after, xwing have 0x5006, present in koelsch. worddevastator can have more answers...
|
||||
unsigned int properties_offset; // Offset to different string (a_b/zf/zt/zb/etc.) Animation datas ? Empty with 6x float in train_hob, a_b object is canon beams in gun_turret
|
||||
|
||||
float unknown4; // Probably scale: 1.0F/1.125F
|
||||
float unknown4; // 1.0F/1.125F - Look forward angle correction?
|
||||
|
||||
unsigned int reserved4; // 12B of zeros
|
||||
unsigned int reserved5;
|
||||
unsigned int reserved6;
|
||||
|
||||
float unknown5; //Scale? ~20.0F
|
||||
float unknown6; //Scale? ~77-418.0F
|
||||
float unknown5; // Something related to culling camera frustum (when reduced value, the gun_turret didn't render before getting out of camera view)
|
||||
float unknown6; // Something related to collision detection (bigger float >100.0f)
|
||||
|
||||
float reserved7; //Translation matrix? Center of object?
|
||||
float reserved8;
|
||||
float reserved9;
|
||||
float reserved7; // Something related to collision detection Translation matrix? Center of object?
|
||||
float reserved8; // Something related to collision detection Translation matrix? Center of object?
|
||||
float reserved9; // Something related to collision detection Translation matrix? Center of object?
|
||||
|
||||
unsigned int footer_offset; //To redefine, seem to be a copy of following bounding box? Maybe there are 2 box: render and collision?
|
||||
|
||||
@ -142,48 +142,48 @@ typedef struct PACK hobfile_effects {
|
||||
*/
|
||||
|
||||
typedef struct PACK hobfile_meshdef0 {
|
||||
unsigned int offset1;
|
||||
unsigned int offset2;
|
||||
unsigned int prev_meshdef0_offset;
|
||||
unsigned int next_meshdef0_offset;
|
||||
unsigned int offset1; // Brothers meshdef?
|
||||
unsigned int offset2; // Brothers meshdef?
|
||||
unsigned int parent_meshdef0_offset;
|
||||
unsigned int children_meshdef0_offset;
|
||||
unsigned int meshdef1_offset_plus_4;
|
||||
|
||||
unsigned int reserved1; // 8B of zeros
|
||||
unsigned int reserved2;
|
||||
|
||||
float unknown3;
|
||||
float unknown3; // Always 1.0f?
|
||||
|
||||
unsigned int reserved3; // 12B of zeros
|
||||
unsigned int reserved4;
|
||||
unsigned int reserved5;
|
||||
|
||||
float unknown4;
|
||||
float unknown4; // Always 1.0f?
|
||||
|
||||
unsigned int reserved6; // 12B of zeros
|
||||
unsigned int reserved7;
|
||||
unsigned int reserved8;
|
||||
|
||||
float unknown5;
|
||||
float unknown5; // Always 1.0f?
|
||||
|
||||
unsigned int reserved9; // 12B of zeros
|
||||
unsigned int reserved10;
|
||||
unsigned int reserved11;
|
||||
|
||||
unsigned int unknown6; // Not fg_object_ID
|
||||
unsigned int vecsFlags; // Enabled geo-modifiers (bit0=offset-vector #1; bit1=offset-vector #2; bit2=offset-vector #3; bit3=transform;)
|
||||
|
||||
float unknown7; // Can be a vector???
|
||||
float unknown8;
|
||||
float unknown9;
|
||||
float vec_1_x; // offset-vector #1 - Rotation?
|
||||
float vec_1_y;
|
||||
float vec_1_z;
|
||||
|
||||
float unknown10; // Can be a vector???
|
||||
float unknown11;
|
||||
float unknown12;
|
||||
float vec_2_x; // offset-vector #2 - Scale?
|
||||
float vec_2_y;
|
||||
float vec_2_z;
|
||||
|
||||
float unknown13; // Can be a matrix???
|
||||
float unknown14;
|
||||
float unknown15;
|
||||
float vec_3_x; // offset-vector #3 - Translation?
|
||||
float vec_3_y;
|
||||
float vec_3_z;
|
||||
|
||||
float unknown16;
|
||||
float unknown16; // Always 1.0f?
|
||||
|
||||
float transform_x;
|
||||
float transform_y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user