Games::NES::SpriteMaker - manipulate PNM files and generate NES sprite data from them
version 0.02
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 8192.
$data
%opts
rom_size
8192
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.
perldoc Games::NES::SpriteMaker
You can also look for information at:
MetaCPAN
https://metacpan.org/release/Games-NES-SpriteMaker
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-NES-SpriteMaker
Github
https://github.com/doy/games-nes-spritemaker
CPAN Ratings
http://cpanratings.perl.org/d/Games-NES-SpriteMaker
Jesse Luehrs <doy@tozt.net>
This software is Copyright (c) 2014 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License
To install Games::NES::SpriteMaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::NES::SpriteMaker
CPAN shell
perl -MCPAN -e shell install Games::NES::SpriteMaker
For more information on module installation, please visit the detailed CPAN module installation guide.