-------------------------------------------------------------------------- Pack data --------------------------------------------------------------------------
| 161 | // Pack data |
| 162 | //-------------------------------------------------------------------------- |
| 163 | void SplashData::packData(BitStream* stream) |
| 164 | { |
| 165 | Parent::packData(stream); |
| 166 | |
| 167 | PACKDATA_ASSET(Sound); |
| 168 | |
| 169 | mathWrite(*stream, scale); |
| 170 | stream->write(delayMS); |
| 171 | stream->write(delayVariance); |
| 172 | stream->write(lifetimeMS); |
| 173 | stream->write(lifetimeVariance); |
| 174 | stream->write(width); |
| 175 | stream->write(numSegments); |
| 176 | stream->write(velocity); |
| 177 | stream->write(height); |
| 178 | stream->write(acceleration); |
| 179 | stream->write(texWrap); |
| 180 | stream->write(texFactor); |
| 181 | stream->write(ejectionFreq); |
| 182 | stream->write(ejectionAngle); |
| 183 | stream->write(ringLifetime); |
| 184 | stream->write(startRadius); |
| 185 | |
| 186 | if( stream->writeFlag( explosion ) ) |
| 187 | { |
| 188 | stream->writeRangedU32(explosion->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast); |
| 189 | } |
| 190 | |
| 191 | S32 i; |
| 192 | for( i=0; i<NUM_EMITTERS; i++ ) |
| 193 | { |
| 194 | if( stream->writeFlag( emitterList[i] != NULL ) ) |
| 195 | { |
| 196 | stream->writeRangedU32( emitterList[i]->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast ); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | for( i=0; i<NUM_TIME_KEYS; i++ ) |
| 201 | { |
| 202 | stream->write( colors[i] ); |
| 203 | } |
| 204 | |
| 205 | for( i=0; i<NUM_TIME_KEYS; i++ ) |
| 206 | { |
| 207 | stream->write( times[i] ); |
| 208 | } |
| 209 | |
| 210 | for( i=0; i<NUM_TEX; i++ ) |
| 211 | { |
| 212 | PACKDATA_ASSET_ARRAY(Texture, i); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | //-------------------------------------------------------------------------- |
| 217 | // Unpack data |
no test coverage detected