NAME

Allegro::Datafile - Allegro datafile routines


SYNOPSIS

   use Allegro;
   $al = Allegro->new() or die;
   $data = $al->Datafile(file => "example.dat");
   $bmp = $data->object("example1.bmp");
   $pal = $data->object("example.pal");


DESCRIPTION

The Allegro::Datafile module provides an object-oriented interface to the Allegro Datafile routines.


METHODS

new - create a new datafile object
Loads a datafile from disk.
   $data = $al->Datafile(file => $filename, password => $pass);
file (required)
Name of datafile to load.

password (optional)
Password to decrypt datafile. Defaults to no encryption.

object - access a datafile object from a loaded datafile
Allows access to an object from a previously loaded datafile.
   $bmp  = $data->object("test.bmp");
   $font = $data->object("main.fnt");
   $samp = $data->object("fire.wav");

names - returns list of object names
   for ($data->names) {
      print;
   }


AUTHOR

Colin O'Leary <colin@mx3.org>


COPYRIGHT

Copyright 2003 by Colin O'Leary. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The Allegro library is copyright its authors, and is giftware. See http://alleg.sf.net for more information.


SEE ALSO

Allegro - Base Allegro routines