| 1147 | } |
| 1148 | |
| 1149 | void TSShape::assembleShape() |
| 1150 | { |
| 1151 | S32 i,j; |
| 1152 | |
| 1153 | // get counts... |
| 1154 | S32 numNodes = tsalloc.get32(); |
| 1155 | S32 numObjects = tsalloc.get32(); |
| 1156 | S32 numDecals = tsalloc.get32(); |
| 1157 | S32 numSubShapes = tsalloc.get32(); |
| 1158 | S32 numIflMaterials = tsalloc.get32(); |
| 1159 | S32 numNodeRots; |
| 1160 | S32 numNodeTrans; |
| 1161 | S32 numNodeUniformScales; |
| 1162 | S32 numNodeAlignedScales; |
| 1163 | S32 numNodeArbitraryScales; |
| 1164 | if (smReadVersion<22) |
| 1165 | { |
| 1166 | numNodeRots = numNodeTrans = tsalloc.get32() - numNodes; |
| 1167 | numNodeUniformScales = numNodeAlignedScales = numNodeArbitraryScales = 0; |
| 1168 | } |
| 1169 | else |
| 1170 | { |
| 1171 | numNodeRots = tsalloc.get32(); |
| 1172 | numNodeTrans = tsalloc.get32(); |
| 1173 | numNodeUniformScales = tsalloc.get32(); |
| 1174 | numNodeAlignedScales = tsalloc.get32(); |
| 1175 | numNodeArbitraryScales = tsalloc.get32(); |
| 1176 | } |
| 1177 | S32 numGroundFrames = 0; |
| 1178 | if (smReadVersion>23) |
| 1179 | numGroundFrames = tsalloc.get32(); |
| 1180 | S32 numObjectStates = tsalloc.get32(); |
| 1181 | S32 numDecalStates = tsalloc.get32(); |
| 1182 | S32 numTriggers = tsalloc.get32(); |
| 1183 | S32 numDetails = tsalloc.get32(); |
| 1184 | S32 numMeshes = tsalloc.get32(); |
| 1185 | S32 numSkins = 0; |
| 1186 | if (smReadVersion<23) |
| 1187 | // in later versions, skins are kept with other meshes |
| 1188 | numSkins = tsalloc.get32(); |
| 1189 | S32 numNames = tsalloc.get32(); |
| 1190 | |
| 1191 | // Note that we are recalculating these values later on for safety. |
| 1192 | mSmallestVisibleSize = (F32)tsalloc.get32(); |
| 1193 | mSmallestVisibleDL = tsalloc.get32(); |
| 1194 | |
| 1195 | tsalloc.checkGuard(); |
| 1196 | |
| 1197 | // get bounds... |
| 1198 | tsalloc.get32((S32*)&radius,1); |
| 1199 | tsalloc.get32((S32*)&tubeRadius,1); |
| 1200 | tsalloc.get32((S32*)¢er,3); |
| 1201 | tsalloc.get32((S32*)&bounds,6); |
| 1202 | |
| 1203 | tsalloc.checkGuard(); |
| 1204 | |
| 1205 | // copy various vectors... |
| 1206 | S32 * ptr32 = tsalloc.copyToShape32(numNodes*5); |
nothing calls this directly
no test coverage detected