message: Stubbed out basic spritebatch functionality.
  It doesn't actually work properly yet, let alone have any perf gain,
  but it's a start.  And it actually compiles.
diff: @@ -37,47 +37,66 @@ use GameResult;
  /// A SpriteBatch draws a number of copies of the same image, using a single draw call.
  pub struct SpriteBatch {
  + image: graphics::Image,
  + sprites: Vec<graphics::DrawParam>,
  }
  pub type SpriteIdx = usize;
  impl SpriteBatch {
  /// Creates a new `SpriteBatch`, drawing with the given image.
  - pub fn new(image: graphics::Image) {
  + pub fn new(image: graphics::Image) -> Self {
  + Self {
  + image: image,
  + sprites: vec![],
  + }
  }
  /// Adds a new sprite to the sprite batch.
  ///
  /// Returns a handle with which to modify the sprite using `set()`
  pub fn add(&mut self, param: graphics::DrawParam) -> SpriteIdx {
  + self.sprites.push(param);
  + self.sprites.len() - 1
  }
  /// Alters a sprite in the batch to use the given draw params.
  pub fn set(&mut self, handle: SpriteIdx, param: graphics::DrawParam) {
  + self.sprites[handle] = param;
  }
  /// Immediately sends all data in the batch to the graphics card.
  ///
  /// Generally just calling `graphics::draw()` on the `SpriteBatch`
  /// will do this automatically.
  - pub fn flush(&mut self, ctx: &Context) {
  + pub fn flush(&self, ctx: &mut Context) {
  + for s in &self.sprites {
  + graphics::draw_ex(ctx, &self.image, *s);
  + }
  }
  /// Removes all data from the sprite batch.
  pub fn clear(&mut self) {
  + self.sprites.clear()
  }
  /// Unwraps the contained `Image`
  - pub fn into_inner(self) -> Image {
  + pub fn into_inner(self) -> graphics::Image {
  + self.image
  }
  /// Replaces the contained `Image`, returning the old one.
  - pub fn set_image(&mut self, image: Image) -> Image {
  + pub fn set_image(&mut self, image: graphics::Image) -> graphics::Image {
  + use std::mem;
  + mem::replace(&mut self.image, image)
  }
  }
  impl graphics::Drawable for SpriteBatch {
  - fn draw_ex(&self, ctx: &mut Context, param: DrawParam) -> GameResult<()> {
  + /// Does not properly work yet, ideally the position, scale, etc. of the given
  + /// DrawParam would be added to the DrawParam for each sprite.
  + fn draw_ex(&self, ctx: &mut Context, param: graphics::DrawParam) -> GameResult<()> {
  + self.flush(ctx);
  Ok(())
  }
  }
  