mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
utils: mdldec: qc.c: put every sequence property to separate line.
This commit is contained in:
parent
d8f3e53b1f
commit
02d5bab04b
@ -482,117 +482,81 @@ static void WriteSequenceInfo( FILE *fp )
|
|||||||
{
|
{
|
||||||
seqdesc = (mstudioseqdesc_t *)( (byte *)model_hdr + model_hdr->seqindex ) + i;
|
seqdesc = (mstudioseqdesc_t *)( (byte *)model_hdr + model_hdr->seqindex ) + i;
|
||||||
|
|
||||||
fprintf( fp, "$sequence \"%s\" ", seqdesc->label );
|
fprintf( fp, "$sequence \"%s\" {\n", seqdesc->label );
|
||||||
|
|
||||||
if( seqdesc->numblends > 1 )
|
if( seqdesc->numblends > 1 )
|
||||||
{
|
{
|
||||||
if( seqdesc->numblends > 2 )
|
for( j = 0; j < seqdesc->numblends; j++ )
|
||||||
{
|
{
|
||||||
fputs( "{\n", fp );
|
fprintf( fp, "\t\"%s_blend%02i\"\n", seqdesc->label, j + 1 );
|
||||||
|
|
||||||
for( j = 0; j < seqdesc->numblends; j++ )
|
|
||||||
{
|
|
||||||
fputs( " ", fp );
|
|
||||||
|
|
||||||
fprintf( fp, "\"%s_blend%i\" ", seqdesc->label, j + 1 );
|
|
||||||
|
|
||||||
fputs( "\n", fp );
|
|
||||||
}
|
|
||||||
|
|
||||||
fputs( " ", fp );
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf( fp, "\"%s_blend1\" ", seqdesc->label );
|
|
||||||
fprintf( fp, "\"%s_blend2\" ", seqdesc->label );
|
|
||||||
}
|
|
||||||
|
|
||||||
GetMotionTypeString( seqdesc->blendtype[0], motion_types, sizeof( motion_types ), false );
|
|
||||||
|
|
||||||
fprintf( fp, "blend %s %.0f %.0f",
|
|
||||||
motion_types, seqdesc->blendstart[0], seqdesc->blendend[0] );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf( fp, "\"%s\"", seqdesc->label );
|
fprintf( fp, "\t\"%s\"\n", seqdesc->label );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( seqdesc->motiontype )
|
|
||||||
{
|
|
||||||
GetMotionTypeString( seqdesc->motiontype, motion_types, sizeof( motion_types ), true );
|
|
||||||
|
|
||||||
fprintf( fp, "%s", motion_types );
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf( fp, " fps %.0f ", seqdesc->fps );
|
|
||||||
|
|
||||||
if( seqdesc->flags == 1 )
|
|
||||||
fputs( "loop ", fp );
|
|
||||||
|
|
||||||
if( seqdesc->activity )
|
if( seqdesc->activity )
|
||||||
{
|
{
|
||||||
activity = FindActivityName( seqdesc->activity );
|
activity = FindActivityName( seqdesc->activity );
|
||||||
|
|
||||||
if( activity )
|
if( activity )
|
||||||
{
|
{
|
||||||
fprintf( fp, "%s %i ", activity, seqdesc->actweight );
|
fprintf( fp, "\t%s %i\n", activity, seqdesc->actweight );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "WARNING: Sequence %s has a custom activity flag (ACT_%i %i).\n",
|
printf( "WARNING: Sequence %s has a custom activity flag (ACT_%i %i).\n",
|
||||||
seqdesc->label, seqdesc->activity, seqdesc->actweight );
|
seqdesc->label, seqdesc->activity, seqdesc->actweight );
|
||||||
|
|
||||||
fprintf( fp, "ACT_%i %i ", seqdesc->activity, seqdesc->actweight );
|
fprintf( fp, "\tACT_%i %i\n", seqdesc->activity, seqdesc->actweight );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( seqdesc->blendtype[0] )
|
||||||
|
{
|
||||||
|
GetMotionTypeString( seqdesc->blendtype[0], motion_types, sizeof( motion_types ), false );
|
||||||
|
|
||||||
|
fprintf( fp, "\tblend %s %.0f %.0f\n",
|
||||||
|
motion_types, seqdesc->blendstart[0], seqdesc->blendend[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( j = 0; j < seqdesc->numevents; j++ )
|
||||||
|
{
|
||||||
|
event = (mstudioevent_t *)( (byte *)model_hdr + seqdesc->eventindex ) + j;
|
||||||
|
|
||||||
|
fprintf( fp, "\t{ event %i %i", event->event, event->frame );
|
||||||
|
|
||||||
|
if( event->options[0] != '\0' )
|
||||||
|
fprintf( fp, " \"%s\"", event->options );
|
||||||
|
|
||||||
|
fputs( " }\n", fp );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fprintf( fp, "\tfps %.0f\n", seqdesc->fps );
|
||||||
|
|
||||||
|
if( seqdesc->flags == 1 )
|
||||||
|
fputs( "\tloop\n", fp );
|
||||||
|
|
||||||
|
if( seqdesc->motiontype )
|
||||||
|
{
|
||||||
|
GetMotionTypeString( seqdesc->motiontype, motion_types, sizeof( motion_types ), true );
|
||||||
|
|
||||||
|
fprintf( fp, "\t%s\n", motion_types );
|
||||||
|
}
|
||||||
|
|
||||||
if( seqdesc->entrynode && seqdesc->exitnode )
|
if( seqdesc->entrynode && seqdesc->exitnode )
|
||||||
{
|
{
|
||||||
if( seqdesc->entrynode == seqdesc->exitnode )
|
if( seqdesc->entrynode == seqdesc->exitnode )
|
||||||
fprintf( fp, "node %i ", seqdesc->entrynode );
|
fprintf( fp, "\tnode %i\n", seqdesc->entrynode );
|
||||||
else if( seqdesc->nodeflags )
|
else if( seqdesc->nodeflags )
|
||||||
fprintf( fp, "rtransition %i %i ", seqdesc->entrynode, seqdesc->exitnode );
|
fprintf( fp, "\trtransition %i %i\n", seqdesc->entrynode, seqdesc->exitnode );
|
||||||
else
|
else
|
||||||
fprintf( fp, "transition %i %i ", seqdesc->entrynode, seqdesc->exitnode );
|
fprintf( fp, "\ttransition %i %i\n", seqdesc->entrynode, seqdesc->exitnode );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( seqdesc->numevents > 2 )
|
fputs( "}\n", fp );
|
||||||
{
|
|
||||||
fputs( "{\n", fp );
|
|
||||||
|
|
||||||
for( j = 0; j < seqdesc->numevents; j++ )
|
|
||||||
{
|
|
||||||
event = (mstudioevent_t *)( (byte *)model_hdr + seqdesc->eventindex ) + j;
|
|
||||||
|
|
||||||
fprintf( fp, "\t{ event %i %i", event->event, event->frame );
|
|
||||||
|
|
||||||
if( event->options[0] != '\0' )
|
|
||||||
fprintf( fp, " \"%s\"", event->options );
|
|
||||||
|
|
||||||
fputs( " }\n", fp );
|
|
||||||
}
|
|
||||||
|
|
||||||
fputs( "}", fp );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for( j = 0; j < seqdesc->numevents; j++ )
|
|
||||||
{
|
|
||||||
event = (mstudioevent_t *)( (byte *)model_hdr + seqdesc->eventindex ) + j;
|
|
||||||
|
|
||||||
fprintf( fp, "{ event %i %i", event->event, event->frame );
|
|
||||||
|
|
||||||
if( event->options[0] != '\0')
|
|
||||||
fprintf( fp, " \"%s\"", event->options );
|
|
||||||
|
|
||||||
fputs( " } ", fp );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fputs( "\n", fp );
|
|
||||||
|
|
||||||
if( seqdesc->numblends > 2 )
|
|
||||||
fputs( "}\n", fp );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs( "\n", fp );
|
fputs( "\n", fp );
|
||||||
|
Loading…
Reference in New Issue
Block a user