# EarthBound Battle Backgrounds

This crate emulates the battle background animations from [EarthBound / Mother
2][earthbound].

This crate started as a direct port of [Earthbound Battle Backgrounds
JS][earthbound-js], which is in turn a port of [Kraken][kraken].

# Usage

```rust
use earthbound_battle_backgrounds::{Emulator, Options, SNES_WIDTH, SNES_HEIGHT};

let mut emulator = Emulator::new(Options::default());

// Obtain an RGBA pixel buffer from your windowing system.
let mut pixels: Vec<u8> = vec![0; usize::from(SNES_WIDTH * SNES_HEIGHT) * 4];

// Call every time a new frame is required.
emulator.draw_frame(&mut pixels);
```

[earthbound]: https://en.wikipedia.org/wiki/EarthBound
[earthbound-js]: https://github.com/gjtorikian/Earthbound-Battle-Backgrounds-JS
[kraken]: https://forum.starmen.net/forum/Fan/Games/Kraken-EB-Battle-Animation-Screensaver
