|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
AnimaEngine is a C99 sprite extraction and preview toolchain for Nintendo DS Pokemon Black, White, Black 2, and White 2 battle graphics. It works with the original Gen V games and their sequels by reading the Pokegra archive (/a/0/0/4), decoding Nitro graphics formats, reconstructing multi-part battle sprites, and exporting PNG previews, animated idle GIFs, idle break GIFs, composed idle-to-break GIFs, and reconstruction JSON.
No ROMs, save files, extracted Pokemon assets, or Nintendo copyrighted data are included in this repository or in release packages. You must provide your own legally dumped .nds ROM. Pokémon and individual species names are trademarks of Nintendo, Game Freak, and Creatures Inc.; see THIRD_PARTY_NOTICES.md for the full trademark disclaimer.

![]()

The pipeline is built from small, single-responsibility C modules so each stage is easy to test and reason about end to end:
nds_header, nds_fat, and nds_fnt parse the Nintendo DS cartridge header, the File Allocation Table, and the File Name Table to give a path-addressable filesystem over the .nds blob.narc reads the Pokegra archive at /a/0/0/4 into individual members (NCGR, NCLR, NCER, NANR, NMCR, NMAR).ncgr decodes tile graphics, nclr decodes palettes, ncer decodes sprite cells, nanr decodes frame animations, and nmcr / nmar decode multi-cell / multi-animation banks.lz transparently handles LZ10 and LZ11 streams that wrap NARC members in many DS titles.sprite_composer lays the multi-part battle sprite down on a canvas, applying per-cell offsets, palette indices, and animation state.png_writer and gif_writer write the result. gif_pipeline and png_pipeline wrap the writers to produce spritesheets, animated idle GIFs, idle-break GIFs, composed GIFs, and static PNGs. json_export emits reconstruction metadata so a downstream tool can reproduce the export.gui_*) provides live preview, search, side/gender/shiny/form controls, and per-asset export on top of the same backend (anima_backend) used by the CLI.The CLI and GUI share the same source/anima_backend.c entry point, so behaviour is identical between them.
Tagged GitHub Releases provide precompiled GUI packages for Linux, Windows, and macOS (Apple Silicon and Intel). These packages bundle the raylib runtime where needed, so users do not need to install raylib just to run the GUI.
AnimaEngine-*-linux-x86_64.tar.gz and run ./run-gui.sh.AnimaEngine-*-windows-x86_64.zip and run AnimaEngineGUI.exe.AnimaEngine-*-macos-arm64.tar.gz and run ./run-gui.command.AnimaEngine-*-macos-x86_64.tar.gz and run ./run-gui.command. The binaries are not codesigned yet, so macOS may require right-clicking and choosing Open.makepkg-configlibpngraylib for GUI builds onlydoxygen for generated API docsOn Debian/Ubuntu for local development:
Install raylib through your package manager or from source before building the GUI locally.
Load a Pokemon Black, White, Black 2, or White 2 .nds ROM, choose a species, select the preview asset, and export the current preview, the species DS files, or all assets.
Full export mode writes to a canonical species folder below the output root:
That command writes Squirtle assets under:
Single asset export mode writes exactly to the requested output path:
Note: in --mode single the third positional argument is the destination file path; in default (full) mode it is a directory. Use --mode explicitly when in doubt.
Run the built-in help for all options:
The latest published API reference lives at https://killdawill.github.io/AnimaEngine/ (built automatically from main by the docs workflow).
To generate the docs locally:
Open docs/build/html/index.html after generation.
AnimaEngine code is released under the MIT License. See [LICENSE](LICENSE). Third-party runtime and trademark notices are listed in THIRD_PARTY_NOTICES.md.
Issues and pull requests are welcome. For anything that touches sprite reconstruction or format decoding, please attach a small reproducer (a hex dump of the NARC member and the expected output is enough) so the change can be verified. See CHANGELOG.md for the release history.