MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / read

Method read

Engine/source/ts/tsShapeOldRead.cpp:731–810  ·  view source on GitHub ↗

------------------------------------------------- read/write sequence -------------------------------------------------

Source from the content-addressed store, hash-verified

729// read/write sequence
730//-------------------------------------------------
731void TSShape::Sequence::read(Stream * s, bool readNameIndex)
732{
733 AssertISV(smReadVersion>=19,"Reading old sequence");
734
735 if (readNameIndex)
736 s->read(&nameIndex);
737 flags = 0;
738 if (TSShape::smReadVersion>21)
739 s->read(&flags);
740 else
741 flags=0;
742
743 s->read(&numKeyframes);
744 s->read(&duration);
745
746 if (TSShape::smReadVersion<22)
747 {
748 bool tmp = false;
749 s->read(&tmp);
750 if (tmp)
751 flags |= Blend;
752 s->read(&tmp);
753 if (tmp)
754 flags |= Cyclic;
755 s->read(&tmp);
756 if (tmp)
757 flags |= MakePath;
758 }
759
760 s->read(&priority);
761 s->read(&firstGroundFrame);
762 s->read(&numGroundFrames);
763 if (TSShape::smReadVersion>21)
764 {
765 s->read(&baseRotation);
766 s->read(&baseTranslation);
767 s->read(&baseScale);
768 s->read(&baseObjectState);
769 s->read(&baseDecalState);
770 }
771 else
772 {
773 s->read(&baseRotation);
774 baseTranslation=baseRotation;
775 s->read(&baseObjectState);
776 s->read(&baseDecalState);
777 }
778
779 s->read(&firstTrigger);
780 s->read(&numTriggers);
781 s->read(&toolBegin);
782
783 // now the membership sets:
784 rotationMatters.read(s);
785 if (TSShape::smReadVersion<22)
786 translationMatters=rotationMatters;
787 else
788 {

Callers 2

importSequencesMethod · 0.45
readNameMethod · 0.45

Calls 1

testAllMethod · 0.45

Tested by

no test coverage detected