The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Allegro - Perl interface to Allegro multimedia library

SYNOPSIS

   use Allegro;

   # Create Allegro object
   $al = Allegro->new() or die "Couldn't initialize Allegro";

   # Create Display object (screen)
   $disp = $al->Display(width => 640, height => 480)
      or die "Couldn't set graphics mode " . $al->error;

   for $file (@ARGV)
   {
      # Load image into bitmap
      $bmp = $disp->Bitmap(file => $file)
         or die "Couldn't load $file";

      # Clear display bitmap
      $disp->clear();

      # Copy image bitmap to display
      $disp->blit($bmp);

      $al->sleep(10);
   }

DESCRIPTION

Allegro

Allegro is a game programming library for C/C++ developers distributed freely, supporting the following platforms: DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows, QNX, BeOS and MacOS X new!. It provides many functions for graphics, sounds, player input (keyboard, mouse and joystick) and timers. It also provides fixed and floating point mathematical functions, 3d functions, file management functions, compressed datafile and a GUI. [from the Allegro website]

Allegro Perl Module

This module provides an object-oriented Perl interface to Allegro.

The entire Allegro API is not implemented. The configuration routines, 3d routines, FLIC, RLE and compiled sprites, audio streams, and GUI are not implemented by this module. They may be in the future.

Interfaces

This module provides both a Perl-based object oriented interface as well as a thin wrapper around the Allegro C library. It is suggested that you use the Perl interface, but the C wrapper routrines are available. See PROCEDURAL INTERFACE below.

OBJECT ORIENTED INTERFACE

Allegro Objects

The Allegro Perl module is a collection of packages corresponding to various objects. These objects map loosely to the Allegro API. Objects include things such as Bitmaps, Timers, Datafiles, the Keyboard, Mouse, etc.

There is a general hierarchy of objects used. Some objects may be able to create sub-objects that are associated with them. The hierarchy is rooted by the Allegro module which can create various sub-objects.

To create a sub-object, the following syntax is used:

   $al   = Allegro->new;
   $disp = $al->Display(mode => 'window');

The Display here is the name of a class provided by the Allegro module. Display is a sub-object of the global Allegro object. Display can create one sub-object: the Bitmap object.

   $bmp  = $disp->Bitmap(width => 640, height => 480);

Bitmap here is a sub-object of $disp. Bitmap objects may be sub-objects of either Allegro or Display, but Display is preferred. See Allegro::Display below.

The following is a list of all Allegro objects.

Object Summary

Allegro

Allegro is the base Allegro object. Only one Allegro instance may be created at a time. If Allegro::new is called more than once, the previously created instance will be retured.

Allegro does not have a parent object. Therefore it must be created by a call to Allegro->new() instead of the form used for other Allegro objects.

Allegro::Bitmap

Allegro::Bitmap is a bitmap object, corresponding to Allegro's BITMAP structure. A Bitmap may be created with either an Allegro or Display object call to ->Bitmap, but Display is preferred.

Allegro::Datafile

Allegro datafiles may be read into a Allegro::Datafile object. This will create a collection of Allegro objects for each included file.

Allegro::Display

An Allegro::Display object corresponds the the screen bitmap pointer in Allegro. Creating a Display object will either create a new window on the desktop or enter full screen mode. Bitmap objects may be created from the returned Display instance.

Allegro::Font

Allegro::Font is a font that may be used for text drawing. This corresponds to Allegro's FONT type. Allegro does not provide any routines for loading fonts directly, but they may be loaded via a Datafile object.

Allegro::Joystick

Allegro::Joystick corresponds to a single joystick installed on the system. Each returned instance contains methods to read joystick buttons and axes, as well as calibration methods.

Allegro::Keyboard

Allegro::Keyboard accesses the keyboard, providing methods to check for key presses and do buffered keyboard reading. Only one Keyboard object may exist at once.

Allegro::MIDI

MIDI objects are not yet implemented.

Allegro::Mouse

Allegro::Mouse provides an object to access the current mouse position and button status. Only one mouse object may be created.

Allegro::Palette

The Allegro::Palette object provides methods to read and write color palettes that may be used with Allegro's 8-bit indexed color modes. Each 8-bit Bitmap object will include a Palette object.

Allegro::Sound

The Allegro::Sound is used to initialize the sound card drivers and set the global volume.

Allegro::Sample

Allegro::Sample is a digital sample object. This corresponds to Allegro's SAMPLE abstract type, and provides methods to play digital sounds.

Allegro::Timer

Allegro::Timer objects provide access to Allegro's timer callbacks. Each object corresponds to one timer callback.

The Allegro object is described below. Other objects are fully documented in their respective manual pages.

Allegro Object

Description

The Allegro object is the ancestor of all objects created by the Allegro module. It can only be created once, and then further calls to new will result in the original object being returned.

Creating an Allegro object will initialize the Allegro library. This may involve accessing the hardware. For instance, this will check the DISPLAY environment variable and connect to X under Unix, try to access a spare virtual terminal under Linux, or create a (non-yet visible) window in Microsoft Windows. Use driver => none in new to avoid this.

Methods

new - create a new Allegro instance

This method creates a new Allegro instance, which can then be used to create sub-objects, as well as initialize various other Allegro subsystems.

   $al = Allegro->new(driver => 'auto');

driver is the driver to use for the Allegro system driver. Currently only auto and none are valid options. auto will pick whatever is convenient or use allegro.cfg, which none will use the special SYSTEM_NONE() driver from Allegro. This driver will not allow any hardware access. It is only useful for reading and writing memory bitmaps and datafiles. The default is auto.

shutdown - shuts down the Allegro system

This method releasing all access to the hardware and frees any memory Allegro is using internally. Any Allegro objects that are still in existance are considered invalid after this call, and may not be used safely.

This will be called automatically when Perl exits; it does not need to be called explicitly.

sleep
   $al->sleep($seconds);

Sleeps for a number of seconds. $seconds may be a floating point number. This should be used in place of Perl's builtin sleep function, since Allegro's timer system and the Timer module may cause the builtin to work improperly.

This may be exported and used as a replacement for the builtin sleep.

error - return last Allegro error message

This method will return a text error message relating to the last failure by Allegro, most notably failure to set a graphics mode.

message - switch to text mode and print message

This method provides a portable way to send an error message to the user. It will destroy the current display (by switching to a "text" mode).

PROCEDURAL INTERFACE

Description

In addition the the object oriented interface described above, the thinly wrapped C routines used by the object-oriented interface are available. Knowledge of the Allegro API is assumed in the reference below. Most functions behave exactly as their C counterparts.

The entire Allegro API has not been included. Since it is troublesome to access C structs and global variables directly in Perl, a number of get/set functions were added.

All of Allegro's (semi) opague data types have been turned into blessed objects via a T_PTROBJ typemap. This means that functions which return a pointer to some Allegro type will return a blessed hash reference. For example, al_load_bitmap will return an object of the type BITMAPPtr, which can then be passed to al_save_bitmap or blit. To get a NULL pointer, you will need to use the provided AL_NULL_BITMAP() and AL_NULL_PALETTE() constants.

Any functions taking or returning Allegro's fixed type will instead take and return regular Perl floating values. These will be converted back and forth to fixed automatically. Take care not to pass a number out of the fixed point range to these functions.

All of the Allegro functions are in the Allegro package. They are not exported by default. They can be exported with a :functions tag. The defines are prefixed with AL_, and are also in Allegro. These can be exported with :defines.

Example

This example loads a bitmap and displays it on the screen. Error checking has been omitted.

   use Allegro qw(:functions :defines);

   al_allegro_init();
   al_install_keyboard();
   al_set_color_depth(24);
   al_set_gfx_mode(AL_GFX_AUTODETECT(), 640, 480, 0, 0);

   $screen = al_get_screen();
   $b = al_load_bitmap("test.bmp", AL_NULL_PALETTE());

   blit($b, $screen, 0, 0, 0, 0, al_get_bitmap_width($b),
      al_get_bitmap_height($b));

   al_readkey();

Allegro API

Below is a list of all available Allegro functions. Unless noted these will simply call the low level C library function without any modification or verification. Therefore you need to be more careful than with the OO interface, as it is easy to crash Perl with a bad call to Allegro.

Allegro Functions

The following functions behave exactly as their C counterparts. See the Allegro documentation for details.

void al_acquire_bitmap(bmp)
void al_adjust_sample(spl, vol, pan, freq, loop)
void al_allegro_exit()
int al_allocate_voice(spl)
void al_arc(bmp, x, y, ang1, ang2, r, color)
int al_bitmap_color_depth(bmp)
int al_bitmap_mask_color(bmp)
void al_blit(source, dest, source_x, source_y, dest_x, dest_y, width, height)
int al_calibrate_joystick(n)
const char * al_calibrate_joystick_name(n)
void al_clear_bitmap(bitmap)
void al_clear_keybuf()
void al_clear_to_color(bitmap, color)
BITMAP * al_create_bitmap(width, height)
BITMAP * al_create_bitmap_ex(color_depth, width, height)
SAMPLE * al_create_sample(bits, stereo, freq, len)
BITMAP * al_create_sub_bitmap(parent, x, y, width, height)
BITMAP * al_create_system_bitmap(width, height)
BITMAP * al_create_video_bitmap(width, height)
void al_deallocate_voice(voice)
int al_desktop_color_depth()
void al_destroy_bitmap(bitmap)
void al_destroy_font(f)
void al_destroy_midi(midi)
void al_destroy_rle_sprite(sprite)
void al_destroy_sample(spl)
void al_draw_gouraud_sprite(bmp, sprite, x, y, c1, c2, c3, c4)
void al_draw_lit_rle_sprite(bmp, sprite, x, y, color)
void al_draw_lit_sprite(bmp, sprite, x, y, color)
void al_draw_rle_sprite(bmp, sprite, x, y)
void al_draw_sprite(bmp, sprite, x, y)
void al_draw_sprite_h_flip(bmp, sprite, x, y)
void al_draw_sprite_v_flip(bmp, sprite, x, y)
void al_draw_sprite_vh_flip(bmp, sprite, x, y)
void al_draw_trans_rle_sprite(bmp, sprite, x, y)
void al_draw_trans_sprite(bmp, sprite, x, y)
void al_drawing_mode(mode, pattern, x_anchor, y_anchor)
void al_ellipse(bmp, x, y, rx, ry, color)
void al_ellipsefill(bmp, x, y, rx, ry, color)
void al_fixup_datafile(data)
void al_floodfill(bmp, x, y, color)
int al_get_display_switch_mode()
void al_get_palette(p)
int al_get_refresh_rate()
RLE_SPRITE * al_get_rle_sprite(bitmap)
int al_get_sound_input_cap_bits()
int al_get_sound_input_cap_parm(rate, bits, stereo)
int al_get_sound_input_cap_rate(bits, stereo)
int al_get_sound_input_cap_stereo()
int al_geta(c)
int al_geta_depth(color_depth, c)
int al_getb(c)
int al_getb_depth(color_depth, c)
int al_getg(c)
int al_getg_depth(color_depth, c)
int al_getpixel(bmp, x, y)
int al_getr(c)
int al_getr_depth(color_depth, c)
void al_hline(bmp, x1, y, x2, color)
int al_install_joystick(type)
int al_install_keyboard()
int al_install_mouse()
int al_install_sound(digi, midi, cfg_path)
int al_install_sound_input(digi, midi)
int al_install_timer()
int al_is_memory_bitmap(bmp)
int al_is_same_bitmap(bmp1, bmp2)
int al_is_screen_bitmap(bmp)
int al_is_sub_bitmap(bmp)
int al_is_system_bitmap(bmp)
int al_is_video_bitmap(bmp)
int al_keypressed()
void al_line(bmp, x1, y1, x2, y2, color)
BITMAP * al_load_bitmap(filename, pal)
DATAFILE * al_load_datafile(filename)
DATAFILE * al_load_datafile_object(filename, objectname)
MIDI * al_load_midi(filename)
SAMPLE * al_load_sample(filename)
int al_makeacol(r, g, b, a)
int al_makeacol_depth(color_depth, r, g, b, a)
int al_makecol(r, g, b)
int al_makecol_depth(color_depth, r, g, b)
void al_masked_blit(source, dest, source_x, source_y, dest_x, dest_y, width, height)
void al_masked_stretch_blit(s, d, s_x, s_y, s_w, s_h, d_x, d_y, d_w, d_h)
void al_midi_pause()
void al_midi_resume()
int al_midi_seek(target)
int al_mouse_needs_poll()
void al_packfile_password(password)
void al_pivot_scaled_sprite(bmp, sprite, x, y, cx, cy, angle, scale)
void al_pivot_scaled_sprite_v_flip(bmp, sprite, x, y, cx, cy, angle, scale)
void al_pivot_sprite(bmp, sprite, x, y, cx, cy, angle)
void al_pivot_sprite_v_flip(bmp, sprite, x, y, cx, cy, angle)
int al_play_looped_midi(midi, loop_start, loop_end)
int al_play_midi(midi, loop)
int al_play_sample(spl, vol, pan, freq, loop)
int al_poll_joystick()
int al_poll_keyboard()
int al_poll_mouse()
void al_position_mouse(x, y)
void al_position_mouse_z(z)
void al_putpixel(bmp, x, y, color)
int al_read_sound_input(buffer)
void al_reallocate_voice(voice, spl)
void al_rect(bmp, x1, y1, x2, y2, color)
void al_rectfill(bmp, x1, y1, x2, y2, color)
void al_release_bitmap(bmp)
void al_release_voice(voice)
void al_remove_keyboard()
void al_remove_mouse()
void al_remove_sound()
void al_remove_sound_input()
void al_remove_timer()
void al_request_refresh_rate(rate)
void al_reserve_voices(digi_voices, midi_voices)
void al_rest(time)
void al_rotate_scaled_sprite(bmp, sprite, x, y, angle, scale)
void al_rotate_scaled_sprite_v_flip(bmp, sprite, x, y, angle, scale)
void al_rotate_sprite(bmp, sprite, x, y, angle)
void al_rotate_sprite_v_flip(bmp, sprite, x, y, angle)
int al_save_bitmap(filename, bmp, pal)
void al_scare_mouse()
void al_scare_mouse_area(x, y, w, h)
int al_scroll_screen(x, y)
void al_select_palette(p)
void al_set_alpha_blender()
void al_set_clip(bitmap, x1, y1, x2, y2)
void al_set_color_conversion(mode)
void al_set_color_depth(depth)
int al_set_display_switch_mode(mode)
int al_set_gfx_mode(card, w, h, v_w, v_h)
void al_set_keyboard_rate(delay, repeat)
void al_set_leds(leds)
void al_set_mouse_range(x1, y1, x2, y2)
void al_set_mouse_speed(xspeed, yspeed)
void al_set_mouse_sprite(sprite)
void al_set_mouse_sprite_focus(x, y)
void al_set_palette(p)
int al_set_sound_input_source(source)
void al_set_trans_blender(r, g, b, a)
void al_set_volume(digi_volume, midi_volume)
void al_set_volume_per_voice(scale)
void al_set_window_title(name)
void al_show_mouse(bmp)
int al_show_video_bitmap(bitmap)
int al_start_sound_input(rate, bits, stereo)
void al_stop_midi()
void al_stop_sample(spl)
void al_stop_sound_input()
void al_stretch_blit(s, d, s_x, s_y, s_w, s_h, d_x, d_y, d_w, d_h)
int al_text_height(f)
int al_text_length(f, str)
int al_text_mode(mode)
void al_textout(bmp, f, str, x, y, color)
void al_textout_centre(bmp, f, str, x, y, color)
void al_textout_justify(bmp, f, str, x1, x2, y, diff, color)
void al_textout_right(bmp, f, str, x, y, color)
void al_triangle(bmp, x1, y1, x2, y2, x3, y3, color)
void al_unload_datafile(dat)
void al_unload_datafile_object(dat)
void al_unscare_mouse()
void al_unselect_palette()
void al_vline(bmp, x, y1, y2, color)
SAMPLE * al_voice_check(voice)
int al_voice_get_frequency(voice)
int al_voice_get_pan(voice)
int al_voice_get_position(voice)
int al_voice_get_volume(voice)
void al_voice_set_frequency(voice, frequency)
void al_voice_set_playmode(voice, playmode)
void al_voice_set_position(voice, position)
void al_voice_set_priority(voice, priority)
void al_voice_set_volume(voice, volume)
void al_voice_start(voice)
void al_voice_stop(voice)
void al_vsync()

Modified/Additional Functions

The following functions have been added to help access various Allegro global variables or provide a Perl-friendly interface to Allegro functions.

int al_install_allegro(system)

This is similar to the real install_allegro, with the default values for the errno and atexit pointers.

int al_allegro_init()

Identical to allegro_init.

char * al_get_error()

Returns allegro_error[].

char * al_get_version()

Returns a text string (ALLEGRO_VERSION_STR).

FONT * al_get_system_font()

Returns the font pointer.

BITMAP * al_get_screen()

Returns the screen pointer.

void al_get_screen_size()

Returns the screen width, height, virtual width, virtual height.

   ($w, $h, $vw, $vh) = al_get_screen_size();
int al_get_gfx_capabilities()

Returns gfx_capabilites.

void al_allegro_message(text)

Identical to allegro_message.

void al_get_bitmap_size(bmp)

Returns bitmap width and height.

   ($w, $h) = al_get_bitmap_size($bmp);
void al_get_bitmap_clip(bmp)

Returns bmp->clip, bmp->cl, bmp->cr, bmp->ct, bmp->cb.

   ($enable, $l, $r, $t, $b) = al_get_bitmap_clip($bmp);
void al_get_rle_size(rle)

Returns RLE sprite width and height.

   ($w, $h) = al_get_rle_size($rle);
int al_get_rle_depth(rle)

Returns the color depth of an RLE sprite.

void al_polygon(bmp, color, ...)

Takes points as al_polygon(bmp, color, x1, y1, x2, y2, x3, y3, x4, y4, ...) and calls polygon.

void al_get_mouse_info()

Returns mouse_x, mouse_y, mouse_z, mouse_b.

   ($x, $y, $z, $b) = al_get_mouse_info();
void al_readkey()

Returns the ascii and scancode values from ureadkey.

   ($ascii, $scan) = al_readkey();
void al_simulate_keypress(scancode)

Calls simulate_ukeypress.

int al_get_key(k)

Returns a value from the key[] array.

int al_get_key_shifts()

Returns key_shifts.

int al_get_datafile_size(dat)

Returns the number of objects in a datafile.

int al_get_datafile_type(dat, i)

Returns the datafile type.

dat may be either a pointer to a datafile object or a pointer to an array of datafile objects.

i is the index into the array, or -1 if dat is a datafile pointer.

void * al_get_datafile_data(dat, i)

Returns the data pointer. dat and i are as in al_get_datafile_type.

const char * al_get_datafile_property(dat, i, str)

Returns the specified datafile property.

dat and i are as above. str is a string specifying the property. See the Allegro documentation for valid datafile properties.

int al_get_num_joysticks()

Returns num_joysticks.

void al_get_joystick_info(i)

Returns joy[i].flags, joy[i].num_sticks, joy[i].num_buttons, or undef if i is out of range.

   ($flags, $sticks, $buttons) = al_get_joystick_info($i);
void al_get_joystick_button_info(i, b)

Returns joy[i].button[b].b and joy[i].button[b].name, or undef if i or b are out of range.

   ($status, $name) = al_get_joystick_button($i, $b);
void al_get_joystick_stick_info(i, s)

Returns joy[i].stick[s].flags, joy[i].stick[s].num_axis, and joy[i].stick[s].name, or undef if i or s are out of of range.

   ($flags, $axes, $name) = al_get_joystick_info($i, $s);
void al_get_joystick_axis_info(i, s, a)

Returns analog position, digital position, and name of specified axis.

Analog is joy[i].stick[s].axis[a].pos. Digital is -1 for left/up, 1 for right/down, or 0 for centered (based on joy[i].stick[s].axis[a].d1 and d2). Name is joy[i].stick[s].axis[a].name.

   ($a, $d, $name) = al_get_joystick_info($i, $s, $a);
void al_set_freeze_mouse(status)

Sets freeze_mouse_flag to status.

void al_get_midi_info()

Returns midi_pos, midi_loop_start, midi_loop_end.

   ($pos, $start, $end) = al_get_midi_info();
RGB * al_create_palette()

Mallocs a new palette and returns it.

void al_destroy_palette(pal)

Frees a previously allocated palette.

void al_set_palette_color(pal, i, r, g, b)

Sets pal's index i to the specified color. Colors are 0-255 instead of Allegro's 0-63.

void al_get_palette_color(pal, i)

Returns pal's red, green, blue values for index i. Colors are 0-255 instead of Allegro's 0-63.

   ($r, $g, $b) = al_get_palette_color($pal, $i);
int al_create_timer()

Timers: the timer functions below use Allegro's timer system, but will not automatically call a Perl subroutine when fired.

They must be checked via al_get_timer_updates. See lib/Allegro/Timer.pm for an example.

Initializes a new timer. Returns an id to be used by the other timer routines below.

int al_start_timer(id, speed)

Starts a previously initialized timer.

id is the timer id and inteval is the time between timer updates. Returns true on success, false on failure.

int al_stop_timer(id)

Stops a timer.

id is the timer id.

int al_get_timer_updates(id)

Gets the number of times the timer code needs to be run.

id is the timer id.

int al_decrement_timer(id)

Decrements the update count. This should be called after each run of the timer code.

id is the timer id.

int al_id(id)

Returns an AL_ID from the specified (four-letter) string.

void al_destroy_color_map(colormap)

Destroys a previously created COLOR_MAP.

void al_set_color_map(colormap)

Sets color_map.

COLOR_MAP * al_get_color_map()

Retrieves color_map.

COLOR_MAP * al_create_color_map(pal)

Allocates and returns a COLOR_MAP created by create_blender_table() based on the current truecolor blender mode that is set.

Allegro Defines

The following are directly from the Allegro header files.

int AL_COLORCONV_15_TO_16()
int AL_COLORCONV_15_TO_24()
int AL_COLORCONV_15_TO_32()
int AL_COLORCONV_15_TO_8()
int AL_COLORCONV_16_TO_15()
int AL_COLORCONV_16_TO_24()
int AL_COLORCONV_16_TO_32()
int AL_COLORCONV_16_TO_8()
int AL_COLORCONV_24_TO_15()
int AL_COLORCONV_24_TO_16()
int AL_COLORCONV_24_TO_32()
int AL_COLORCONV_24_TO_8()
int AL_COLORCONV_32A_TO_15()
int AL_COLORCONV_32A_TO_16()
int AL_COLORCONV_32A_TO_24()
int AL_COLORCONV_32A_TO_8()
int AL_COLORCONV_32_TO_15()
int AL_COLORCONV_32_TO_16()
int AL_COLORCONV_32_TO_24()
int AL_COLORCONV_32_TO_8()
int AL_COLORCONV_8_TO_15()
int AL_COLORCONV_8_TO_16()
int AL_COLORCONV_8_TO_24()
int AL_COLORCONV_8_TO_32()
int AL_COLORCONV_DITHER_HI()
int AL_COLORCONV_DITHER_PAL()
int AL_COLORCONV_EXPAND_15_TO_16()
int AL_COLORCONV_KEEP_TRANS()
int AL_COLORCONV_NONE()
int AL_COLORCONV_REDUCE_16_TO_15()
int AL_DAT_BITMAP()
int AL_DAT_C_SPRITE()
int AL_DAT_DATA()
int AL_DAT_END()
int AL_DAT_FILE()
int AL_DAT_FLI()
int AL_DAT_FONT()
int AL_DAT_MAGIC()
int AL_DAT_MIDI()
int AL_DAT_NAME()
int AL_DAT_PALETTE()
int AL_DAT_PALLETE()
int AL_DAT_PATCH()
int AL_DAT_PROPERTY()
int AL_DAT_RLE_SPRITE()
int AL_DAT_SAMPLE()
int AL_DAT_XC_SPRITE()
int AL_DIGI_ALSA()
int AL_DIGI_ARTS()
int AL_DIGI_AUDIODRIVE()
int AL_DIGI_AUTODETECT()
int AL_DIGI_BEOS()
int AL_DIGI_ESD()
int AL_DIGI_MACOS()
int AL_DIGI_NONE()
int AL_DIGI_OSS()
int AL_DIGI_SB10()
int AL_DIGI_SB15()
int AL_DIGI_SB16()
int AL_DIGI_SB20()
int AL_DIGI_SBPRO()
int AL_DIGI_SOUNDSCAPE()
int AL_DIGI_VOICES()
int AL_DIGI_WINSOUNDSYS()
int AL_DRAW_MODE_COPY_PATTERN()
int AL_DRAW_MODE_MASKED_PATTERN()
int AL_DRAW_MODE_SOLID()
int AL_DRAW_MODE_SOLID_PATTERN()
int AL_DRAW_MODE_TRANS()
int AL_DRAW_MODE_XOR()
int AL_GFX_AUTODETECT()
int AL_GFX_AUTODETECT_FULLSCREEN()
int AL_GFX_AUTODETECT_WINDOWED()
int AL_GFX_BEOS()
int AL_GFX_BEOS_FULLSCREEN()
int AL_GFX_BEOS_FULLSCREEN_SAFE()
int AL_GFX_BEOS_WINDOWED()
int AL_GFX_BEOS_WINDOWED_SAFE()
int AL_GFX_CAN_SCROLL()
int AL_GFX_CAN_TRIPLE_BUFFER()
int AL_GFX_DIRECTX()
int AL_GFX_DIRECTX_ACCEL()
int AL_GFX_DIRECTX_OVL()
int AL_GFX_DIRECTX_SAFE()
int AL_GFX_DIRECTX_SOFT()
int AL_GFX_DIRECTX_WIN()
int AL_GFX_DRAWSPROCKET()
int AL_GFX_GDI()
int AL_GFX_HW_CURSOR()
int AL_GFX_HW_FILL()
int AL_GFX_HW_FILL_COPY_PATTERN()
int AL_GFX_HW_FILL_SOLID_PATTERN()
int AL_GFX_HW_FILL_XOR()
int AL_GFX_HW_GLYPH()
int AL_GFX_HW_HLINE()
int AL_GFX_HW_HLINE_COPY_PATTERN()
int AL_GFX_HW_HLINE_SOLID_PATTERN()
int AL_GFX_HW_HLINE_XOR()
int AL_GFX_HW_LINE()
int AL_GFX_HW_LINE_XOR()
int AL_GFX_HW_MEM_BLIT()
int AL_GFX_HW_MEM_BLIT_MASKED()
int AL_GFX_HW_SYS_TO_VRAM_BLIT()
int AL_GFX_HW_SYS_TO_VRAM_BLIT_MASKED()
int AL_GFX_HW_TRIANGLE()
int AL_GFX_HW_TRIANGLE_XOR()
int AL_GFX_HW_VRAM_BLIT()
int AL_GFX_HW_VRAM_BLIT_MASKED()
int AL_GFX_MODEX()
int AL_GFX_PHOTON()
int AL_GFX_PHOTON_DIRECT()
int AL_GFX_SAFE()
int AL_GFX_TEXT()
int AL_GFX_VBEAF()
int AL_GFX_VESA1()
int AL_GFX_VESA2B()
int AL_GFX_VESA2L()
int AL_GFX_VESA3()
int AL_GFX_VGA()
int AL_GFX_XDGA()
int AL_GFX_XDGA2()
int AL_GFX_XDGA2_SOFT()
int AL_GFX_XDGA_FULLSCREEN()
int AL_GFX_XTENDED()
int AL_GFX_XWINDOWS()
int AL_GFX_XWINDOWS_FULLSCREEN()
int AL_JOYFLAG_ANALOGUE()
int AL_JOYFLAG_CALIBRATE()
int AL_JOYFLAG_CALIB_ANALOGUE()
int AL_JOYFLAG_CALIB_DIGITAL()
int AL_JOYFLAG_DIGITAL()
int AL_JOYFLAG_SIGNED()
int AL_JOYFLAG_UNSIGNED()
int AL_JOY_HAT_CENTER()
int AL_JOY_HAT_CENTRE()
int AL_JOY_HAT_DOWN()
int AL_JOY_HAT_LEFT()
int AL_JOY_HAT_RIGHT()
int AL_JOY_HAT_UP()
int AL_JOY_TYPE_2PADS()
int AL_JOY_TYPE_4BUTTON()
int AL_JOY_TYPE_6BUTTON()
int AL_JOY_TYPE_8BUTTON()
int AL_JOY_TYPE_AUTODETECT()
int AL_JOY_TYPE_DB9_LPT1()
int AL_JOY_TYPE_DB9_LPT2()
int AL_JOY_TYPE_DB9_LPT3()
int AL_JOY_TYPE_FSPRO()
int AL_JOY_TYPE_GAMEPAD_PRO()
int AL_JOY_TYPE_GRIP()
int AL_JOY_TYPE_GRIP4()
int AL_JOY_TYPE_IFSEGA_ISA()
int AL_JOY_TYPE_IFSEGA_PCI()
int AL_JOY_TYPE_IFSEGA_PCI_FAST()
int AL_JOY_TYPE_LINUX_ANALOGUE()
int AL_JOY_TYPE_N64PAD_LPT1()
int AL_JOY_TYPE_N64PAD_LPT2()
int AL_JOY_TYPE_N64PAD_LPT3()
int AL_JOY_TYPE_NONE()
int AL_JOY_TYPE_PSXPAD_LPT1()
int AL_JOY_TYPE_PSXPAD_LPT2()
int AL_JOY_TYPE_PSXPAD_LPT3()
int AL_JOY_TYPE_SIDEWINDER()
int AL_JOY_TYPE_SIDEWINDER_AG()
int AL_JOY_TYPE_SNESPAD_LPT1()
int AL_JOY_TYPE_SNESPAD_LPT2()
int AL_JOY_TYPE_SNESPAD_LPT3()
int AL_JOY_TYPE_STANDARD()
int AL_JOY_TYPE_TURBOGRAFX_LPT1()
int AL_JOY_TYPE_TURBOGRAFX_LPT2()
int AL_JOY_TYPE_TURBOGRAFX_LPT3()
int AL_JOY_TYPE_WIN32()
int AL_JOY_TYPE_WINGEX()
int AL_JOY_TYPE_WINGWARRIOR()
int AL_KB_ACCENT1_FLAG()
int AL_KB_ACCENT2_FLAG()
int AL_KB_ACCENT3_FLAG()
int AL_KB_ACCENT4_FLAG()
int AL_KB_ALT_FLAG()
int AL_KB_CAPSLOCK_FLAG()
int AL_KB_CTRL_FLAG()
int AL_KB_EXTENDED()
int AL_KB_INALTSEQ_FLAG()
int AL_KB_LWIN_FLAG()
int AL_KB_MENU_FLAG()
int AL_KB_NORMAL()
int AL_KB_NUMLOCK_FLAG()
int AL_KB_RWIN_FLAG()
int AL_KB_SCROLOCK_FLAG()
int AL_KB_SHIFT_FLAG()
int AL_KEY_0()
int AL_KEY_0_PAD()
int AL_KEY_1()
int AL_KEY_1_PAD()
int AL_KEY_2()
int AL_KEY_2_PAD()
int AL_KEY_3()
int AL_KEY_3_PAD()
int AL_KEY_4()
int AL_KEY_4_PAD()
int AL_KEY_5()
int AL_KEY_5_PAD()
int AL_KEY_6()
int AL_KEY_6_PAD()
int AL_KEY_7()
int AL_KEY_7_PAD()
int AL_KEY_8()
int AL_KEY_8_PAD()
int AL_KEY_9()
int AL_KEY_9_PAD()
int AL_KEY_A()
int AL_KEY_ABNT_C1()
int AL_KEY_ALT()
int AL_KEY_ALTGR()
int AL_KEY_ASTERISK()
int AL_KEY_AT()
int AL_KEY_B()
int AL_KEY_BACKSLASH()
int AL_KEY_BACKSLASH2()
int AL_KEY_BACKSPACE()
int AL_KEY_C()
int AL_KEY_CAPSLOCK()
int AL_KEY_CIRCUMFLEX()
int AL_KEY_CLOSEBRACE()
int AL_KEY_COLON()
int AL_KEY_COLON2()
int AL_KEY_COMMA()
int AL_KEY_CONVERT()
int AL_KEY_D()
int AL_KEY_DEL()
int AL_KEY_DEL_PAD()
int AL_KEY_DOWN()
int AL_KEY_E()
int AL_KEY_END()
int AL_KEY_ENTER()
int AL_KEY_ENTER_PAD()
int AL_KEY_EQUALS()
int AL_KEY_ESC()
int AL_KEY_F()
int AL_KEY_F1()
int AL_KEY_F10()
int AL_KEY_F11()
int AL_KEY_F12()
int AL_KEY_F2()
int AL_KEY_F3()
int AL_KEY_F4()
int AL_KEY_F5()
int AL_KEY_F6()
int AL_KEY_F7()
int AL_KEY_F8()
int AL_KEY_F9()
int AL_KEY_G()
int AL_KEY_H()
int AL_KEY_HOME()
int AL_KEY_I()
int AL_KEY_INSERT()
int AL_KEY_J()
int AL_KEY_K()
int AL_KEY_KANA()
int AL_KEY_KANJI()
int AL_KEY_L()
int AL_KEY_LCONTROL()
int AL_KEY_LEFT()
int AL_KEY_LSHIFT()
int AL_KEY_LWIN()
int AL_KEY_M()
int AL_KEY_MAX()
int AL_KEY_MENU()
int AL_KEY_MINUS()
int AL_KEY_MINUS_PAD()
int AL_KEY_MODIFIERS()
int AL_KEY_N()
int AL_KEY_NOCONVERT()
int AL_KEY_NUMLOCK()
int AL_KEY_O()
int AL_KEY_OPENBRACE()
int AL_KEY_P()
int AL_KEY_PAUSE()
int AL_KEY_PGDN()
int AL_KEY_PGUP()
int AL_KEY_PLUS_PAD()
int AL_KEY_PRTSCR()
int AL_KEY_Q()
int AL_KEY_QUOTE()
int AL_KEY_R()
int AL_KEY_RCONTROL()
int AL_KEY_RIGHT()
int AL_KEY_RSHIFT()
int AL_KEY_RWIN()
int AL_KEY_S()
int AL_KEY_SCRLOCK()
int AL_KEY_SLASH()
int AL_KEY_SLASH_PAD()
int AL_KEY_SPACE()
int AL_KEY_STOP()
int AL_KEY_T()
int AL_KEY_TAB()
int AL_KEY_TILDE()
int AL_KEY_U()
int AL_KEY_UP()
int AL_KEY_V()
int AL_KEY_W()
int AL_KEY_X()
int AL_KEY_Y()
int AL_KEY_YEN()
int AL_KEY_Z()
int AL_MASK_COLOR_15()
int AL_MASK_COLOR_16()
int AL_MASK_COLOR_24()
int AL_MASK_COLOR_32()
int AL_MASK_COLOR_8()
int AL_MIDI_2XOPL2()
int AL_MIDI_ALSA()
int AL_MIDI_AUTODETECT()
int AL_MIDI_AWE32()
int AL_MIDI_BEOS()
int AL_MIDI_DIGMID()
int AL_MIDI_MPU()
int AL_MIDI_NONE()
int AL_MIDI_OPL2()
int AL_MIDI_OPL3()
int AL_MIDI_OSS()
int AL_MIDI_QUICKTIME()
int AL_MIDI_SB_OUT()
int AL_MIDI_TRACKS()
int AL_MIDI_VOICES()
int AL_MIDI_WIN32MAPPER()
int AL_PLAYMODE_BACKWARD()
int AL_PLAYMODE_BIDIR()
int AL_PLAYMODE_FORWARD()
int AL_PLAYMODE_LOOP()
int AL_PLAYMODE_PLAY()
int AL_SWITCH_AMNESIA()
int AL_SWITCH_BACKAMNESIA()
int AL_SWITCH_BACKGROUND()
int AL_SWITCH_IN()
int AL_SWITCH_NONE()
int AL_SWITCH_OUT()
int AL_SWITCH_PAUSE()
int AL_SYSTEM_AUTODETECT()
int AL_SYSTEM_BEOS()
int AL_SYSTEM_DIRECTX()
int AL_SYSTEM_DOS()
int AL_SYSTEM_LINUX()
int AL_SYSTEM_MACOS()
int AL_SYSTEM_NONE()
int AL_SYSTEM_QNX()
int AL_SYSTEM_XWINDOWS()

AUTHOR

Allegro has many contributors, a list of which can be found on the Allegro website.

This Perl module and accompanying documentation is by Colin O'Leary <colino@cpan.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.

HISTORY

0.02 ?

First official release.

0.01 Mon Oct 6 23:23:43 2003

First snapshot released; semi-complete.

0.00 Thu Nov 28 18:35:59 2002

Original version; created by h2xs 1.21 with options -A -n Allegro

SEE ALSO

Websites

Allegro-Perl website - http://alperl.mx3.org
Allegro website - http://alleg.sf.net

Object Manual Pages

Allegro::Bitmap
Allegro::Datafile
Allegro::Display
Allegro::Font
Allegro::Joystick
Allegro::Keyboard
Allegro::MIDI
Allegro::Mouse
Allegro::Sample
Allegro::Timer