More details on hob struct

This commit is contained in:
JackCarterSmith 2023-02-20 22:25:57 +01:00
parent 3307cfaab7
commit ec82ff4158
Signed by: JackCarterSmith
GPG Key ID: 832E52F4E23F8F24
2 changed files with 7 additions and 7 deletions

View File

@ -47,15 +47,15 @@ typedef struct rspmodel_vertex { short x,y,z,w; } T_RSPMODEL_VERTEX;
typedef struct rspmodel_texcoord { short u,v; } T_RSPMODEL_TEXCOORD; typedef struct rspmodel_texcoord { short u,v; } T_RSPMODEL_TEXCOORD;
typedef struct face_flags { typedef struct face_flags {
unsigned int fUnknown0:1; unsigned int fUnused0:1; //TODO: Parse all HOB to find anyone with this field different of 0
unsigned int fUnknown1:1; unsigned int fUnused1:1; //TODO: Parse all HOB to find anyone with this field different of 0
unsigned int fHasTexture:1; unsigned int fHasTexture:1;
unsigned int fIsQuad:1; unsigned int fIsQuad:1;
unsigned int fSeparateColorVertex:1; unsigned int fSeparateColorVertex:1;
unsigned int fHasColor:1; unsigned int fHasColor:1;
unsigned int fHasExtraBytesBeforeColor:1; unsigned int fHasExtraBytesBeforeColor:1;
unsigned int fIsTransparent:1; unsigned int fNoCulled:1; // Face with this flag always be rendered without culling, usefull to render "flat" object
unsigned int fUnknown8:1; unsigned int fUnknown8:1;
unsigned int fUnknown9:1; unsigned int fUnknown9:1;

View File

@ -205,11 +205,11 @@ typedef struct PACK hobfile_faceblock {
typedef struct PACK hobfile_faces_header { typedef struct PACK hobfile_faces_header {
unsigned int flags; unsigned int flags;
unsigned char b1; unsigned char b1; // Seem to alter texture mapping on face, 49 -> quad face, 48 -> tri face, 47 -> N/A
unsigned char b2; unsigned char b2; // 61 -> texture right rotation, 71 -> little red overlay, 81 -> bigger red overlay, x1 -> don't do anything
unsigned char b3; unsigned char b3; // Seem to alter rendering matrix or maybe vertices position relative to
unsigned char faceBlockIntSize; // Bytes size divided by 4, count as number of UInt32 type. unsigned char faceBlockIntSize; // Bytes size divided by 4, count as number of UInt32 type.
unsigned short headerSeparator; unsigned short headerSeparator; // If header it's uncommon, it's probably because you made a wrong parsing
unsigned short materialIndex; unsigned short materialIndex;
unsigned short vertexIndices[4]; // Relative to facegroup, the last value is equal to 0 when it's triangle shape. unsigned short vertexIndices[4]; // Relative to facegroup, the last value is equal to 0 when it's triangle shape.
} T_HOBFILE_FACES_HEADER; } T_HOBFILE_FACES_HEADER;