MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / unpackData

Method unpackData

Engine/source/T3D/shapeImage.cpp:1158–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156}
1157
1158void ShapeBaseImageData::unpackData(BitStream* stream)
1159{
1160 Parent::unpackData(stream);
1161 computeCRC = stream->readFlag();
1162 if(computeCRC)
1163 {
1164 for( U32 j=0; j<MaxShapes; ++j )
1165 {
1166 stream->read(&mCRC[j]);
1167 }
1168 }
1169
1170 shapeName = stream->readSTString(); // shape 0 for normal use
1171 shapeNameFP = stream->readSTString(); // shape 1 for first person use (optional)
1172
1173 imageAnimPrefix = stream->readSTString();
1174 imageAnimPrefixFP = stream->readSTString();
1175
1176 stream->read(&mountPoint);
1177 if (stream->readFlag())
1178 mountOffset.identity();
1179 else
1180 stream->readAffineTransform(&mountOffset);
1181 if (stream->readFlag())
1182 eyeOffset.identity();
1183 else
1184 stream->readAffineTransform(&eyeOffset);
1185
1186 animateOnServer = stream->readFlag();
1187
1188 stream->read(&scriptAnimTransitionTime);
1189
1190 useEyeNode = stream->readFlag();
1191
1192 correctMuzzleVector = stream->readFlag();
1193 correctMuzzleVectorTP = stream->readFlag();
1194 firstPerson = stream->readFlag();
1195 stream->read(&mass);
1196 usesEnergy = stream->readFlag();
1197 stream->read(&minEnergy);
1198
1199 for( U32 j=0; j<MaxShapes; ++j )
1200 {
1201 hasFlash[j] = stream->readFlag();
1202 }
1203
1204 projectile = (stream->readFlag() ?
1205 (ProjectileData*)stream->readRangedU32(DataBlockObjectIdFirst,
1206 DataBlockObjectIdLast) : 0);
1207
1208 cloakable = stream->readFlag();
1209 lightType = stream->readRangedU32(0, NumLightTypes-1);
1210 if(lightType != NoLight)
1211 {
1212 stream->read(&lightRadius);
1213 stream->read(&lightDuration);
1214 lightColor.red = stream->readFloat(7);
1215 lightColor.green = stream->readFloat(7);

Callers

nothing calls this directly

Calls 11

mathReadFunction · 0.85
sfxReadFunction · 0.85
readFlagMethod · 0.80
readAffineTransformMethod · 0.80
readRangedU32Method · 0.80
readFloatMethod · 0.80
readIntMethod · 0.80
readSignedIntMethod · 0.80
readMethod · 0.45
readSTStringMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected