- SEE ALSO
- COPYRIGHT AND LICENSE
Games::NES::SpriteMaker - manipulate PNM files and generate NES sprite data from them
use Games::NES::SpriteMaker 'image_to_sprite'; open my $fh, '>', 'sprites.chr'; my $chr = image_to_sprite('spritemap.pgm'); $fh->print($chr); $fh->close;
This module contains useful functions for manipulating images in the PNM format in order to create and modify sprite data (CHR-ROM banks) in NES roms. The idea is that drawing sprites is much easier in a real graphics editor, and then you can save the image as a .pbm/.pgm/.ppm file and convert it into sprite data directly, rather than having to edit sprites in a hex editor.
Right now, the capabilities are pretty limited, but I'm open to adding more functionality as it becomes useful.
Converts PNM data to CHR-ROM data.
$data can either be a filename or a scalar reference which is a reference to a string containing PNM-format data.
%opts is a hash of options for how to generate the data. Currently the only option is
rom_size, which determines the size of the .chr file to generate. It defaults to
Please report any bugs to GitHub Issues at https://github.com/doy/games-nes-spritemaker/issues.
You can find this documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
Jesse Luehrs <email@example.com>
This software is Copyright (c) 2014 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License