NAME

Games::Risk::Resources - utility module to load bundled resources

VERSION

version 4.000

SYNOPSIS

use Games::Risk::Resources qw{ image };
my $image = get_image('actexit16');

DESCRIPTION

This module is a focal point to access all resources bundled with Games::Risk. Indeed, instead of each package to reinvent its loading mechanism, this package provides handy functions to do that.

Moreover, by loading all the images at the same location, it will ensure that they are not loaded twice, cutting memory eating.

SUBROUTINES

Games::Risk::Resources deals with various resources bundled within the distribution. It doesn't export anything by default, but the following subs are available for your import pleasure.

Image resources

The images used for the GUI are bundled and loaded as Tk::Photo of $poe_main_window.

my $img = get_image( $name )

Return the Tk image called $name. It can be directly used within Tk.

Map resources

Map resources are playable maps, to allow more playing fun.

my $path = map_path( $name )

Return the absolute path of the map $name.

my @names = maps( )

Return the names of all the maps bundled with Games::Risk.

SEE ALSO

Games::Risk.

AUTHOR

Jerome Quelin

COPYRIGHT AND LICENSE

This software is Copyright (c) 2008 by Jerome Quelin.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007