@Override
 public ParticleBitmapModel createFromStream(
     final ExtendedDataInputStream istream, final float levelPercent) throws IOException {
   final boolean leveled = istream.readBooleanBit();
   final boolean scaleRandomKeepRatio = istream.readBooleanBit();
   final int bitmapId = istream.readInt();
   final float hotX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float hotY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleRandomX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleRandomY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotation = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float redColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float greenColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float blueColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float alphaColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float redColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float greenColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float blueColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float alphaColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureTop = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureLeft = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureBottom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureRight = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float halfWidth = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float halfHeight = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationZ = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final ParticleBitmapModel model =
       new ParticleBitmapModel(
           bitmapId,
           hotX,
           hotY,
           scaleX,
           scaleY,
           scaleRandomX,
           scaleRandomY,
           scaleRandomKeepRatio,
           rotation,
           rotationRandom,
           redColor,
           greenColor,
           blueColor,
           alphaColor,
           redColorRandom,
           greenColorRandom,
           blueColorRandom,
           alphaColorRandom,
           rotationX,
           rotationY,
           rotationZ);
   model.setTextureCoords(textureTop, textureLeft, textureBottom, textureRight);
   model.setHalfSize(halfWidth, halfHeight);
   return model;
 }
 public void load(final ExtendedDataInputStream is) {
   final int numSounds = is.readInt();
   this.m_soundIds = new long[numSounds];
   this.m_gains = new byte[numSounds];
   for (int i = 0; i < numSounds; ++i) {
     this.m_soundIds[i] = is.readLong();
     this.m_gains[i] = is.readByte();
   }
   this.m_loop = is.readBooleanBit();
   this.m_rollOffId = is.readInt();
   this.m_fadeOutTime = is.readInt();
   this.m_stopOnRemoveAps = is.readBooleanBit();
   this.m_delay = is.readInt();
 }