mirror of
https://github.com/wader/fq.git
synced 2024-09-11 20:07:11 +03:00
commit
fdadc37d8d
@ -330,10 +330,10 @@ type sectionOffsetTable struct {
|
||||
|
||||
blendShapeKeyformBindings struct {
|
||||
parameterBindingSourcesIndices int64
|
||||
blendShapeConstraintIndexSourcesBeginIndices int64
|
||||
blendShapeConstraintIndexSourcesCounts int64
|
||||
keyformSourcesBlendShapeIndices int64
|
||||
keyformSourcesBlendShapeCounts int64
|
||||
blendShapeConstraintIndexSourcesBeginIndices int64
|
||||
blendShapeConstraintIndexSourcesCounts int64
|
||||
}
|
||||
|
||||
blendShapesWarpDeformers struct {
|
||||
@ -657,10 +657,10 @@ func decodeMOC3(d *decode.D) any {
|
||||
|
||||
d.FieldStruct("blend_shape_keyform_bindings", func(d *decode.D) {
|
||||
sectionOffsets.blendShapeKeyformBindings.parameterBindingSourcesIndices = int64(d.FieldU32("parameter_binding_sources_indices", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesBeginIndices = int64(d.FieldU32("blend_shape_constraint_index_sources_begin_indices", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesCounts = int64(d.FieldU32("blend_shape_constraint_index_sources_counts", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.keyformSourcesBlendShapeIndices = int64(d.FieldU32("keyform_sources_blend_shape_indices", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.keyformSourcesBlendShapeCounts = int64(d.FieldU32("keyform_sources_blend_shape_counts", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesBeginIndices = int64(d.FieldU32("blend_shape_constraint_index_sources_begin_indices", scalar.UintHex))
|
||||
sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesCounts = int64(d.FieldU32("blend_shape_constraint_index_sources_counts", scalar.UintHex))
|
||||
})
|
||||
|
||||
d.FieldStruct("blend_shapes_warp_deformers", func(d *decode.D) {
|
||||
@ -759,9 +759,9 @@ func decodeMOC3(d *decode.D) any {
|
||||
countInfo.drawOrderGroupObjects = int64(d.FieldU32("draw_order_group_objects"))
|
||||
countInfo.glue = int64(d.FieldU32("glue"))
|
||||
countInfo.glueInfo = int64(d.FieldU32("glue_info"))
|
||||
countInfo.glueKeyforms = int64(d.FieldU32("glue_keyforms"))
|
||||
|
||||
if version >= moc3Version4_02_00 {
|
||||
countInfo.glueKeyforms = int64(d.FieldU32("glue_keyforms"))
|
||||
countInfo.keyformMultiplyColors = int64(d.FieldU32("keyform_multiply_colors"))
|
||||
countInfo.keyformScreenColors = int64(d.FieldU32("keyform_screen_colors"))
|
||||
countInfo.blendShapeParameterBindings = int64(d.FieldU32("blend_shape_parameter_bindings"))
|
||||
@ -1297,17 +1297,17 @@ func decodeMOC3(d *decode.D) any {
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.parameterBindingSourcesIndices * 8)
|
||||
fieldAlignedNArray(d, "parameter_binding_sources_indices", count, func(d *decode.D) { d.FieldS32("index") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesBeginIndices * 8)
|
||||
fieldAlignedNArray(d, "blend_shape_constraint_index_sources_begin_indices", count, func(d *decode.D) { d.FieldS32("index") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesCounts * 8)
|
||||
fieldAlignedNArray(d, "blend_shape_constraint_index_sources_counts", count, func(d *decode.D) { d.FieldS32("count") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.keyformSourcesBlendShapeIndices * 8)
|
||||
fieldAlignedNArray(d, "keyform_sources_blend_shape_indices", count, func(d *decode.D) { d.FieldS32("index") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.keyformSourcesBlendShapeCounts * 8)
|
||||
fieldAlignedNArray(d, "keyform_sources_blend_shape_counts", count, func(d *decode.D) { d.FieldS32("count") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesBeginIndices * 8)
|
||||
fieldAlignedNArray(d, "blend_shape_constraint_index_sources_begin_indices", count, func(d *decode.D) { d.FieldS32("index") })
|
||||
|
||||
d.SeekAbs(sectionOffsets.blendShapeKeyformBindings.blendShapeConstraintIndexSourcesCounts * 8)
|
||||
fieldAlignedNArray(d, "blend_shape_constraint_index_sources_counts", count, func(d *decode.D) { d.FieldS32("count") })
|
||||
})
|
||||
|
||||
d.FieldStruct("blend_shapes_warp_deformers", func(d *decode.D) {
|
||||
|
20
format/moc3/testdata/archchan_sdk5.moc3.fqtest
vendored
20
format/moc3/testdata/archchan_sdk5.moc3.fqtest
vendored
@ -160,10 +160,10 @@ $ fq 'dv({array_truncate: 3, display_bytes: 4})' archchan_sdk5.moc3
|
||||
0x00210| c0 23 0d 00| .#..| base_key_indices: 0xd23c0 0x21c-0x21f.7 (4)
|
||||
| | | blend_shape_keyform_bindings{}: 0x220-0x233.7 (20)
|
||||
0x00220|c0 23 0d 00 |.#.. | parameter_binding_sources_indices: 0xd23c0 0x220-0x223.7 (4)
|
||||
0x00220| c0 23 0d 00 | .#.. | blend_shape_constraint_index_sources_begin_indices: 0xd23c0 0x224-0x227.7 (4)
|
||||
0x00220| c0 23 0d 00 | .#.. | blend_shape_constraint_index_sources_counts: 0xd23c0 0x228-0x22b.7 (4)
|
||||
0x00220| c0 23 0d 00| .#..| keyform_sources_blend_shape_indices: 0xd23c0 0x22c-0x22f.7 (4)
|
||||
0x00230|c0 23 0d 00 |.#.. | keyform_sources_blend_shape_counts: 0xd23c0 0x230-0x233.7 (4)
|
||||
0x00220| c0 23 0d 00 | .#.. | keyform_sources_blend_shape_indices: 0xd23c0 0x224-0x227.7 (4)
|
||||
0x00220| c0 23 0d 00 | .#.. | keyform_sources_blend_shape_counts: 0xd23c0 0x228-0x22b.7 (4)
|
||||
0x00220| c0 23 0d 00| .#..| blend_shape_constraint_index_sources_begin_indices: 0xd23c0 0x22c-0x22f.7 (4)
|
||||
0x00230|c0 23 0d 00 |.#.. | blend_shape_constraint_index_sources_counts: 0xd23c0 0x230-0x233.7 (4)
|
||||
| | | blend_shapes_warp_deformers{}: 0x234-0x23f.7 (12)
|
||||
0x00230| c0 23 0d 00 | .#.. | target_indices: 0xd23c0 0x234-0x237.7 (4)
|
||||
0x00230| c0 23 0d 00 | .#.. | blend_shape_keyform_binding_sources_begin_indices: 0xd23c0 0x238-0x23b.7 (4)
|
||||
@ -1113,18 +1113,18 @@ $ fq 'dv({array_truncate: 3, display_bytes: 4})' archchan_sdk5.moc3
|
||||
| | | parameter_binding_sources_indices{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | blend_shape_constraint_index_sources_begin_indices{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | blend_shape_constraint_index_sources_counts{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | keyform_sources_blend_shape_indices{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | keyform_sources_blend_shape_counts{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | blend_shape_constraint_index_sources_begin_indices{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | blend_shape_constraint_index_sources_counts{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
| | | padding: raw bits 0xd23c0-NA (0)
|
||||
| | | blend_shapes_warp_deformers{}: 0xd23c0-NA (0)
|
||||
| | | target_indices{}: 0xd23c0-NA (0)
|
||||
| | | array[0:0]: 0xd23c0-NA (0)
|
||||
|
Loading…
Reference in New Issue
Block a user