| Description | uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
Allegro core.
This is the main module of the Allegro library. There are very different stuff on this unit, but procedures, functions, types, variables and constants are grouped to make it easer to find them. Read the Introduction section for a brief description of this unit.
| Name | Description |
|---|---|
record AL_JOYSTICK_AXIS_INFO |
This provides both analogue input in the pos field (ranging from -128 to 128 or from 0 to 255, depending on the type of the control), and digital values in the d1 and d2 fields. |
record AL_JOYSTICK_STICK_INFO |
information about one or more axis (a slider or directional control) |
record AL_JOYSTICK_BUTTON_INFO |
information about a joystick button. |
record AL_JOYSTICK_INFO |
information about an entire joystick. |
record AL_RGB |
Palette entry. |
record AL_RGB_MAP |
Stores an rgb map to accelerate conversions. |
record AL_BITMAP |
Stores the contents of a bitmap. |
record AL_RLE_SPRITE |
An RLE compressed sprite. |
record AL_MIDI |
A structure holding MIDI data. |
record AL_SAMPLE |
A sample structure, which holds sound data, used by the digital sample routines. |
FUNCTION AL_ID (str: SHORTSTRING): LONGINT; |
FUNCTION al_install (system_id: LONGINT): BOOLEAN; |
FUNCTION al_init: BOOLEAN; |
PROCEDURE al_exit; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_exit'; |
PROCEDURE al_message (CONST msg: STRING); |
FUNCTION al_set_close_button_callback (proc: AL_SIMPLE_PROC): BOOLEAN; INLINE; |
FUNCTION al_desktop_color_depth: LONGINT; INLINE; |
FUNCTION al_get_desktop_resolution (VAR w, h: LONGINT): BOOLEAN; INLINE; |
PROCEDURE al_set_window_title (CONST title: STRING); INLINE; |
PROCEDURE al_set_uformat (aType: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_uformat'; |
FUNCTION al_get_uformat: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_uformat'; |
PROCEDURE al_set_ucodepage (CONST table, extras: PWORD); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_ucodepage'; |
FUNCTION al_ustrlen (s: STRING): LONGINT; INLINE; |
PROCEDURE al_set_config_file (filename: STRING); INLINE; |
PROCEDURE al_set_config_data (data: POINTER; lng: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_config_data'; |
PROCEDURE al_override_config_file (filename: STRING); INLINE; |
PROCEDURE al_override_config_data (data: POINTER; lng: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'override_config_data'; |
PROCEDURE al_flush_config_file; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'flush_config_file'; |
PROCEDURE al_push_config_state; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'push_config_state'; |
PROCEDURE al_pop_config_state; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pop_config_state'; |
FUNCTION al_get_config_string (section, name, def: STRING): STRING; INLINE; |
FUNCTION al_get_config_int (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
FUNCTION al_get_config_hex (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
FUNCTION al_get_config_float (section, name: STRING; def: SINGLE): SINGLE; INLINE; |
FUNCTION al_get_config_id (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
PROCEDURE al_set_config_string (section, name, val: STRING); INLINE; |
PROCEDURE al_set_config_int (section, name: STRING; val: LONGINT); INLINE; |
PROCEDURE al_set_config_hex (section, name: STRING; val: LONGINT); INLINE; |
PROCEDURE al_set_config_float (section, name:STRING; val: SINGLE); INLINE; |
PROCEDURE al_set_config_id (section, name: STRING; val: LONGINT); INLINE; |
FUNCTION AL_SECS_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
FUNCTION AL_MSEC_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
FUNCTION AL_BPS_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
FUNCTION AL_BPM_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
FUNCTION al_install_timer: BOOLEAN; |
PROCEDURE al_remove_timer; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_timer'; |
FUNCTION al_install_int_ex (proc: AL_SIMPLE_PROC; speed: LONGINT): BOOLEAN; INLINE; |
FUNCTION al_install_int (proc: AL_SIMPLE_PROC; speed: LONGINT): BOOLEAN; INLINE; |
PROCEDURE al_remove_int (proc: AL_SIMPLE_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_int'; |
FUNCTION al_install_param_int_ex (proc: AL_PARAM_PROC; speed: LONGINT): BOOLEAN; INLINE; |
FUNCTION al_install_param_int (proc: AL_PARAM_PROC; speed: LONGINT): BOOLEAN; INLINE; |
PROCEDURE al_remove_param_int (proc: AL_PARAM_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_param_int'; |
PROCEDURE al_rest (time: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rest'; |
PROCEDURE al_rest_callback (time: LONGINT; callback: AL_PARAM_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rest_callback'; |
FUNCTION al_install_keyboard: BOOLEAN; |
PROCEDURE al_remove_keyboard; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_keyboard'; |
FUNCTION al_poll_keyboard: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_keyboard'; |
FUNCTION al_keyboard_needs_poll: BOOLEAN; INLINE; |
FUNCTION al_keypressed: BOOLEAN; INLINE; |
FUNCTION al_readkey: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'readkey'; |
FUNCTION al_ureadkey (VAR scancode: LONGINT): LONGINT; INLINE; |
PROCEDURE al_simulate_keypress (keycode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'simulate_keypress'; |
PROCEDURE al_simulate_ukeypress (keycode, scancode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'simulate_ukeypress'; |
PROCEDURE al_clear_keybuf; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_keybuf'; |
PROCEDURE al_set_leds (leds: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_leds'; |
PROCEDURE al_set_keyboard_rate (key_delay, key_repeat: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_keyboard_rate'; |
FUNCTION al_scancode_to_ascii (scancode: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scancode_to_ascii'; |
FUNCTION al_scancode_to_name (scancode: LONGINT): STRING; INLINE; |
FUNCTION al_install_joystick (atype: LONGINT): BOOLEAN; |
PROCEDURE al_remove_joystick; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_joystick'; |
FUNCTION al_calibrate_joystick_name (n: LONGINT): STRING; |
FUNCTION al_calibrate_joystick (n: LONGINT): BOOLEAN; |
FUNCTION al_save_joystick_data (filename: STRING): BOOLEAN; |
FUNCTION al_load_joystick_data (filename: STRING): BOOLEAN; |
FUNCTION al_poll_joystick: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_joystick'; |
FUNCTION al_makecol (r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol'; |
FUNCTION al_makecol8 (r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol8'; |
FUNCTION al_makecol_depth (color_depth, r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol_depth'; |
FUNCTION al_makeacol (r, g, b, a: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makeacol'; |
FUNCTION al_makeacol_depth (color_depth, r, g, b, a: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makeacol_depth'; |
FUNCTION al_getr (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getr'; |
FUNCTION al_getg (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getg'; |
FUNCTION al_getb (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getb'; |
FUNCTION al_geta (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'geta'; |
FUNCTION al_getr_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getr_depth'; |
FUNCTION al_getg_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getg_depth'; |
FUNCTION al_getb_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getb_depth'; |
FUNCTION al_geta_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'geta_depth'; |
PROCEDURE al_hsv_to_rgb (h, s, v: SINGLE; VAR r, g, b: LONGINT); INLINE; |
PROCEDURE al_rgb_to_hsv (r, g, b: LONGINT; VAR h, s, v: SINGLE); INLINE; |
PROCEDURE al_set_color (idx: LONGINT; p: AL_RGBptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color'; |
PROCEDURE al_set_palette (p: AL_PALETTE); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_palette'; |
PROCEDURE al_set_palette_range (p: AL_PALETTE; from, ato, vsync: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_palette_range'; |
PROCEDURE al_get_color (idx: LONGINT; p: AL_RGBptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color'; |
PROCEDURE al_get_palette (p: AL_PALETTEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_palette'; |
PROCEDURE al_get_palette_range (p: AL_PALETTEptr; from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_palette_range'; |
PROCEDURE al_fade_interpolate (source, dest: AL_PALETTE; aoutput: AL_PALETTEptr; apos, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_interpolate'; |
PROCEDURE al_fade_from_range (source, dest: AL_PALETTE; speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_from_range'; |
PROCEDURE al_fade_in_range (p: AL_PALETTE; speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_in_range'; |
PROCEDURE al_fade_out_range (speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_out_range'; |
PROCEDURE al_fade_from (source, dest: AL_PALETTE; speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_from'; |
PROCEDURE al_fade_in (p: AL_PALETTE; speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_in'; |
PROCEDURE al_fade_out (speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_out'; |
PROCEDURE al_select_palette (p: AL_PALETTE); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'select_palette'; |
PROCEDURE al_unselect_palette; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unselect_palette'; |
PROCEDURE al_generate_332_palette (p: AL_PALETTEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'generate_332_palette'; |
FUNCTION al_bestfit_color (pal: AL_PALETTE; r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'bestfit_color'; |
PROCEDURE al_create_rgb_table (table: AL_RGB_MAPptr; pal: AL_PALETTE; callback: AL_INT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_rgb_table'; |
FUNCTION al_create_bitmap (w, h: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_bitmap'; |
FUNCTION al_create_bitmap_ex (bpp, width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_bitmap_ex'; |
FUNCTION al_create_sub_bitmap (parent: AL_BITMAPptr; x, y, w, h: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_sub_bitmap'; |
FUNCTION al_create_video_bitmap (width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_video_bitmap'; |
FUNCTION al_create_system_bitmap (width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_system_bitmap'; |
PROCEDURE al_destroy_bitmap (bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_bitmap'; |
FUNCTION al_bitmap_color_depth (bmp: AL_BITMAPptr): LONGINT; INLINE; |
FUNCTION al_bitmap_mask_color (bmp: AL_BITMAPptr): LONGINT; INLINE; |
FUNCTION al_is_same_bitmap (bmp1, bmp2: AL_BITMAPptr): BOOLEAN; INLINE; |
FUNCTION al_is_memory_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
FUNCTION al_is_screen_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
FUNCTION al_is_video_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
FUNCTION al_is_system_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
FUNCTION al_is_sub_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
PROCEDURE al_acquire_bitmap (bmp: AL_BITMAPptr); INLINE; |
PROCEDURE al_release_bitmap (bmp: AL_BITMAPptr); INLINE; |
FUNCTION al_generate_optimized_palette (image: AL_BITMAPptr; pal: AL_PALETTEptr; rsvdcols: ARRAY OF BYTE): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'generate_optimized_palette'; |
FUNCTION al_load_bitmap (filename: STRING; pal: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bitmap'; |
FUNCTION al_load_bmp (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bmp'; |
FUNCTION al_load_lbm (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_lbm'; |
FUNCTION al_load_pcx (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_pcx'; |
FUNCTION al_load_tga (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_tga'; |
FUNCTION al_save_bitmap (filename: STRING; bmp: AL_BITMAPptr; pal: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_bitmap'; |
FUNCTION al_save_bmp (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_bmp'; |
FUNCTION al_save_pcx (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_pcx'; |
FUNCTION al_save_tga (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_tga'; |
FUNCTION al_install_mouse: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'install_mouse'; |
PROCEDURE al_remove_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_mouse'; |
FUNCTION al_poll_mouse: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_mouse'; |
FUNCTION al_mouse_needs_poll: BOOLEAN; INLINE; |
PROCEDURE al_enable_hardware_cursor; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'enable_hardware_cursor'; |
PROCEDURE al_disable_hardware_cursor; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'disable_hardware_cursor'; |
PROCEDURE al_select_mouse_cursor (cursor: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'select_mouse_cursor'; |
PROCEDURE al_set_mouse_cursor_bitmap (cursor: LONGINT; bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_cursor_bitmap'; |
PROCEDURE al_show_mouse (bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'show_mouse'; |
PROCEDURE al_set_mouse_sprite (sprite: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_sprite'; |
PROCEDURE al_set_mouse_sprite_focus (x, y: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_sprite_focus'; |
PROCEDURE al_position_mouse (x, y: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse'; |
PROCEDURE al_position_mouse_z (z: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse_z'; |
PROCEDURE al_position_mouse_w (w: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse_w'; |
PROCEDURE al_get_mouse_mickeys (VAR mickeyx, mickeyy: LONGINT); INLINE; |
PROCEDURE al_scare_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scare_mouse'; |
PROCEDURE al_scare_mouse_area (x, y, w, h: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scare_mouse_area'; |
PROCEDURE al_unscare_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unscare_mouse'; |
FUNCTION al_show_os_cursor (cursor: LONGINT): BOOLEAN; INLINE; |
PROCEDURE al_set_color_depth (depth: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color_depth'; |
FUNCTION al_get_color_depth: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color_depth'; |
PROCEDURE al_set_color_conversion (mode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color_conversion'; |
FUNCTION al_get_color_conversion: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color_conversion'; |
FUNCTION al_set_gfx_mode (card, w, h, v_w, v_h: LONGINT): BOOLEAN; |
PROCEDURE al_acquire_screen; INLINE; |
PROCEDURE al_release_screen; INLINE; |
FUNCTION al_show_video_bitmap (bmp: AL_BITMAPptr): LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'show_video_bitmap'; |
PROCEDURE al_vsync; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'vsync'; |
PROCEDURE al_set_clip_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_clip_rect'; |
PROCEDURE al_add_clip_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'add_clip_rect'; |
PROCEDURE al_get_clip_rect (bmp: AL_BITMAPptr; VAR x1, y1, x2, y2: LONGINT); |
PROCEDURE al_set_clip_state (bmp: AL_BITMAPptr; state: BOOLEAN); INLINE; |
PROCEDURE al_drawing_mode (mode: LONGINT; pattern: AL_BITMAPptr; x_anchor, y_anchor: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'drawing_mode'; |
PROCEDURE al_xor_mode (aOn: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'xor_mode'; |
PROCEDURE al_solid_mode; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'solid_mode'; |
PROCEDURE al_clear_bitmap (bitmap: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_bitmap'; |
PROCEDURE al_clear_to_color (bitmap: AL_BITMAPptr; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_to_color'; |
FUNCTION al_getpixel (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
FUNCTION _al_getpixel (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
FUNCTION _al_getpixel15 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
FUNCTION _al_getpixel16 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
FUNCTION _al_getpixel24 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
FUNCTION _al_getpixel32 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
PROCEDURE al_putpixel (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE _al_putpixel (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE _al_putpixel15 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE _al_putpixel16 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE _al_putpixel24 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE _al_putpixel32 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE al_vline (bmp: AL_BITMAPptr; x, y1, y2, color: LONGINT); INLINE; |
PROCEDURE al_hline (bmp: AL_BITMAPptr; x1, y, x2, color: LONGINT); INLINE; |
PROCEDURE al_line (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
PROCEDURE al_fastline (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
PROCEDURE al_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
PROCEDURE al_rectfill (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
PROCEDURE al_circle (bmp: AL_BITMAPptr; x, y, r, color: LONGINT); INLINE; |
PROCEDURE al_circlefill (bmp: AL_BITMAPptr; x, y, r, color: LONGINT); INLINE; |
PROCEDURE al_ellipse (bmp: AL_BITMAPptr; x, y, rx, ry, color: LONGINT); INLINE; |
PROCEDURE al_ellipsefill (bmp: AL_BITMAPptr; x, y, rx, ry, color: LONGINT); INLINE; |
PROCEDURE al_arc (bmp: AL_BITMAPptr; x, y: LONGINT; ang1, ang2: AL_FIXED; r, color: LONGINT); INLINE; |
PROCEDURE al_floodfill (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
PROCEDURE al_polygon (bmp: AL_BITMAPptr; vertices: LONGINT; CONST points: ARRAY OF LONGINT; color: LONGINT); INLINE; |
PROCEDURE al_triangle (bmp: AL_BITMAPptr; x1, y1, x2, y2, x3, y3, color: LONGINT); INLINE; |
PROCEDURE al_spline (bmp: AL_BITMAPptr; CONST points: ARRAY OF LONGINT; color: LONGINT); INLINE; |
PROCEDURE al_do_line (bmp: AL_BITMAPptr; x1, y1, x2, y2, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_line'; |
PROCEDURE al_do_circle (bmp: AL_BITMAPptr; x, y, radius, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_circle'; |
PROCEDURE al_do_ellipse (bmp: AL_BITMAPptr; x, y, rx, ry, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_ellipse'; |
PROCEDURE al_do_arc (bmp: AL_BITMAPptr; x, y: LONGINT; ang1, ang2: AL_FIXED; r, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_arc'; |
PROCEDURE al_calc_spline (CONST points: ARRAY OF LONGINT; npts: LONGINT; VAR x, y: ARRAY OF LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'calc_spline'; |
FUNCTION al_load_font (filename: STRING; palette: AL_PALETTEptr; p: POINTER) : AL_FONTptr; |
FUNCTION al_load_bitmap_font (filename: STRING; palette: AL_PALETTEptr; p: POINTER): POINTER; |
FUNCTION al_grab_font_from_bitmap (bmp: AL_BITMAPptr): AL_FONTptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'grab_font_from_bitmap'; |
FUNCTION al_is_color_font (f: AL_FONTptr): BOOLEAN; INLINE; |
FUNCTION al_is_mono_font (f: AL_FONTptr): BOOLEAN; INLINE; |
FUNCTION al_is_compatible_font (f1, f2: AL_FONTptr): BOOLEAN; INLINE; |
PROCEDURE al_destroy_font (f: AL_FONTptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_font'; |
PROCEDURE al_textout_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
PROCEDURE al_textout_centre_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
PROCEDURE al_textout_right_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
PROCEDURE al_textout_justify_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x1, x2, y, diff, color, bg: LONGINT); INLINE; |
FUNCTION al_text_length (f: AL_FONTptr; str: STRING): LONGINT; INLINE; |
FUNCTION al_text_height (f: AL_FONTptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'text_height'; |
PROCEDURE al_blit (source, dest: AL_BITMAPptr; source_x, source_y, dest_x, dest_y, width, height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'blit'; |
PROCEDURE al_stretch_blit (source, dest: AL_BITMAPptr; source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stretch_blit'; |
PROCEDURE al_masked_blit (source, dest: AL_BITMAPptr; source_x, source_y, dest_x, dest_y, width, height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'masked_blit'; |
PROCEDURE al_masked_stretch_blit (source, dest: AL_BITMAPptr; source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'masked_stretch_blit'; |
PROCEDURE al_draw_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
PROCEDURE al_stretch_sprite (bmp, sprite: AL_BITMAPptr; x, y, w, h: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stretch_sprite'; |
PROCEDURE al_draw_sprite_ex (bmp, sprite: AL_BITMAPptr; x, y, mode, flip: LONGINT); INLINE; |
PROCEDURE al_draw_sprite_h_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_sprite_vh_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_trans_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_lit_sprite (bmp, sprite: AL_BITMAPptr; x, y, c: LONGINT); INLINE; |
PROCEDURE al_draw_gouraud_sprite (bmp, sprite: AL_BITMAPptr; x, y, c1, c2, c3, c4: LONGINT); INLINE; |
PROCEDURE al_rotate_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); INLINE; |
PROCEDURE al_rotate_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); INLINE; |
PROCEDURE al_rotate_scaled_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); INLINE; |
PROCEDURE al_rotate_scaled_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); INLINE; |
PROCEDURE al_pivot_sprite (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); INLINE; |
PROCEDURE al_pivot_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); INLINE; |
PROCEDURE al_pivot_scaled_sprite (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); INLINE; |
PROCEDURE al_pivot_scaled_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); INLINE; |
PROCEDURE al_rotate_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_trans'; |
PROCEDURE al_rotate_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_v_flip_trans'; |
PROCEDURE al_rotate_scaled_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_trans'; |
PROCEDURE al_rotate_scaled_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_v_flip_trans'; |
PROCEDURE al_pivot_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_trans'; |
PROCEDURE al_pivot_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_v_flip_trans'; |
PROCEDURE al_pivot_scaled_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_trans'; |
PROCEDURE al_pivot_scaled_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_v_flip_trans'; |
PROCEDURE al_rotate_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_lit'; |
PROCEDURE al_rotate_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_v_flip_lit'; |
PROCEDURE al_rotate_scaled_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_lit'; |
PROCEDURE al_rotate_scaled_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_v_flip_lit'; |
PROCEDURE al_pivot_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_lit'; |
PROCEDURE al_pivot_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_v_flip_lit'; |
PROCEDURE al_pivot_scaled_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_lit'; |
PROCEDURE al_pivot_scaled_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_v_flip_lit'; |
FUNCTION al_get_rle_sprite (bitmap: AL_BITMAPptr): AL_RLE_SPRITEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_rle_sprite'; |
PROCEDURE al_destroy_rle_sprite (sprite: AL_RLE_SPRITEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_rle_sprite'; |
PROCEDURE al_draw_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_trans_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y: LONGINT); INLINE; |
PROCEDURE al_draw_lit_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y, color: LONGINT); INLINE; |
PROCEDURE al_reserve_voices (digi_voices, midi_voices: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'reserve_voices'; |
PROCEDURE al_set_volume_per_voice (scale: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_volume_per_voice'; |
FUNCTION al_install_sound (digi, midi: LONGINT): BOOLEAN; |
PROCEDURE al_remove_sound; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_sound'; |
PROCEDURE al_set_volume (digi, midi: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_volume'; |
PROCEDURE al_set_hardware_volume (digi, midi: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_hardware_volume'; |
PROCEDURE al_get_volume (VAR digi, midi: LONGINT); INLINE; |
PROCEDURE al_get_hardware_volume (VAR digi, midi: LONGINT); INLINE; |
PROCEDURE al_set_mixer_quality (quality: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mixer_quality'; |
FUNCTION al_get_mixer_quality: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_quality'; |
FUNCTION al_get_mixer_frequency: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_frequency'; |
FUNCTION al_get_mixer_bits: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_bits'; |
FUNCTION al_get_mixer_channels: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_channels'; |
FUNCTION al_get_mixer_voices: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_voices'; |
FUNCTION al_get_mixer_buffer_length: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_buffer_length'; |
FUNCTION al_load_midi (filename: STRING): AL_MIDIptr; |
PROCEDURE al_destroy_midi (midi: AL_MIDIptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_midi'; |
FUNCTION al_play_midi (midi: AL_MIDIptr; loop: BOOLEAN): BOOLEAN; INLINE; |
FUNCTION al_play_looped_midi (midi: AL_MIDIptr; loop_start, loop_end: LONGINT): BOOLEAN; INLINE; |
PROCEDURE al_stop_midi; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stop_midi'; |
PROCEDURE al_midi_pause; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_pause'; |
PROCEDURE al_midi_resume; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_resume'; |
FUNCTION al_midi_seek(target: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_seek'; |
FUNCTION al_get_midi_length (midi: AL_MIDIptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_midi_length'; |
PROCEDURE al_midi_out (data: POINTER; length: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_out'; |
FUNCTION al_load_midi_patches: BOOLEAN; INLINE; |
FUNCTION al_load_sample (filename: STRING): AL_SAMPLEptr; |
FUNCTION al_load_wav (filename: STRING): AL_SAMPLEptr; |
FUNCTION al_load_voc (filename: STRING): AL_SAMPLEptr; |
FUNCTION al_create_sample (bits, stereo, freq, len: LONGINT): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_sample'; |
FUNCTION al_save_sample (filename: STRING; spl: AL_SAMPLEptr): BOOLEAN; |
PROCEDURE al_destroy_sample (spl: AL_SAMPLEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_sample'; |
FUNCTION al_play_sample (spl: AL_SAMPLEptr; vol, pan, freq, loop: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'play_sample'; |
PROCEDURE al_adjust_sample (spl: AL_SAMPLEptr; vol, pan, freq, loop: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'adjust_sample'; |
PROCEDURE al_stop_sample (spl: AL_SAMPLEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stop_sample'; |
PROCEDURE al_register_sample_file_type (ext: STRING; load: AL_SAMPLE_LOAD_FUNC; save: AL_SAMPLE_SAVE_FUNC); |
AL_JOYSTICK_INFOptr = ˆAL_JOYSTICK_INFO; |
AL_RGBptr = ˆAL_RGB; |
AL_PALETTE_DICTptr = ˆAL_PALETTE_DICT; |
AL_PALETTE_DICT = ARRAY [0..255] OF LONGINT; |
AL_PALETTEptr = ˆAL_PALETTE; |
AL_PALETTE = ARRAY [0..AL_PAL_SIZE-1] OF AL_RGB; |
AL_RGB_MAPptr = ˆAL_RGB_MAP; |
AL_BITMAPptr = ˆAL_BITMAP; |
AL_POINT_PROC = PROCEDURE (bmp: AL_BITMAPptr; x, y, c: LONGINT); CDECL; |
AL_FONTptr = POINTER; |
AL_RLE_SPRITEptr = ˆAL_RLE_SPRITE; |
AL_MIDIptr = ˆAL_MIDI; |
AL_MIDI_MSG_CALLBACK_PROC = PROCEDURE (msg, b1, b2: LONGINT); CDECL; |
AL_SAMPLEptr = ˆAL_SAMPLE; |
AL_SAMPLE_LOAD_FUNC = FUNCTION (filename: PCHAR): AL_SAMPLEptr; CDECL; |
AL_SAMPLE_SAVE_FUNC = FUNCTION (filename: PCHAR; spl: AL_SAMPLEptr): LONGINT; CDECL; |
al_errno: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_errno'; |
al_error: STRING; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_error'; |
al_id_string: STRING; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_id'; |
AL_U_ASCII: LONGINT; |
AL_U_ASCII_CP: LONGINT; |
AL_U_UNICODE: LONGINT; |
AL_U_UTF8: LONGINT; |
AL_U_CURRENT: LONGINT; |
al_retrace_count: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'retrace_count'; |
al_key: AL_KEY_LIST; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key'; |
al_key_shifts: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key_shifts'; |
al_three_finger_flag: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'three_finger_flag'; |
al_key_led_flag: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key_led_flag'; |
al_keyboard_lowlevel_callback: AL_INT_PROC; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'keyboard_lowlevel_callback'; |
al_joy: AL_JOYSTICK_INFO_LIST; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'joy'; |
al_num_joysticks: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'num_joysticks'; |
al_palette_color: AL_PALETTE_DICTptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'palette_color'; |
al_black_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'black_palette'; |
al_desktop_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'desktop_palette'; |
al_default_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'default_palette'; |
al_rgb_table: AL_RGB_MAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rgb_map'; |
al_mouse_x: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_x'; |
al_mouse_y: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_y'; |
al_mouse_z: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_z'; |
al_mouse_w: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_w'; |
al_mouse_b: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_b'; |
al_mouse_pos: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_pos'; |
al_mouse_sprite: AL_BITMAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_sprite'; |
al_mouse_x_focus: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_x_focus'; |
al_mouse_y_focus: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_y_focus'; |
al_gfx_capabilities: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'gfx_capabilities'; |
al_screen: AL_BITMAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'screen'; |
AL_SCREEN_W: LONGINT; |
AL_SCREEN_H: LONGINT; |
AL_VIRTUAL_W: LONGINT; |
AL_VIRTUAL_H: LONGINT; |
al_font: AL_FONTptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'font'; |
al_404_char: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_404_char'; |
al_midi_pos: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_pos'; |
al_midi_time: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_time'; |
al_midi_loop_start: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_loop_start'; |
al_midi_loop_end: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_loop_end'; |
al_midi_msg_callback: AL_MIDI_MSG_CALLBACK_PROC; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_msg_callback'; |
FUNCTION al_install (system_id: LONGINT): BOOLEAN; |
|
Initialises the Allegro library. You must call either this or al_init before doing anything other. The functions that can be called before this one will be marked explicitly in the documentation, like The available system ID codes will vary from one platform to another, but you will almost always want to pass Parameters
Returns
|
FUNCTION al_init: BOOLEAN; |
|
Function which initialises the Allegro library. This is the same thing as calling Returns
|
PROCEDURE al_exit; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_exit'; |
|
Closes down the Allegro system. This includes returning the system to text mode and removing whatever mouse, keyboard, and timer routines have been installed. This procedure must be called before exit the program. Note that after you call this function, other functions like al_destroy_bitmap will most likely crash. |
PROCEDURE al_message (CONST msg: STRING); |
|
Outputs a message. Usually you want to use this to report messages to the user in an OS independant way when some Allegro subsystem cannot be initialised. But you must not use this function if you are in a graphic mode, only before calling On platforms featuring a windowing system, it will bring up a blocking GUI message box. If there is no windowing system, it will try to print the string to a text console, attempting to work around codepage differences by reducing any accented characters to 7-bit ASCII approximations. Example: IF NOT al_init THEN EXIT (1); IF NOT init_my_data THEN BEGIN al_message ('Sorry, missing game data!\n'); EXIT (2); END; |
FUNCTION al_set_close_button_callback (proc: AL_SIMPLE_PROC): BOOLEAN; INLINE; |
|
On platforms that have a close button, this routine installs a callback function to handle the close event. In other words, when the user clicks the close button on your program's window or any equivalent device, the function you specify here will be called. This function should not generally attempt to exit the program or save any data itself. The function could be called at any time, and there is usually a risk of conflict with the main thread of the program. Instead, you should set a flag during this function, and test it on a regular basis in the main loop of the program. Pass Example: VAR CloseButtonPressed: BOOLEAN = FALSE; PROCEDURE CloseButtonHandler; CDECL; BEGIN ClosePuttonPressed := TRUE; END; ... al_init; al_set_close_button_callback (@CloseButtonHandler); ... WHILE NOT ClosePuttonPressed DO DoStuff;
Returns
|
FUNCTION al_desktop_color_depth: LONGINT; INLINE; |
|
Finds out the currently selected desktop color depth. You can use this information to make your program use the same color depth as the desktop, which will likely make it run faster because the graphic driver won't be doing unnecessary color conversions behind your back. Under some OSes, switching to a full screen graphics mode may automatically change the desktop color depth. You have, therefore, to call this function before setting any graphics mode in order to retrieve the real desktop color depth. Returnsthe color depth or zero on platforms where this information is not available or does not apply. |
PROCEDURE al_set_window_title (CONST title: STRING); INLINE; |
|
On platforms that are capable of it, this routine alters the window title for your Allegro program. Parameters
|
PROCEDURE al_set_uformat (aType: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_uformat'; |
|
Sets the current text encoding format. This will affect all parts of Allegro, wherever you see a function that returns a string, or takes a string as a parameter. Although you can change the text format on the fly, this is not a good idea. Many strings, for example the names of your hardware drivers and any language translations, are loaded when you call Parameters
|
FUNCTION al_get_uformat: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_uformat'; |
|
Finds out what text encoding format is currently selected. This function is probably useful only if you are writing an Allegro addon dealing with text strings and you use a different codepath for each possible format.
ReturnsThe currently selected text encoding format. See also
|
PROCEDURE al_set_ucodepage (CONST table, extras: PWORD); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_ucodepage'; |
|
When you select the Allegro will use the Note that Allegro comes with a default parameters set internally. The default Parameters
|
FUNCTION al_ustrlen (s: STRING): LONGINT; INLINE; |
|
Returns the number of characters in the string. Note that this doesn't have to equal the string's size in bytes. |
PROCEDURE al_set_config_file (filename: STRING); INLINE; |
|
Sets the configuration file to be used by all subsequent config functions. (Allegro will not search for this file in other locations as it does with allegro.cfg at the time of initialization.) All pointers returned by previous calls to |
PROCEDURE al_set_config_data (data: POINTER; lng: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_config_data'; |
|
Specifies a block of data to be used by all subsequent config functions, which you have already loaded from disk (eg. as part of some more complicated format of your own, or in a grabber datafile). This routine makes a copy of the information, so you can safely free the data after calling it. |
PROCEDURE al_override_config_file (filename: STRING); INLINE; |
|
Specifies a file containing config overrides. These settings will be used in addition to the parameters in the main config file, and where a variable is present in both files this version will take priority. This can be used by application programmers to override some of the config settings from their code, while still leaving the main config file free for the end user to customise. For example, you could specify a particular sample frequency and IBK instrument file, but the user could still use an The override config file will not only take precedence when reading, but will also be used for storing values. When you are done with using the override config file, you can call Note: The override file is completely independent from the current configuration. You can e.g. call Note that this function and |
PROCEDURE al_override_config_data (data: POINTER; lng: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'override_config_data'; |
|
Version of Note that this function and |
PROCEDURE al_push_config_state; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'push_config_state'; |
|
Pushes the current configuration state (filename, variable values, etc). onto an internal stack, allowing you to select some other config source and later restore the current settings by calling |
PROCEDURE al_pop_config_state; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pop_config_state'; |
|
Pops a configuration state previously stored by |
FUNCTION al_get_config_string (section, name, def: STRING): STRING; INLINE; |
|
Retrieves a string variable from the current config file. The section name may be set to an empty string to read variables from the root of the file, or used to control which set of parameters (eg. sound or joystick) you are interested in reading. Example: VAR Lang: STRING; ... Lang := al_get_config_string ('system', 'language', 'EN');
Returnsthe string to the constant string found in the configuration file. If the named variable cannot be found, or its entry in the config file is empty, the value of |
FUNCTION al_get_config_int (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
|
Reads an integer variable from the current config file. See the comments about |
FUNCTION al_get_config_hex (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
|
Reads an integer variable from the current config file, in hexadecimal. See the comments about |
FUNCTION al_get_config_float (section, name: STRING; def: SINGLE): SINGLE; INLINE; |
|
Reads a floating point variable from the current config file. See the comments about |
FUNCTION al_get_config_id (section, name: STRING; def: LONGINT): LONGINT; INLINE; |
|
Reads a 4-letter driver ID variable from the current config file. See the comments about |
PROCEDURE al_set_config_string (section, name, val: STRING); INLINE; |
|
Writes a string variable to the current config file, replacing any existing value it may have, or removes the variable if As a special case, variable or section names that begin with a '#' character are treated specially and will not be read from or written to the disk. Addon packages can use this to store version info or other status information into the config module, from where it can be read with the |
PROCEDURE al_set_config_int (section, name: STRING; val: LONGINT); INLINE; |
|
Writes an integer variable to the current config file. See the comments about |
PROCEDURE al_set_config_hex (section, name: STRING; val: LONGINT); INLINE; |
|
Writes an integer variable to the current config file, in hexadecimal format. See the comments about |
PROCEDURE al_set_config_float (section, name:STRING; val: SINGLE); INLINE; |
|
Writes a floating point variable to the current config file. See the comments about |
PROCEDURE al_set_config_id (section, name: STRING; val: LONGINT); INLINE; |
|
Writes a 4-letter driver ID variable to the current config file. See the comments about |
FUNCTION AL_SECS_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
|
Give the number of seconds between each tick to |
FUNCTION AL_MSEC_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
|
Give the number of milliseconds between each tick to |
FUNCTION AL_BPS_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
|
Give the number of ticks each second to |
FUNCTION AL_BPM_TO_TIMER (x: LONGINT): LONGINT; INLINE; |
|
Give the number of ticks each minute to |
FUNCTION al_install_timer: BOOLEAN; |
|
Installs the Allegro timer interrupt handler. You must do this before installing any user timer routines, and also before displaying a mouse pointer and playing FLI animations or MIDI music. Returns
|
PROCEDURE al_remove_timer; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_timer'; |
|
Removes the Allegro timer handler. You don't normally need to bother calling this, because |
FUNCTION al_install_int_ex (proc: AL_SIMPLE_PROC; speed: LONGINT): BOOLEAN; INLINE; |
|
Adds a function to the list of user timer handlers or, if it is already installed, retroactively adjusts its speed (i.e makes as though the speed change occurred precisely at the last tick). The speed is given in hardware clock ticks, of which there are 1193181 a second. You can convert from other time formats to hardware clock ticks with the functions There can only be sixteen timers in use at a time, and some other parts of Allegro (the mouse pointer display routines, Your function will be called by the Allegro interrupt handler and not directly by the processor, so it can be a normal Returns
|
FUNCTION al_install_int (proc: AL_SIMPLE_PROC; speed: LONGINT): BOOLEAN; INLINE; |
|
Installs a user timer handler, with the speed given as the number of milliseconds between ticks. This is the same thing as Returns
|
PROCEDURE al_remove_int (proc: AL_SIMPLE_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_int'; |
|
Removes a function from the list of user interrupt routines. |
FUNCTION al_install_param_int_ex (proc: AL_PARAM_PROC; speed: LONGINT): BOOLEAN; INLINE; |
|
Like |
FUNCTION al_install_param_int (proc: AL_PARAM_PROC; speed: LONGINT): BOOLEAN; INLINE; |
|
Like |
PROCEDURE al_remove_param_int (proc: AL_PARAM_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_param_int'; |
|
Like |
PROCEDURE al_rest_callback (time: LONGINT; callback: AL_PARAM_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rest_callback'; |
|
Like |
FUNCTION al_install_keyboard: BOOLEAN; |
|
Installs the Allegro keyboard interrupt handler. You must call this before using any of the keyboard input routines. Once you have set up the Allegro handler, you can no longer use operating system calls or the run-time library functions to access the keyboard. Note that on some platforms the keyboard won't work unless you have set a graphics mode, even if this function returns a success value before calling Returns
|
PROCEDURE al_remove_keyboard; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_keyboard'; |
|
Removes the keyboard handler, returning control to the operating system. You don't normally need to bother calling this, because |
FUNCTION al_poll_keyboard: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_keyboard'; |
|
Wherever possible, Allegro will read the keyboard input asynchronously (ie. from inside an interrupt handler), but on some platforms that may not be possible, in which case you must call this routine at regular intervals to update the keyboard state variables. To help you test your keyboard polling code even if you are programming on a platform that doesn't require it, after the first time that you call this function Allegro will switch into polling mode, so from that point onwards you will have to call this routine in order to get any keyboard input at all, regardless of whether the current driver actually needs to be polled or not. The Returnszero on success or a negative on failure (ie. no keyboard driver installed). |
FUNCTION al_keyboard_needs_poll: BOOLEAN; INLINE; |
|
Returns |
FUNCTION al_keypressed: BOOLEAN; INLINE; |
|
Returns WHILE NOT al_keypressed DO AnimateLogo (al_screen); |
FUNCTION al_readkey: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'readkey'; |
|
Returns the next character from the keyboard buffer, in ASCII format. If the buffer is empty, it waits until a key is pressed. You can see if there are queued keypresses with The low byte of the return value contains the ASCII code of the key, and the high byte the scancode. The scancode remains the same whatever the state of the shift, ctrl and alt keys, while the ASCII code is affected by shift and ctrl in the normal way (shift changes case, ctrl+letter gives the position of that letter in the alphabet, eg. ctrl+A = 1, ctrl+B = 2, etc). Pressing alt+key returns only the scancode, with a zero ASCII code in the low byte. For example: VAR val: INTEGER; ... val := al_readkey; IF (val AND $ff) = ORD ('d') THEN al_message ('You pressed "d"'); IF (val SHR 8) = AL_KEY_SPACE THEN al_message ('You pressed Space'); IF (val AND $ff) = 3 THEN al_message ('You pressed Control+C'); IF val = (AL_KEY_X LSH 8) THEN al_message ('You pressed Alt+X');
This function cannot return character values greater than 255. If you need to read Unicode input, use See also
|
FUNCTION al_ureadkey (VAR scancode: LONGINT): LONGINT; INLINE; |
|
Returns the next character from the keyboard buffer, in Unicode format. If the buffer is empty, it waits until a key is pressed. You can see if there are queued keypresses with VAR val, scancode: INTEGER; ... val := al_ureadkey (scancode); IF val = $00F1 THEN al_message ('You pressed n with tilde'); IF val = $00DF THEN al_message ('You pressed sharp s');
You should be able to find Unicode character maps at http://www.unicode.org/. |
PROCEDURE al_simulate_keypress (keycode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'simulate_keypress'; |
|
Stuffs a key into the keyboard buffer, just as if the user had pressed it. The parameter is in the same format returned by |
PROCEDURE al_simulate_ukeypress (keycode, scancode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'simulate_ukeypress'; |
|
Stuffs a key into the keyboard buffer, just as if the user had pressed it. The parameter is in the same format returned by |
PROCEDURE al_clear_keybuf; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_keybuf'; |
|
Empties the keyboard buffer. Usually you want to use this in your program before reading keys to avoid previously buffered keys to be returned by calls to |
PROCEDURE al_set_leds (leds: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_leds'; |
|
Overrides the state of the keyboard LED indicators. The parameter is a bitmask containing any of the values Note that the led behaviour cannot be guaranteed on some platforms, some leds might not react, or none at all. Therefore you shouldn't rely only on them to communicate information to the user, just in case it doesn't get through. |
PROCEDURE al_set_keyboard_rate (key_delay, key_repeat: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_keyboard_rate'; |
|
Sets the keyboard repeat rate. Times are given in milliseconds. Passing zero times will disable the key repeat. |
FUNCTION al_scancode_to_ascii (scancode: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scancode_to_ascii'; |
|
Converts the given scancode to an ASCII character for that key (mangling Unicode values), returning the unshifted uncapslocked result of pressing the key, or zero if the key isn't a character-generating key or the lookup can't be done. The lookup cannot be done for keys like the F1-F12 keys or the cursor keys, and some drivers will only return approximate values. Generally, if you want to display the name of a key to the user, you should use the |
FUNCTION al_install_joystick (atype: LONGINT): BOOLEAN; |
|
Installs Allegro's joystick handler, and calibrates the centre position values. The type parameter should usually be al_textout_centre_ex (al_screen, al_font, 'Center the joystick and press a key.', AL_SCREEN_W DIV 2, SCREEN_H DIV 2, red_color, -1); al_readkey; IF NOT al_install_joystick (AL_JOY_TYPE_AUTODETECT) THEN abort_on_error ('Error initialising joystick!'); ; Returns
|
PROCEDURE al_remove_joystick; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_joystick'; |
|
Removes the joystick handler. You don't normally need to bother calling this, because |
FUNCTION al_calibrate_joystick_name (n: LONGINT): STRING; |
|
Pass the number of the joystick you want to calibrate as the parameter. Returnsa text description for the next type of calibration that will be done on the specified joystick, or empty string if no more calibration is required. |
FUNCTION al_calibrate_joystick (n: LONGINT): BOOLEAN; |
|
Most joysticks need to be calibrated before they can provide full analogue input. This function performs the next operation in the calibration series for the specified stick, assuming that the joystick has been positioned in the manner described by a previous call to FUNCTION CalibrateJoysticks: BOOLEAN VAR Cnt: INTEGER; BEGIN FOR Cnt := 1 TO al_num_joysticks DO BEGIN WHILE (al_joy[Cnt - 1].flags AND AL_JOYFLAG_CALIBRATE) <> 0 DO BEGIN al_textout_ex (..., al_calibrate_joystick_name (Cnt - 1) + ', and press a key', ...); al_readkey; IF NOT al_calibrate_joystick (i - 1) THEN BEGIN al_textout_ex (..., 'oops!', ...); al_readkey; RESULT := FALSE; EXIT; END; END; END; RESULT := TRUE; END;
Returns
|
FUNCTION al_save_joystick_data (filename: STRING): BOOLEAN; |
|
After all the headache of calibrating the joystick, you may not want to make your poor users repeat the process every time they run your program. Call this function to save the joystick calibration data into the specified configuration file, from which it can later be read by Returns
|
FUNCTION al_load_joystick_data (filename: STRING): BOOLEAN; |
|
Restores calibration data previously stored by Returns
|
FUNCTION al_poll_joystick: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_joystick'; |
|
The joystick handler is not interrupt driven, so you need to call this function every now and again to update the global position values. Returnszero on success or a negative number on failure (usually because no joystick driver was installed). |
FUNCTION al_makecol (r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol'; |
|
Converts colors from a hardware independent format (red, green, and blue values ranging 0-255) to the pixel format required by the current video mode, calling the preceding 8, 15, 16, 24, or 32-bit makecol functions as appropriate. Returnsthe requested RGB triplet in the current color depth. |
FUNCTION al_makecol8 (r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol8'; |
|
Converts colors from a hardware independent form (red, green, and blue values ranging 0-255) into 8-bit color index. Converting to an 8-bit color involves searching the palette to find the closest match, which is quite slow unless you have set up an RGB mapping table. Returnsthe requested RGB triplet in the specified color depth. |
FUNCTION al_makecol_depth (color_depth, r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makecol_depth'; |
|
Converts colors from a hardware independent format (red, green, and blue values ranging 0-255) to the pixel format required by the specified color depth. Returnsthe requested RGB triplet in the specified color depth. |
FUNCTION al_makeacol (r, g, b, a: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makeacol'; |
|
Convert RGBA colors into display dependent pixel formats. In anything less than a 32-bit mode, these are the same as calling Returnsthe requested RGBA quadruplet. |
FUNCTION al_makeacol_depth (color_depth, r, g, b, a: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'makeacol_depth'; |
FUNCTION al_getr (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getr'; |
|
Given a color in the format being used by the current video mode, these functions extract one of the red, green, blue, or alpha components (ranging 0-255), calling the preceding 8, 15, 16, 24, or 32-bit get functions as appropriate. The alpha part is only meaningful for 32-bit pixels. |
FUNCTION al_getg (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getg'; |
FUNCTION al_getb (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getb'; |
FUNCTION al_geta (c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'geta'; |
FUNCTION al_getr_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getr_depth'; |
|
Given a color in the format being used by the specified color depth, these functions extract one of the red, green, blue, or alpha components (ranging 0-255). The alpha part is only meaningful for 32-bit pixels. |
FUNCTION al_getg_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getg_depth'; |
FUNCTION al_getb_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'getb_depth'; |
FUNCTION al_geta_depth (color_depth, c: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'geta_depth'; |
PROCEDURE al_hsv_to_rgb (h, s, v: SINGLE; VAR r, g, b: LONGINT); INLINE; |
|
Convert color values between the HSV and RGB color spaces. The RGB values range from 0 to 255, hue is from 0 to 360, and saturation and value are from 0 to 1. See also
|
PROCEDURE al_rgb_to_hsv (r, g, b: LONGINT; VAR h, s, v: SINGLE); INLINE; |
|
Convert color values between the HSV and RGB color spaces. The RGB values range from 0 to 255, hue is from 0 to 360, and saturation and value are from 0 to 1. See also
|
PROCEDURE al_set_color (idx: LONGINT; p: AL_RGBptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color'; |
|
Sets the specified palette entry to the specified |
PROCEDURE al_set_palette (p: AL_PALETTE); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_palette'; |
|
Sets the entire palette of 256 colors. You should provide an array of 256 RGB structures. Unlike |
PROCEDURE al_set_palette_range (p: AL_PALETTE; from, ato, vsync: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_palette_range'; |
|
Sets the palette entries between |
PROCEDURE al_get_color (idx: LONGINT; p: AL_RGBptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color'; |
|
Retrieves the specified palette entry. |
PROCEDURE al_get_palette (p: AL_PALETTEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_palette'; |
|
Retrieves the entire palette of 256 colors. You should provide a |
PROCEDURE al_get_palette_range (p: AL_PALETTEptr; from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_palette_range'; |
|
Retrieves the palette entries between |
PROCEDURE al_fade_interpolate (source, dest: AL_PALETTE; aoutput: AL_PALETTEptr; apos, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_interpolate'; |
|
Calculates a temporary palette part way between |
PROCEDURE al_fade_from_range (source, dest: AL_PALETTE; speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_from_range'; |
|
Gradually fades a part of the palette from the Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_fade_in_range (p: AL_PALETTE; speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_in_range'; |
|
Gradually fades a part of the palette from a black screen to the specified palette. The Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_fade_out_range (speed, from, ato: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_out_range'; |
|
Gradually fades a part of the current palette to the Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_fade_from (source, dest: AL_PALETTE; speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_from'; |
|
Gradually fades from the Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_fade_in (p: AL_PALETTE; speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_in'; |
|
Gradually fades from a black screen to the specified palette. The Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_fade_out (speed: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'fade_out'; |
|
Gradually fades from the current palette to a black screen. The Note that this function will block your game while the fade is in effect, and it won't work right visually if you are not in an 8 bit color depth resolution. |
PROCEDURE al_select_palette (p: AL_PALETTE); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'select_palette'; |
|
Ugly hack for use in various dodgy situations where you need to convert between paletted and truecolor image formats. Sets the internal palette table in the same way as the |
PROCEDURE al_unselect_palette; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unselect_palette'; |
|
Restores the palette tables that were in use before the last call to |
PROCEDURE al_generate_332_palette (p: AL_PALETTEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'generate_332_palette'; |
|
Constructs a fake truecolor palette, using three bits for red and green and two for the blue. The |
FUNCTION al_bestfit_color (pal: AL_PALETTE; r, g, b: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'bestfit_color'; |
|
Searches the specified palette for the closest match to the requested color, which are specified in the VGA hardware 0-63 format. Normally you should call Returnsthe index of the palette for the closest match to the requested color. |
PROCEDURE al_create_rgb_table (table: AL_RGB_MAPptr; pal: AL_PALETTE; callback: AL_INT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_rgb_table'; |
|
Fills the specified RGB mapping table with lookup data for the specified palette. If the |
FUNCTION al_create_bitmap (w, h: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_bitmap'; |
|
Creates a memory bitmap sized Returnsa pointer to the created bitmap, or |
FUNCTION al_create_bitmap_ex (bpp, width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_bitmap_ex'; |
|
Creates a bitmap in a specific color depth (8, 15, 16, 24 or 32 bits per pixel). Returnsa pointer to the created bitmap, or See also
|
FUNCTION al_create_sub_bitmap (parent: AL_BITMAPptr; x, y, w, h: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_sub_bitmap'; |
|
Creates a sub-bitmap, ie. a bitmap sharing drawing memory with a pre-existing bitmap, but possibly with a different size and clipping settings. When creating a sub-bitmap of the mode-X screen, the x position must be a multiple of four. The sub-bitmap width and height can extend beyond the right and bottom edges of the parent (they will be clipped), but the origin point must lie within the parent region. Remember to free the sub bitmap before freeing the parent bitmap to avoid memory leaks and potential crashes accessing memory which has been freed. Returnsa pointer to the created sub bitmap, or |
FUNCTION al_create_video_bitmap (width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_video_bitmap'; |
|
Allocates a video memory bitmap of the specified size. This can be used to allocate offscreen video memory for storing source graphics ready for a hardware accelerated blitting operation, or to create multiple video memory pages which can then be displayed by calling Warning: video memory bitmaps are usually allocated from the same space as the screen bitmap, so they may overlap with it; it is therefore not a good idea to use the global screen at the same time as any surfaces returned by this function. Remember to destroy this bitmap before any subsequent call to Returnsa pointer to the bitmap on success, or |
FUNCTION al_create_system_bitmap (width, height: LONGINT): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_system_bitmap'; |
|
Allocates a system memory bitmap of the specified size. Read the introduction of this chapter for a comparison with other types of bitmaps and other specific details. Remember to destroy this bitmap before any subsequent call to Returnsa pointer to the bitmap on success, |
PROCEDURE al_destroy_bitmap (bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_bitmap'; |
|
Destroys a memory bitmap, sub-bitmap, video memory bitmap, or system bitmap when you are finished with it. If you pass a The bitmap must not have a mouse cursor shown on it at the time it is destroyed. |
FUNCTION al_bitmap_color_depth (bmp: AL_BITMAPptr): LONGINT; INLINE; |
Returnsthe color depth of the specified bitmap (8, 15, 16, 24, or 32). |
FUNCTION al_bitmap_mask_color (bmp: AL_BITMAPptr): LONGINT; INLINE; |
Returnsthe mask color for the specified bitmap (the value which is skipped when drawing sprites). For 256-color bitmaps this is zero, and for truecolor bitmaps it is bright pink (maximum red and blue, zero green). A frequent use of this function is to clear a bitmap with the mask color so you can later use this bitmap with |
FUNCTION al_is_same_bitmap (bmp1, bmp2: AL_BITMAPptr): BOOLEAN; INLINE; |
Returns
|
FUNCTION al_is_memory_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
Returns
|
FUNCTION al_is_screen_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
Returns
|
FUNCTION al_is_video_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
|
if bmp is the screen bitmap, a video memory bitmap, or a sub-bitmap of either.) Returns
|
FUNCTION al_is_system_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
Returns
|
FUNCTION al_is_sub_bitmap (bmp: AL_BITMAPptr): BOOLEAN; INLINE; |
Returns
|
PROCEDURE al_acquire_bitmap (bmp: AL_BITMAPptr); INLINE; |
|
Acquires the specified video bitmap prior to drawing onto it. You never need to call the function explicitly as it is low level, and will only give you a speed up if you know what you are doing. Using it wrongly may cause slowdown, or even lock up your program. Note: You do never need to use It still can be useful, because e.g. under the current DirectDraw driver of Allegro, most drawing functions need to lock a video bitmap before drawing to it. But doing this is very slow, so you will get much better performance if you acquire the screen just once at the start of your main redraw function, then call multiple drawing operations which need the bitmap locked, and only release it when done. Multiple acquire calls may be nested, but you must make sure to match up the acquire_bitmap and Note that if you are using hardware accelerated VRAM->VRAM functions, you should not call Note: For backwards compatibility, the unlocking behavior of such functions is permanent. That is, if you call There is no clear cross-platform way in this Allegro version to know which drawing operations need a locked/unlocked state. For example a normal rectfill most probably is accelerated under DirectX, and therefore needs the screen unlocked, but an Warning: This function can be very dangerous to use, since the whole program may get locked while the bitmap is locked. So the lock should only be held for a short time, and you should not call anything but drawing operations onto the locked video bitmap while a lock is in place. Especially don't call things like |
PROCEDURE al_release_bitmap (bmp: AL_BITMAPptr); INLINE; |
|
Releases a bitmap that was previously locked by calling |
FUNCTION al_generate_optimized_palette (image: AL_BITMAPptr; pal: AL_PALETTEptr; rsvdcols: ARRAY OF BYTE): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'generate_optimized_palette'; |
|
Generates a 256-color palette suitable for making a reduced color version of the specified truecolor image.
Parameters
Returnsthe number of different colors recognised in the provided bitmap, zero if the bitmap is not a truecolor image or there wasn't enough memory to perform the operation, and negative if there was any internal error in the color reduction code. |
FUNCTION al_load_bitmap (filename: STRING; pal: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bitmap'; |
|
Loads a bitmap from a file. The palette data will be stored in the second parameter, which should be an If the file contains a truecolor image, you must set the video mode or call The Example: VAR bmp: AL_BITMAPptr; palette: AL_PALETTE; ... bmp := al_load_bitmap ('image.pcx', @palette); IF bmp = NIL THEN abort_on_error ('Couldn''t load image.pcx!
See also
|
FUNCTION al_load_bmp (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bmp'; |
|
Loads an 8-bit, 16-bit, 24-bit or 32-bit Windows or OS/2 BMP file. Remember that you are responsible for destroying the bitmap when you are finished with it to avoid memory leaks. Returnsa pointer to the bitmap or See also
|
FUNCTION al_load_lbm (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_lbm'; |
|
Loads a 256-color IFF ILBM/PBM file. Remember that you are responsible for destroying the bitmap when you are finished with it to avoid memory leaks. Returnsa pointer to the bitmap or See also
|
FUNCTION al_load_pcx (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_pcx'; |
|
Loads a 256-color or 24-bit truecolor PCX file. Remember that you are responsible for destroying the bitmap when you are finished with it to avoid memory leaks. Returnsa pointer to the bitmap or See also
|
FUNCTION al_load_tga (filename: STRING; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_tga'; |
|
Loads a 256-color, 15-bit hicolor, 24-bit truecolor, or 32-bit truecolor+alpha TGA file. Remember that you are responsible for destroying the bitmap when you are finished with it to avoid memory leaks. Returnsa pointer to the bitmap or See also
|
FUNCTION al_save_bitmap (filename: STRING; bmp: AL_BITMAPptr; pal: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_bitmap'; |
|
Writes a bitmap into a file, using the specified palette, which should be an Two things to watch out for: on some video cards it may be faster to copy the screen to a memory bitmap and save the latter, and if you use this to dump the screen into a file you may end up with an image much larger than you were expecting, because Allegro often creates virtual screens larger than the visible screen. You can get around this by using a sub-bitmap to specify which part of the screen to save, eg: VAR bmp: AL_BITMAPptr; palette: AL_PALETTE; ... al_get_palette (@palette); bmp := al_create_sub_bitmap (al_screen, 0, 0, AL_SCREEN_W, AL_SCREEN_H); al_save_bitmap ('dump.pcx', bmp, @palette); al_destroy_bitmap (bmp); |
FUNCTION al_save_bmp (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_bmp'; |
|
Writes a bitmap into a 256-color or 24-bit truecolor BMP file. Returnsnon-zero on error. See also
|
FUNCTION al_save_pcx (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_pcx'; |
|
Writes a bitmap into a 256-color or 24-bit truecolor PCX file. Returnsnon-zero on error. See also
|
FUNCTION al_save_tga (filename: STRING; palette: AL_PALETTEptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'save_tga'; |
|
Writes a bitmap into a 256-color, 15-bit hicolor, 24-bit truecolor, or 32-bit truecolor+alpha TGA file. Returnsnon-zero on error. See also
|
FUNCTION al_install_mouse: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'install_mouse'; |
|
Installs the Allegro mouse handler. You must do this before using any other mouse functions. Returns-1 on failure, zero if the mouse handler is already installed (in which case this function does nothing) or the number of buttons on the mouse if the mouse handler has successfully been installed (ie. this is the first time a handler is installed or you have removed the previous one). Note that the number of mouse buttons returned by this function is more an indication than a physical reality. With most devices there is no way of telling how many buttons there are, and any user can override the number of mouse buttons returned by this function with a custom configuration file and the variable |
PROCEDURE al_remove_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_mouse'; |
|
Removes the mouse handler. You don't normally need to bother calling this, because |
FUNCTION al_poll_mouse: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'poll_mouse'; |
|
Wherever possible, Allegro will read the mouse input asynchronously (ie. from inside an interrupt handler), but on some platforms that may not be possible, in which case you must call this routine at regular intervals to update the mouse state variables. To help you test your mouse polling code even if you are programming on a platform that doesn't require it, after the first time that you call this function Allegro will switch into polling mode, so from that point onwards you will have to call this routine in order to get any mouse input at all, regardless of whether the current driver actually needs to be polled or not. Returnszero on success, or a negative number on failure (ie. no mouse driver installed). |
FUNCTION al_mouse_needs_poll: BOOLEAN; INLINE; |
|
Returns |
PROCEDURE al_enable_hardware_cursor; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'enable_hardware_cursor'; |
|
After calling this function, Allegro will let the operating system draw the mouse cursor instead of doing it itself. This is not possible with all graphics drivers though: you'll need to check the |
PROCEDURE al_disable_hardware_cursor; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'disable_hardware_cursor'; |
|
After calling this function, Allegro will be responsible for drawing the mouse cursor rather than the operating system. On some platforms calling |
PROCEDURE al_select_mouse_cursor (cursor: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'select_mouse_cursor'; |
|
This function allows you to use the operating system's native mouse cursors rather than some custom cursor. You will need to enable this functionality by calling Note that the effects of this function are not apparent until To know whether the operating system's native cursor is being used, or if Allegro has made a substitution, you can check the The cursor argument selects the type of cursor to be displayed: |
PROCEDURE al_set_mouse_cursor_bitmap (cursor: LONGINT; bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_cursor_bitmap'; |
|
This function changes the cursor image Allegro uses if The effect of this function will not be apparent until
Parameters
|
PROCEDURE al_show_mouse (bmp: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'show_mouse'; |
|
Tells Allegro to display a mouse pointer on the screen. This will only work if the timer module has been installed. The mouse pointer will be drawn onto the specified bitmap, which should normally be Warning: if you draw anything onto the screen while the pointer is visible, a mouse movement interrupt could occur in the middle of your drawing operation. If this happens the mouse buffering and graphics drawing code will get confused and will leave 'mouse droppings' all over the screen. To prevent this, you must make sure you turn off the mouse pointer whenever you draw onto the screen. This is not needed if you are using a hardware cursor. Note: you must not be showing a mouse pointer on a bitmap at the time that the bitmap is destroyed with |
PROCEDURE al_set_mouse_sprite (sprite: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_sprite'; |
|
You don't like Allegro's mouse pointer? No problem. Use this function to supply an alternative of your own. If you change the pointer and then want to get Allegro's lovely arrow back again, call As a bonus, |
PROCEDURE al_set_mouse_sprite_focus (x, y: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mouse_sprite_focus'; |
|
The mouse focus is the bit of the pointer that represents the actual mouse position, ie. the ( |
PROCEDURE al_position_mouse (x, y: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse'; |
|
Moves the mouse to the specified screen position. It is safe to call even when a mouse pointer is being displayed. |
PROCEDURE al_position_mouse_z (z: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse_z'; |
|
Sets the mouse wheel position variable to the specified value. |
PROCEDURE al_position_mouse_w (w: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'position_mouse_w'; |
|
Sets the horizontal mouse wheel position variable to the specified value. |
PROCEDURE al_get_mouse_mickeys (VAR mickeyx, mickeyy: LONGINT); INLINE; |
|
Measures how far the mouse has moved since the last call to this function. The values of Note that the infinite movement may not work in windowed mode, since under some platforms the mouse would leave the window, and may not work at all if the hardware cursor is in use. |
PROCEDURE al_scare_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scare_mouse'; |
|
Helper for hiding the mouse pointer prior to a drawing operation. This will temporarily get rid of the pointer, but only if that is really required (ie. the mouse is visible, and is displayed on the physical screen rather than some other memory surface, and it is not a hardware or OS cursor). The previous mouse state is stored for subsequent calls to |
PROCEDURE al_scare_mouse_area (x, y, w, h: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'scare_mouse_area'; |
|
Like |
PROCEDURE al_unscare_mouse; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unscare_mouse'; |
|
Undoes the effect of a previous call to |
FUNCTION al_show_os_cursor (cursor: LONGINT): BOOLEAN; INLINE; |
|
In case you do not need Allegro's mouse cursor API, which automatically emulates a cursor in software if no other cursor is available, you can use this low level function to try to display or hide the system cursor directly. The cursor parameter takes the same values as The most common use for this function is to just call it once at the beginning of the program to tell it to display the system cursor inside the Allegro window. The return value can be used to see if this succeeded or not. On some systems (e.g. DirectX fullscreen) this is not supported and the function will always fail, and in other cases only some of the cursors will work, or in the case of You never should use Returns
|
PROCEDURE al_set_color_depth (depth: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color_depth'; |
|
Sets the pixel format to be used by subsequent calls to Note that the screen color depth won't change until the next successful call to |
FUNCTION al_get_color_depth: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color_depth'; |
|
Returns the current pixel format. This can be very useful to know in order to write generic functions which select a different code path internally depending on the color depth being used. Note that the function returns whatever value you may have set previously with |
PROCEDURE al_set_color_conversion (mode: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_color_conversion'; |
|
Specifies how to convert images between the various color depths when reading graphics from external bitmap files or datafiles. The mode is a bitmask specifying which types of conversion are allowed. If the appropriate bit is set, data will be converted into the current pixel format (selected by calling the
AL_COLORCONV_NONE // disable all format
// conversions
AL_COLORCONV_8_TO_15 // expand 8-bit to 15-bit
AL_COLORCONV_8_TO_16 // expand 8-bit to 16-bit
AL_COLORCONV_8_TO_24 // expand 8-bit to 24-bit
AL_COLORCONV_8_TO_32 // expand 8-bit to 32-bit
AL_COLORCONV_15_TO_8 // reduce 15-bit to 8-bit
AL_COLORCONV_15_TO_16 // expand 15-bit to 16-bit
AL_COLORCONV_15_TO_24 // expand 15-bit to 24-bit
AL_COLORCONV_15_TO_32 // expand 15-bit to 32-bit
AL_COLORCONV_16_TO_8 // reduce 16-bit to 8-bit
AL_COLORCONV_16_TO_15 // reduce 16-bit to 15-bit
AL_COLORCONV_16_TO_24 // expand 16-bit to 24-bit
AL_COLORCONV_16_TO_32 // expand 16-bit to 32-bit
AL_COLORCONV_24_TO_8 // reduce 24-bit to 8-bit
AL_COLORCONV_24_TO_15 // reduce 24-bit to 15-bit
AL_COLORCONV_24_TO_16 // reduce 24-bit to 16-bit
AL_COLORCONV_24_TO_32 // expand 24-bit to 32-bit
AL_COLORCONV_32_TO_8 // reduce 32-bit RGB to 8-bit
AL_COLORCONV_32_TO_15 // reduce 32-bit RGB to 15-bit
AL_COLORCONV_32_TO_16 // reduce 32-bit RGB to 16-bit
AL_COLORCONV_32_TO_24 // reduce 32-bit RGB to 24-bit
AL_COLORCONV_32A_TO_8 // reduce 32-bit RGBA to 8-bit
AL_COLORCONV_32A_TO_15 // reduce 32-bit RGBA to 15-bit
AL_COLORCONV_32A_TO_16 // reduce 32-bit RGBA to 16-bit
AL_COLORCONV_32A_TO_24 // reduce 32-bit RGBA to 24-bit
AL_COLORCONV_DITHER_PAL // dither when reducing to 8-bit
AL_COLORCONV_DITHER_HI // dither when reducing to
// hicolor
AL_COLORCONV_KEEP_TRANS // keep original transparency
For convenience, the following macros can be used to select common combinations of these flags:
AL_COLORCONV_EXPAND_256 // expand 256-color to hi/truecolor
AL_COLORCONV_REDUCE_TO_256 // reduce hi/truecolor to 256-color
AL_COLORCONV_EXPAND_15_TO_16 // expand 15-bit hicolor to 16-bit
AL_COLORCONV_REDUCE_16_TO_15 // reduce 16-bit hicolor to 15-bit
AL_COLORCONV_EXPAND_HI_TO_TRUE // expand 15/16-bit to 24/32-bit
AL_COLORCONV_REDUCE_TRUE_TO_HI // reduce 24/32-bit to 15/16-bit
AL_COLORCONV_24_EQUALS_32 // convert between 24- and 32-bit
AL_COLORCONV_TOTAL // everything to current format
AL_COLORCONV_PARTIAL // convert 15 <-> 16-bit and
// 24 <-> 32-bit
AL_COLORCONV_MOST // all but hi/truecolor <-> 256
AL_COLORCONV_DITHER // dither during all color reductions
AL_COLORCONV_KEEP_ALPHA // convert everything to current format
// unless it would lose alpha information
If you enable the If you intend using converted bitmaps with functions like |
FUNCTION al_get_color_conversion: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_color_conversion'; |
|
Returns the current color conversion mode. See also
|
FUNCTION al_set_gfx_mode (card, w, h, v_w, v_h: LONGINT): BOOLEAN; |
|
Switches into graphics mode. The card parameter should usually be one of the Allegro magic drivers (read introduction of this unit) or see the platform specific documentation for a list of the available drivers. The The When you call Currently, using a big virtual screen for page flipping is considered bad practice. There are platforms which don't support virtual screens bigger than the physical screen but can create different video pages to flip back and forth. This means that, if you want page flipping and aren't going to use hardware scrolling, you should call After you select a graphics mode, the physical and virtual screen sizes can be checked with the variables Returns
|
PROCEDURE al_acquire_screen; INLINE; |
|
Shortcut version of See also
|
PROCEDURE al_release_screen; INLINE; |
|
Shortcut version of See also
|
FUNCTION al_show_video_bitmap (bmp: AL_BITMAPptr): LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'show_video_bitmap'; |
|
Attempts to page flip the hardware screen to display the specified video bitmap object, which must be the same size as the physical screen, and should have been obtained by calling the Allegro will handle any necessary vertical retrace synchronisation when page flipping, so you don't need to call Returnszero on success and non-zero on failure. |
PROCEDURE al_vsync; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'vsync'; |
|
Waits for a vertical retrace to begin. The retrace happens when the electron beam in your monitor has reached the bottom of the screen and is moving back to the top ready for another scan. During this short period the graphics card isn't sending any data to the monitor, so you can do things to it that aren't possible at other times, such as altering the palette without causing flickering (snow). Allegro will automatically wait for a retrace before altering the palette or doing any hardware scrolling, though, so you don't normally need to bother with this function. |
PROCEDURE al_set_clip_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_clip_rect'; |
|
Each bitmap has an associated clipping rectangle, which is the area of the image that it is OK to draw onto. Nothing will be drawn to positions outside this space. This function sets the clipping rectangle for the specified bitmap. Pass the coordinates of the top-left and bottom-right corners of the clipping rectangle in this order; these are both inclusive, i.e. Drawing operations will be performed (at least partially) on the bitmap as long as the first coordinates of its clipping rectangle are not greater than the second coordinates and its intersection with the actual image is non-empty. If either condition is not fulfilled, drawing will be turned off for the bitmap, e.g.: Note that passing "out-of-bitmap" coordinates is allowed, but they are likely to be altered (and so the coordinates returned by |
PROCEDURE al_add_clip_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'add_clip_rect'; |
|
Sets the clipping rectangle of the specified bitmap as the intersection of its current clipping rectangle and the rectangle described by the four coordinates. |
PROCEDURE al_get_clip_rect (bmp: AL_BITMAPptr; VAR x1, y1, x2, y2: LONGINT); |
|
Returns the clipping rectangle for the specified bitmap. |
PROCEDURE al_set_clip_state (bmp: AL_BITMAPptr; state: BOOLEAN); INLINE; |
|
Turns on (if state is |
PROCEDURE al_drawing_mode (mode: LONGINT; pattern: AL_BITMAPptr; x_anchor, y_anchor: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'drawing_mode'; |
|
Sets the graphics drawing mode. This only affects the geometric routines like With the patterned modes, you provide a pattern bitmap which is tiled across the surface of the shape. Allegro stores a pointer to this bitmap rather than copying it, so you must not destroy the bitmap while it is still selected as the pattern. The width and height of the pattern must be powers of two, but they can be different, eg. a 64x16 pattern is fine, but a 17x3 one is not. The pattern is tiled in a grid starting at point |
PROCEDURE al_xor_mode (aOn: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'xor_mode'; |
|
This is a shortcut for toggling xor drawing mode on and off. Calling |
PROCEDURE al_solid_mode; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'solid_mode'; |
|
This is a shortcut for selecting solid drawing mode. It is equivalent to calling |
PROCEDURE al_clear_bitmap (bitmap: AL_BITMAPptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_bitmap'; |
See also
|
PROCEDURE al_clear_to_color (bitmap: AL_BITMAPptr; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'clear_to_color'; |
|
Clears the bitmap to the specified color. See also
|
FUNCTION al_getpixel (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Reads a pixel from point (x, y) in the bitmap. Returns-1 if the point lies outside the bitmap (ignoring the clipping rectangle), otherwise the value of the pixel in the color format of the bitmap. Warning: -1 is also a valid value for pixels contained in 32-bit bitmaps with alpha channel (when R,G,B,A are all equal to 255) so you can't use the test against -1 as a predicate for such bitmaps. In this cases, the only reliable predicate is check if it is inside the bitmap. To extract the individual color components, use the getr() / getg() / getb() / geta() family of functions |
FUNCTION _al_getpixel (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Faster inline version of Returnsthe value of the pixel in 8bpp |
FUNCTION _al_getpixel15 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Faster inline version of Returnsthe value of the pixel in 15bpp |
FUNCTION _al_getpixel16 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Faster inline version of Returnsthe value of the pixel in 16bpp |
FUNCTION _al_getpixel24 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Faster inline version of Returnsthe value of the pixel in 24bpp |
FUNCTION _al_getpixel32 (bmp: AL_BITMAPptr; x, y: LONGINT): LONGINT; INLINE; |
|
Faster inline version of Returnsthe value of the pixel in 32bpp |
PROCEDURE al_putpixel (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Writes a pixel to the specified position in the bitmap, using the current drawing mode and the bitmap's clipping rectangle. |
PROCEDURE _al_putpixel (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Like the regular |
PROCEDURE _al_putpixel15 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Like the regular |
PROCEDURE _al_putpixel16 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Like the regular |
PROCEDURE _al_putpixel24 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Like the regular |
PROCEDURE _al_putpixel32 (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Like the regular |
PROCEDURE al_vline (bmp: AL_BITMAPptr; x, y1, y2, color: LONGINT); INLINE; |
|
Draws a vertical line onto the bitmap, from point (x, y1) to (x, y2). |
PROCEDURE al_hline (bmp: AL_BITMAPptr; x1, y, x2, color: LONGINT); INLINE; |
|
Draws a horizontal line onto the bitmap, from point (x1, y) to (x2, y). |
PROCEDURE al_line (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
|
Draws a line onto the bitmap, from point (x1, y1) to (x2, y2). . See also
|
PROCEDURE al_fastline (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
|
Faster version of the previous function. Note that pixel correctness is not guaranteed for this function. See also |
PROCEDURE al_rect (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
|
Draws an outline rectangle with the two points as its opposite corners. |
PROCEDURE al_rectfill (bmp: AL_BITMAPptr; x1, y1, x2, y2, color: LONGINT); INLINE; |
|
Draws a solid, filled rectangle with the two points as its opposite corners. |
PROCEDURE al_circle (bmp: AL_BITMAPptr; x, y, r, color: LONGINT); INLINE; |
|
Draws a circle with the specified centre and radius. See also
|
PROCEDURE al_circlefill (bmp: AL_BITMAPptr; x, y, r, color: LONGINT); INLINE; |
|
Draws a filled circle with the specified centre and radius. See also
|
PROCEDURE al_ellipse (bmp: AL_BITMAPptr; x, y, rx, ry, color: LONGINT); INLINE; |
|
Draws an ellipse with the specified centre and radius. See also
|
PROCEDURE al_ellipsefill (bmp: AL_BITMAPptr; x, y, rx, ry, color: LONGINT); INLINE; |
|
Draws a filled ellipse with the specified centre and radius. See also
|
PROCEDURE al_arc (bmp: AL_BITMAPptr; x, y: LONGINT; ang1, ang2: AL_FIXED; r, color: LONGINT); INLINE; |
|
Draws a circular arc. Draws a circular arc with centre x, y and radius r, in an anticlockwise direction starting from the angle a1 and ending when it reaches a2. These values are specified in 16.16 fixed point format, with 256 equal to a full circle, 64 a right angle, etc. Zero is to the right of the centre point, and larger values rotate anticlockwise from there. See also |
PROCEDURE al_floodfill (bmp: AL_BITMAPptr; x, y, color: LONGINT); INLINE; |
|
Floodfills an enclosed area, starting at point (x, y), with the specified color. |
PROCEDURE al_polygon (bmp: AL_BITMAPptr; vertices: LONGINT; CONST points: ARRAY OF LONGINT; color: LONGINT); INLINE; |
|
Draws a filled polygon with an arbitrary number of corners. Pass the number of vertices and an array containing a series of x, y points (a total of vertices*2 values). See also
|
PROCEDURE al_triangle (bmp: AL_BITMAPptr; x1, y1, x2, y2, x3, y3, color: LONGINT); INLINE; |
|
Draws a filled triangle between the three points. See also
|
PROCEDURE al_spline (bmp: AL_BITMAPptr; CONST points: ARRAY OF LONGINT; color: LONGINT); INLINE; |
|
Draws a Bezier spline using the four control points specified in the points array. Read the description of al_calc_spline for information on how to build the points array. See also
|
PROCEDURE al_do_line (bmp: AL_BITMAPptr; x1, y1, x2, y2, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_line'; |
|
Calculates all the points along a line from point (x1, y1) to (x2, y2), calling the supplied function for each one. This will be passed a copy of the bmp parameter, the x and y position, and a copy of the d parameter, so it is suitable for use with al_putpixel. Example: PROCEDURE DrawDustParticle (bmp: AL_BITMAPptr; x, y, d: LONGINT); CDECL; BEGIN ... END; al_do_line (al_screen, 0, 0, AL_SCREEN_W-1, AL_SCREEN_H-2, DustStrength, @DrawDustParticle);
See also
|
PROCEDURE al_do_circle (bmp: AL_BITMAPptr; x, y, radius, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_circle'; |
|
Calculates all the points in a circle around point (x, y) with radius r, calling the supplied function for each one. This will be passed a copy of the bmp parameter, the x and y position, and a copy of the d parameter, so it is suitable for use with al_putpixel. Example: PROCEDURE DrawExplosionRing (bmp: AL_BITMAPptr; x, y, d: LONGINT); CDECL; BEGIN ... END; al_do_circle (al_screen, AL_SCREEN_W DIV 2, AL_SCREEN_H DIV 2, AL_SCREEN_H DIV 16, FlameColor, @DrawExplosionRing);
See also
|
PROCEDURE al_do_ellipse (bmp: AL_BITMAPptr; x, y, rx, ry, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_ellipse'; |
|
Calculates all the points in an ellipse around point (x, y) with radius rx and ry, calling the supplied function for each one. This will be passed a copy of the bmp parameter, the x and y position, and a copy of the d parameter, so it is suitable for use with al_putpixel. Example: PROCEDURE DrawExplosionRing (bmp: AL_BITMAPptr; x, y, d: LONGINT); CDECL; BEGIN ... END; al_do_ellipse (al_screen, AL_SCREEN_W DIV 2, AL_SCREEN_H DIV 2, AL_SCREEN_H DIV 16, FlameColor, @DrawExplosionRing);
See also
|
PROCEDURE al_do_arc (bmp: AL_BITMAPptr; x, y: LONGINT; ang1, ang2: AL_FIXED; r, d: LONGINT; proc: AL_POINT_PROC); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'do_arc'; |
|
Calculates all the points in a circular arc around point (x, y) with radius r, calling the supplied function for each one. This will be passed a copy of the bmp parameter, the x and y position, and a copy of the d parameter, so it is suitable for use with al_putpixel. The arc will be plotted in an anticlockwise direction starting from the angle a1 and ending when it reaches a2. These values are specified in 16.16 fixed point format, with 256 equal to a full circle, 64 a right angle, etc. Zero is to the right of the centre point, and larger values rotate anticlockwise from there. Example: PROCEDURE DrawExplosionRing (bmp: AL_BITMAPptr; x, y, d: LONGINT); CDECL; BEGIN ... END; al_do_arc (al_screen, AL_SCREEN_W DIV 2, AL_SCREEN_H DIV 2, AL_SCREEN_H DIV 16, FlameColor, @DrawExplosionRing);
See also
|
PROCEDURE al_calc_spline (CONST points: ARRAY OF LONGINT; npts: LONGINT; VAR x, y: ARRAY OF LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'calc_spline'; |
|
Calculates a series of npts values along a Bezier spline, storing them in the output x and y arrays. The Bezier curve is specified by the four x/y control points in the points array: points[0] and points[1] contain the coordinates of the first control point, points[2] and points[3] are the second point, etc. Control points 0 and 3 are the ends of the spline, and points 1 and 2 are guides. The curve probably won't pass through points 1 and 2, but they affect the shape of the curve between points 0 and 3 (the lines p0-p1 and p2-p3 are tangents to the spline). The easiest way to think of it is that the curve starts at p0, heading in the direction of p1, but curves round so that it arrives at p3 from the direction of p2. In addition to their role as graphics primitives, spline curves can be useful for constructing smooth paths around a series of control points, as in exspline.pp. See also
|
FUNCTION al_load_font (filename: STRING; palette: AL_PALETTEptr; p: POINTER) : AL_FONTptr; |
|
Loads a font from a file. At present, this supports loading fonts from a GRX format .fnt file, a 8x8 or 8x16 BIOS format .fnt file, a datafile or any bitmap format that can be loaded by If the font contains palette information, then the palette is returned in the second parameter, which should be an array of 256 Note that another way of loading fonts is embedding them into a datafile and using the datafile related functions. Returnsa pointer to the font or |
FUNCTION al_load_bitmap_font (filename: STRING; palette: AL_PALETTEptr; p: POINTER): POINTER; |
|
Tries to grab a font from a bitmap. The bitmap can be in any format that The size of each character is determined by the layout of the image, which should be a rectangular grid containing all the ASCII characters from space (32) up to the tilde (126). The way the characters are separated depends on the color depth of the image file:
Note that in each horizontal row the bounding boxes around the characters should align and have the same height. Probably the easiest way to get to grips with how this works is to load up the `demo.dat' file and export the TITLE_FONT into a PCX file. Have a look at the resulting picture in your paint program: that is the format a font should be in. Take care with high and true color fonts: Allegro will convert these to the current color depth when you load the font. If you try to use a font on a bitmap with a different color depth Allegro will do color conversions on the fly, which will be rather slow. For optimal performance you should set the color depth to the color depth you want to use before loading any fonts.
Returnsa pointer to the font or See also
|
FUNCTION al_grab_font_from_bitmap (bmp: AL_BITMAPptr): AL_FONTptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'grab_font_from_bitmap'; |
|
This function is the work-horse of Returnsa pointer to the font or |
FUNCTION al_is_color_font (f: AL_FONTptr): BOOLEAN; INLINE; |
|
This function checks if the given font is a color font, as opposed to a monochrome font. Returns
|
FUNCTION al_is_mono_font (f: AL_FONTptr): BOOLEAN; INLINE; |
|
This function checks if the given font is a mono font, as opposed to a color font. Returns
|
FUNCTION al_is_compatible_font (f1, f2: AL_FONTptr): BOOLEAN; INLINE; |
|
This function compares the two fonts, which you can use to find out if Allegro is capable of merging them. Returns
|
PROCEDURE al_destroy_font (f: AL_FONTptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_font'; |
|
Frees the memory being used by a font structure. Don't use this on the default global Allegro font or any text routines using it could crash. You should use this only on fonts you have loaded manually after you are done with them, to prevent memory leaks in your program. |
PROCEDURE al_textout_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
|
Writes the string onto the bitmap at given position, using the specified font, foreground color and background color. If the background color is -1, then the text is written transparently. If the foreground color is -1 and a color font is in use, it will be drawn using the colors from the original font bitmap (the one you imported into the grabber program), which allows multicolored text output. For high and true color fonts, the foreground color is ignored and always treated as -1. Parameters
See also
|
PROCEDURE al_textout_centre_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
|
Like See also
|
PROCEDURE al_textout_right_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x, y, color, bg: LONGINT); INLINE; |
|
Like See also
|
PROCEDURE al_textout_justify_ex (bmp: AL_BITMAPptr; f: AL_FONTptr; str: STRING; x1, x2, y, diff, color, bg: LONGINT); INLINE; |
|
Draws justified text within the region See also
|
FUNCTION al_text_length (f: AL_FONTptr; str: STRING): LONGINT; INLINE; |
|
Returns the length (in pixels) of a string in the specified font. |
FUNCTION al_text_height (f: AL_FONTptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'text_height'; |
|
Returns the height (in pixels) of the specified font. |
PROCEDURE al_blit (source, dest: AL_BITMAPptr; source_x, source_y, dest_x, dest_y, width, height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'blit'; |
|
Copies a rectangular area of the source bitmap to the destination bitmap. The You can blit between any parts of any two bitmaps, even if the two memory areas overlap (ie. source and dest are the same, or one is sub-bitmap of the other). You should be aware, however, that a lot of SVGA cards don't provide separate read and write banks, which means that blitting from one part of the screen to another requires the use of a temporary bitmap in memory, and is therefore extremely slow. As a general rule you should avoid blitting from the screen onto itself in SVGA modes. If the Unlike most of the graphics routines, See also
|
PROCEDURE al_stretch_blit (source, dest: AL_BITMAPptr; source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stretch_blit'; |
|
Like |
PROCEDURE al_masked_blit (source, dest: AL_BITMAPptr; source_x, source_y, dest_x, dest_y, width, height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'masked_blit'; |
|
Like If the Warning: if the hardware acceleration flag is not set, |
PROCEDURE al_masked_stretch_blit (source, dest: AL_BITMAPptr; source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'masked_stretch_blit'; |
|
Like |
PROCEDURE al_draw_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
|
Draws a copy of the sprite bitmap onto the destination bitmap at the specified position. This is almost the same as
VAR
SpaceShip: AL_BITMAPptr;
...
al_draw_sprite (al_screen, SpaceShip, x, y);
If the Warning: if the hardware acceleration flag is not set, Although generally not supporting graphics of mixed color depths, as a special case this function can be used to draw 256-color source images onto truecolor destination bitmaps, so you can use palette effects on specific sprites within a truecolor program. See also
|
PROCEDURE al_stretch_sprite (bmp, sprite: AL_BITMAPptr; x, y, w, h: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stretch_sprite'; |
|
Like |
PROCEDURE al_draw_sprite_ex (bmp, sprite: AL_BITMAPptr; x, y, mode, flip: LONGINT); INLINE; |
|
Draws the sprite image onto the destination bitmap using the specified
Parameters
|
PROCEDURE al_draw_sprite_h_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
|
This is like |
PROCEDURE al_draw_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
|
This is like |
PROCEDURE al_draw_sprite_vh_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
|
This is like |
PROCEDURE al_draw_trans_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT); INLINE; |
|
Uses the global VAR global_trans_table: AL_COLOR_MAP; ... al_create_trans_table (@global_trans_table, my_palette, 128, 128, 128, NIL); ... IF al_get_color_depth = 8 al_color_table := @global_trans_table ELSE al_set_trans_blender (128, 128, 128, 128); al_draw_trans_sprite (buffer, ghost_sprite, x, y);
The bitmap and sprite must normally be in the same color depth, but as a special case you can draw 32 bit RGBA format sprites onto any hicolor or truecolor bitmap, as long as you call See also
|
PROCEDURE al_draw_lit_sprite (bmp, sprite: AL_BITMAPptr; x, y, c: LONGINT); INLINE; |
|
In 256-color modes, uses the global
Parameters
See also
|
PROCEDURE al_draw_gouraud_sprite (bmp, sprite: AL_BITMAPptr; x, y, c1, c2, c3, c4: LONGINT); INLINE; |
|
More sophisticated version of See also
|
PROCEDURE al_rotate_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); INLINE; |
|
Draws the sprite image onto the bitmap. It is placed with its top left corner at the specified position, then rotated by the specified angle around its centre. The angle is a fixed point 16.16 number in the same format used by the fixed point trig routines, with 256 equal to a full circle, 64 a right angle, etc. All rotation functions can draw between any two bitmaps, even screen bitmaps or bitmaps of different color depth. Positive increments of the angle will make the sprite rotate clockwise. |
PROCEDURE al_rotate_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_rotate_scaled_sprite (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_rotate_scaled_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); INLINE; |
|
Draws the sprite, similar to |
PROCEDURE al_pivot_sprite (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_pivot_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_pivot_scaled_sprite (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_pivot_scaled_sprite_v_flip (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); INLINE; |
|
Like |
PROCEDURE al_rotate_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_trans'; |
|
Rotates a sprite. Draws the sprite image onto the bitmap. It is placed with its top left corner at the specified position, then rotated by the specified angle around its centre. The angle is a fixed point 16.16 number in the same format used by the fixed point trig routines, with 256 equal to a full circle, 64 a right angle, etc. All rotation functions can draw between any two bitmaps, even screen bitmaps or bitmaps of different color depth. Positive increments of the angle will make the sprite rotate clockwise on the screen, as demonstrated by the Allegro example. See also
|
PROCEDURE al_rotate_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_v_flip_trans'; |
|
Rotates and flips a sprite. Like al_rotate_sprite_trans, but flips the image vertically before rotating it. To flip horizontally, use this routine but add |
PROCEDURE al_rotate_scaled_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_trans'; |
|
Rotates and stretches a sprite. Like al_rotate_sprite_trans, but stretches or shrinks the image at the same time as rotating it. |
PROCEDURE al_rotate_scaled_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_v_flip_trans'; |
|
Rotates and stretches a sprite. Like al_rotate_scaled_sprite_trans, except that it flips the sprite vertically first. |
PROCEDURE al_pivot_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_trans'; |
|
Rotates a sprite around a specified point. Like al_rotate_sprite_trans, but aligns the point in the sprite given by |
PROCEDURE al_pivot_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED); EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_v_flip_trans'; |
|
Rotates and flips a sprite around a specified point. Like al_rotate_sprite_trans, but aligns the point in the sprite given by |
PROCEDURE al_pivot_scaled_sprite_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_trans'; |
|
Rotates and stretches a sprite. Like al_rotate_scaled_sprite_trans, but aligns the point in the sprite given by |
PROCEDURE al_pivot_scaled_sprite_v_flip_trans (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_v_flip_trans'; |
|
Rotates and stretches a sprite. Like al_rotate_scaled_sprite_v_flip_trans, but aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates and scales around this point. |
PROCEDURE al_rotate_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_lit'; |
|
Rotates a sprite. Draws the sprite image onto the bitmap. It is placed with its top left corner at the specified position, then rotated by the specified angle around its centre. The angle is a fixed point 16.16 number in the same format used by the fixed point trig routines, with 256 equal to a full circle, 64 a right angle, etc. All rotation functions can draw between any two bitmaps, even screen bitmaps or bitmaps of different color depth. |
PROCEDURE al_rotate_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_sprite_v_flip_lit'; |
|
Rotates a sprite. Like al_rotate_sprite_lit, but flips the image vertically before rotating it. To flip horizontally, use this routine but add itofix(128) to the angle. To flip in both directions, use al_rotate_sprite and add itofix(128) to its angle. |
PROCEDURE al_rotate_scaled_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_lit'; |
|
Rotates and stretches a sprite. Like al_rotate_sprite_lit, but stretches or shrinks the image at the same time as rotating it. |
PROCEDURE al_rotate_scaled_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rotate_scaled_sprite_v_flip_lit'; |
|
Rotates and stretches a sprite. Draws the sprite, similar to al_rotate_scaled_sprite_lit except that it flips the sprite vertically first. |
PROCEDURE al_pivot_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_lit'; |
|
Rotates a sprite. Like al_rotate_sprite_lit, but aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates around this point. |
PROCEDURE al_pivot_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_sprite_v_flip_lit'; |
|
Rotates a sprite. Like al_rotate_sprite_v_flip_lit, but aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates around this point. |
PROCEDURE al_pivot_scaled_sprite_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_lit'; |
|
Rotates and stretches a sprite. Like al_rotate_scaled_sprite_lit, but aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates and scales around this point. |
PROCEDURE al_pivot_scaled_sprite_v_flip_lit (bmp, sprite: AL_BITMAPptr; x, y, cx, cy: LONGINT; angle, scale: AL_FIXED; color: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pivot_scaled_sprite_v_flip_lit'; |
|
Rotates and stretches a sprite. Like al_rotate_scaled_sprite_v_flip_lit(), but aligns the point in the sprite given by (cx, cy) to (x, y) in the bitmap, then rotates and scales around this point. |
FUNCTION al_get_rle_sprite (bitmap: AL_BITMAPptr): AL_RLE_SPRITEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_rle_sprite'; |
|
Creates an RLE sprite based on the specified bitmap (which must be a memory bitmap). Remember to free this RLE sprite later to avoid memory leaks. Parameters
ReturnsA pointer to the created RLE sprite, or See also
|
PROCEDURE al_destroy_rle_sprite (sprite: AL_RLE_SPRITEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_rle_sprite'; |
|
Destroys an RLE sprite structure previously returned by Parameters
|
PROCEDURE al_draw_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y: LONGINT); INLINE; |
|
Draws an RLE sprite onto a bitmap at the specified position. Parameters
See also
|
PROCEDURE al_draw_trans_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y: LONGINT); INLINE; |
|
Translucent version of Parameters
See also
|
PROCEDURE al_draw_lit_rle_sprite (bmp: AL_BITMAPptr; spr: AL_RLE_SPRITEptr; x, y, color: LONGINT); INLINE; |
|
Tinted version of Parameters
See also
|
PROCEDURE al_reserve_voices (digi_voices, midi_voices: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'reserve_voices'; |
|
Call this function to specify the number of voices that are to be used by the digital and MIDI sound drivers respectively. This must be done before calling |
PROCEDURE al_set_volume_per_voice (scale: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_volume_per_voice'; |
|
By default, Allegro will play a centered sample at half volume on both the left and right channel. A sample panned to the far right or left will be played at maximum volume on that channel only. This is done so you can play a single panned sample without distortion. If you play multiple samples at full volume, the mixing process can result in clipping, a noticeable form of distortion. The more samples, the more likely clipping is to occur, and the more clipping, the worse the output will sound. If clipping is a problem - or if the output is too quiet - this function can be used to adjust the volume of each voice. You should first check that your speakers are at a reasonable volume, Allegro's global volume is at maximum (see Each time you increase the parameter by one, the volume of each voice will halve. For example, if you pass 4, you can play up to 16 centred samples at maximum volume without distortion. If you pass 0 to this function, each centred sample will play at the maximum volume possible without distortion, as will all samples played through a mono driver. Samples at the extreme left and right will distort if played at full volume. If you wish to play panned samples at full volume without distortion, you should pass 1 to this function. Of course this function does not override the volume you specify with It is recommended that you hard-code the parameter into your program, rather than offering it to the user. The user can alter the volume with the configuration file instead, or you can provide for this with |
FUNCTION al_install_sound (digi, midi: LONGINT): BOOLEAN; |
|
Initialises the sound module. You should normally pass failure. If it fails it will store a description of the problem in Returns( |
PROCEDURE al_remove_sound; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'remove_sound'; |
|
Cleans up after you are finished with the sound routines. You don't normally need to call this, because |
PROCEDURE al_set_volume (digi, midi: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_volume'; |
|
Alters the global sound output volume. Specify volumes for both digital samples and MIDI playback, as integers from 0 to 255, or pass a negative value to leave one of the settings unchanged. Values bigger than 255 will be reduced to 255. This routine will not alter the volume of the hardware mixer if it exists (i.e. only your application will be affected). |
PROCEDURE al_set_hardware_volume (digi, midi: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_hardware_volume'; |
|
Alters the hardware sound output volume. Specify volumes for both digital samples and MIDI playback, as integers from 0 to 255, or pass a negative value to leave one of the settings unchanged. Values bigger than 255 will be reduced to 255. This routine will use the hardware mixer to control the volume if it exists (i.e. the volume of all the applications on your machine will be affected), otherwise do nothing. |
PROCEDURE al_get_volume (VAR digi, midi: LONGINT); INLINE; |
|
Retrieves the global sound output volume, both for digital samples and MIDI playback, as integers from 0 to 255. |
PROCEDURE al_get_hardware_volume (VAR digi, midi: LONGINT); INLINE; |
|
Retrieves the hardware sound output volume, both for digital samples and MIDI playback, as integers from 0 to 255, or -1 if the information is not available. |
PROCEDURE al_set_mixer_quality (quality: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'set_mixer_quality'; |
|
Sets the resampling quality of the mixer. Valid values are the same as the |
FUNCTION al_get_mixer_quality: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_quality'; |
|
Returns the current mixing quality, as specified by the |
FUNCTION al_get_mixer_frequency: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_frequency'; |
|
Returns the mixer frequency, in Hz. |
FUNCTION al_get_mixer_bits: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_bits'; |
|
Returns the mixer bit depth (8 or 16). |
FUNCTION al_get_mixer_voices: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_voices'; |
|
Returns the number of voices allocated to the mixer. |
FUNCTION al_get_mixer_buffer_length: LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_mixer_buffer_length'; |
|
Returns the number of samples per channel in the mixer buffer. |
FUNCTION al_load_midi (filename: STRING): AL_MIDIptr; |
|
Loads a MIDI file (handles both format 0 and format 1). Returnsa pointer to a |
PROCEDURE al_destroy_midi (midi: AL_MIDIptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_midi'; |
|
Destroys a |
FUNCTION al_play_midi (midi: AL_MIDIptr; loop: BOOLEAN): BOOLEAN; INLINE; |
|
Starts playing the specified Returns
|
FUNCTION al_play_looped_midi (midi: AL_MIDIptr; loop_start, loop_end: LONGINT): BOOLEAN; INLINE; |
|
Starts playing a MIDI file with a user-defined loop position. When the player reaches the Returns
|
PROCEDURE al_stop_midi; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stop_midi'; |
|
Stops whatever music is currently playing. This is the same thing as calling See also
|
PROCEDURE al_midi_pause; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_pause'; |
|
Pauses the MIDI player. See also
|
PROCEDURE al_midi_resume; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_resume'; |
|
Resumes playback of a paused MIDI file. See also
|
FUNCTION al_midi_seek(target: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_seek'; |
|
Seeks to the given Returnszero if it could successfully seek to the requested position. Otherwise, a return value of 1 means it stopped playing, and |
FUNCTION al_get_midi_length (midi: AL_MIDIptr): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'get_midi_length'; |
|
This function will simulate playing the given MIDI, from start to end, to determine how long it takes to play. After calling this function, Note that any currently playing midi is stopped when you call this function. Usually you would call it before
Returnsthe value of al_midi_time, the length of the midi. See also
|
FUNCTION al_load_midi_patches: BOOLEAN; INLINE; |
|
Forces the MIDI driver to load the entire set of patches ready for use. You will not normally need to call this, because Allegro automatically loads whatever data is required for the current MIDI file, but you must call it before sending any program change messages via the Returns
|
FUNCTION al_load_sample (filename: STRING): AL_SAMPLEptr; |
|
Loads a sample from a file, supporting both mono and stereo WAV and mono VOC files, in 8 or 16-bit formats, as well as formats handled by functions registered using Remember to free this sample later to avoid memory leaks. Returnsa pointer to the |
FUNCTION al_load_wav (filename: STRING): AL_SAMPLEptr; |
|
Loads a sample from a RIFF WAV file. Remember to free this sample later to avoid memory leaks.
Returnsa pointer to the See also
|
FUNCTION al_load_voc (filename: STRING): AL_SAMPLEptr; |
|
Loads a sample from a Creative Labs VOC file. Remember to free this sample later to avoid memory leaks.
Returnsa pointer to the See also
|
FUNCTION al_create_sample (bits, stereo, freq, len: LONGINT): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'create_sample'; |
|
Constructs a new sample structure of the specified type. Remember to free this sample later to avoid memory leaks. Parameters
Returnsa pointer to the created sample, or |
FUNCTION al_save_sample (filename: STRING; spl: AL_SAMPLEptr): BOOLEAN; |
|
Writes a sample into a file. The output format is determined from the Returns
|
PROCEDURE al_destroy_sample (spl: AL_SAMPLEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'destroy_sample'; |
|
Destroys a sample structure when you are done with it. It is safe to call this even when the sample might be playing, because it checks and will kill it off if it is active. Use this to avoid memory leaks in your program. |
FUNCTION al_play_sample (spl: AL_SAMPLEptr; vol, pan, freq, loop: LONGINT): LONGINT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'play_sample'; |
|
Triggers a sample at the specified volume, pan position, and frequency. The parameters Returnsthe voice number that was allocated for the sample or negative if no voices were available. |
PROCEDURE al_adjust_sample (spl: AL_SAMPLEptr; vol, pan, freq, loop: LONGINT); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'adjust_sample'; |
|
Alters the parameters of a sample while it is playing (useful for manipulating looped sounds). You can alter the volume, pan, and frequency, and can also clear the loop flag, which will stop the sample when it next reaches the end of its loop. The values of the parameters are just like those of |
PROCEDURE al_stop_sample (spl: AL_SAMPLEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'stop_sample'; |
|
Stop a sample from playing, which is required if you have set a sample going in looped mode. If there are several copies of the sample playing, it will stop them all. You must still destroy the sample using |
PROCEDURE al_register_sample_file_type (ext: STRING; load: AL_SAMPLE_LOAD_FUNC; save: AL_SAMPLE_SAVE_FUNC); |
|
Informs the FUNCTION LoadMP3 (filename: PCHAR): AL_SAMPLEptr; CDECL; BEGIN ... END; ... al_register_sample_file_type ('mp3', LoadMPT, NIL); |
AL_JOYSTICK_INFOptr = ˆAL_JOYSTICK_INFO; |
|
Pointer to |
AL_RGBptr = ˆAL_RGB; |
|
Pointer to |
AL_PALETTE_DICTptr = ˆAL_PALETTE_DICT; |
|
Pointer to |
AL_PALETTE_DICT = ARRAY [0..255] OF LONGINT; |
|
To be used by |
AL_PALETTEptr = ˆAL_PALETTE; |
|
Pointer to a |
AL_PALETTE = ARRAY [0..AL_PAL_SIZE-1] OF AL_RGB; |
|
Color palette description for indexed modes (8bpp). Remember that color components are 0-63. |
AL_RGB_MAPptr = ˆAL_RGB_MAP; |
|
Pointer to a |
AL_BITMAPptr = ˆAL_BITMAP; |
|
Pointer to |
AL_POINT_PROC = PROCEDURE (bmp: AL_BITMAPptr; x, y, c: LONGINT); CDECL; |
|
This is used to define call-back parameters for some drawing procedures. |
AL_FONTptr = POINTER; |
|
A pointer to a structure holding an Allegro font, usually created beforehand with the grabber tool or Allegro's default font. Read introduction of |
AL_RLE_SPRITEptr = ˆAL_RLE_SPRITE; |
|
Ponter to |
AL_MIDIptr = ˆAL_MIDI; |
|
Pointer to |
AL_MIDI_MSG_CALLBACK_PROC = PROCEDURE (msg, b1, b2: LONGINT); CDECL; |
|
Used by |
AL_SAMPLEptr = ˆAL_SAMPLE; |
|
Pointer to |
AL_SAMPLE_LOAD_FUNC = FUNCTION (filename: PCHAR): AL_SAMPLEptr; CDECL; |
|
Used by |
AL_SAMPLE_SAVE_FUNC = FUNCTION (filename: PCHAR; spl: AL_SAMPLEptr): LONGINT; CDECL; |
AL_SYSTEM_AUTODETECT = 0; |
|
Tells to |
AL_SYSTEM_NONE = $4E4F4E45; |
|
Tells to Is equivalent to |
AL_VERSION = 4; |
|
Defined to the major version of Allegro. From a version number like 4.1.16, this would be defined to the integer 4. |
AL_SUB_VERSION = 4; |
|
Defined to the middle version of Allegro. From a version number like 4.1.16, this would be defined to the integer 1. |
AL_PAS_VERSION = 2; |
|
Defined to the minor version of Allegro.pas. From a version number like 4.1.16, this would be defined to the integer 16. |
AL_PAS_IS_BETA = FALSE; |
|
Defined to TRUE if current version is a BETA version. A BETA version is a test version and may be uncomplete or untested. |
AL_PAS_VERSION_STR = '4.4.2'; |
|
Defined to a text string containing all version numbers and maybe some additional text. |
AL_JOY_TYPE_AUTODETECT = -(1); |
|
To be used at |
AL_JOY_TYPE_NONE = 0; |
AL_MAX_JOYSTICKS = 8; |
|
Maximun number of elements. |
AL_MAX_JOYSTICK_AXIS = 3; |
AL_MAX_JOYSTICK_STICKS = 5; |
AL_MAX_JOYSTICK_BUTTONS = 32; |
AL_JOYFLAG_DIGITAL = 1; |
|
joystick status flags. See also
|
AL_JOYFLAG_ANALOGUE = 2; |
AL_JOYFLAG_CALIB_DIGITAL = 4; |
AL_JOYFLAG_CALIB_ANALOGUE = 8; |
AL_JOYFLAG_CALIBRATE = 16; |
AL_JOYFLAG_SIGNED = 32; |
AL_JOYFLAG_UNSIGNED = 64; |
AL_JOYFLAG_ANALOG = AL_JOYFLAG_ANALOGUE; |
AL_JOYFLAG_CALIB_ANALOG = AL_JOYFLAG_CALIB_ANALOGUE; |
AL_PAL_SIZE = 256; |
|
To know thet palette size. |
AL_MOUSE_CURSOR_NONE = 0; |
|
Indicates that the mouse cursor is the default system cursor, not Allegro's custom cursor. See also
|
AL_MOUSE_CURSOR_ALLEGRO = 1; |
|
Selects the custom Allegro cursor, i.e. the one that you set with See also
|
AL_MOUSE_CURSOR_ARROW = 2; |
|
The operating system default arrow cursor. See also
|
AL_MOUSE_CURSOR_BUSY = 3; |
|
The operating system default `busy' cursor (hourglass). See also
|
AL_MOUSE_CURSOR_QUESTION = 4; |
|
The operating system default `question' cursor (arrow with question mark). See also
|
AL_MOUSE_CURSOR_EDIT = 5; |
|
The operating system default `edit' cursor (vertical bar). See also
|
AL_GFX_TEXT = -1; |
|
Closes any previously opened graphics mode, making you unable to use the global variable |
AL_GFX_AUTODETECT = 0; |
|
Allegro will try to set the specified resolution with the current color depth in fullscreen mode. Failing that, it will try to repeat the same operation in windowed mode. If the call to |
AL_GFX_AUTODETECT_FULLSCREEN = 1; |
|
Allegro will try to set the specified resolution with the current color depth in fullscreen mode. If that is not possible, |
AL_GFX_AUTODETECT_WINDOWED = 2; |
|
Allegro will try to set the specified resolution with the current color depth in a windowed mode. If that is not possible, |
AL_GFX_SAFE = $53414645; |
|
Using this driver Allegro guarantees that a graphic mode will always be set correctly. It will try to select the resolution that you request, and if that fails, it will fall back upon whatever mode is known to be reliable on the current platform (this is 640x480 resolution under Windows, the actual framebuffer's resolution under Linux if it's supported, etc). If it absolutely cannot set any graphics mode at all, it will return negative as usual, meaning that there's no possible video output on the machine, and that you should abort your program immediately, possibly after notifying this to the user with |
AL_GFX_HW_CURSOR = $00000004; |
|
Indicates that a hardware mouse cursor is in use. When this flag is set, it is safe to draw onto the screen without hiding the mouse pointer first. Note that not every cursor graphic can be implemented in hardware: in particular VBE/AF only supports 2-color images up to 32x32 in size, where the second color is an exact inverse of the first. This means that Allegro may need to switch between hardware and software cursors at any point during the execution of your program, so you should not assume that this flag will remain constant for long periods of time. It only tells you whether a hardware cursor is in use at the current time, and may change whenever you hide/redisplay the pointer. |
AL_GFX_HW_HLINE = $00000008; |
|
Indicates that the normal opaque version of the |
AL_GFX_HW_HLINE_XOR = $00000010; |
|
Indicates that the XOR version of the |
AL_GFX_HW_HLINE_SOLID_PATTERN = $00000020; |
|
Indicates that the solid and masked pattern modes of the |
AL_GFX_HW_HLINE_COPY_PATTERN = $00000040; |
|
Indicates that the copy pattern modes of the |
AL_GFX_HW_FILL = $00000080; |
|
Indicates that the opaque version of the |
AL_GFX_HW_FILL_XOR = $00000100; |
|
Indicates that the XOR version of the |
AL_GFX_HW_FILL_SOLID_PATTERN = $00000200; |
|
Indicates that the solid and masked pattern modes of the |
AL_GFX_HW_FILL_COPY_PATTERN = $00000400; |
|
Indicates that the copy pattern mode of the |
AL_GFX_HW_LINE = $00000800; |
|
Indicates that the opaque mode |
AL_GFX_HW_LINE_XOR = $00001000; |
|
Indicates that the XOR version of the |
AL_GFX_HW_GLYPH = $00008000; |
|
Indicates that monochrome character expansion (for text drawing) is implemented using a hardware accelerator. |
AL_GFX_HW_VRAM_BLIT_MASKED = $00020000; |
|
Indicates that the Warning: if this flag is not set, |
AL_GFX_HW_MEM_BLIT = $00040000; |
|
Indicates that blitting from a memory bitmap onto the screen is being accelerated in hardware. |
AL_GFX_HW_MEM_BLIT_MASKED = $00080000; |
|
Indicates that the |
AL_GFX_HW_SYS_TO_VRAM_BLIT = $00100000; |
|
Indicates that blitting from a system bitmap onto the screen is being accelerated in hardware. Note that some acceleration may be present even if this flag is not set, because system bitmaps can benefit from normal memory to screen blitting as well. This flag will only be set if system bitmaps have further acceleration above and beyond what is provided by |
AL_GFX_HW_SYS_TO_VRAM_BLIT_MASKED = $00200000; |
|
Indicates that the |
AL_GFX_SYSTEM_CURSOR = $00400000; |
|
Indicates that the mouse cursor is the default system cursor, not Allegro's custom cursor. |
AL_DRAW_MODE_SOLID = 0; |
|
Flag for The pixels of the bitmap being drawn onto are simply replaced by those produced by the drawing function. |
AL_DRAW_MODE_XOR = 1; |
|
Flag for Pixels are written to the bitmap with an exclusive-or operation rather than a simple copy, so drawing the same shape twice will erase it. Because it involves reading as well as writing the bitmap memory, xor drawing is a lot slower than the normal replace mode. |
AL_DRAW_MODE_COPY_PATTERN = 2; |
|
Flag for Pixels are simply copied from the pattern bitmap onto the destination bitmap. This allows the use of multicolored patterns, and means that the color you pass to the drawing routine is ignored. This is the fastest of the patterned modes. |
AL_DRAW_MODE_SOLID_PATTERN = 3; |
|
Flag for Each pixel in the pattern bitmap is compared with the mask color, which is zero in 256-color modes or bright pink for truecolor data (maximum red and blue, zero green). If the pattern pixel is solid, a pixel of the color you passed to the drawing routine is written to the destination bitmap, otherwise a zero is written. The pattern is thus treated as a monochrome bitmask, which lets you use the same pattern to draw different shapes in different colors, but prevents the use of multicolored patterns. |
AL_DRAW_MODE_MASKED_PATTERN = 4; |
|
Flag for It is almost the same as |
AL_DRAW_MODE_TRANS = 5; |
|
Flag for The global |
AL_DIGI_AUTODETECT = -1; |
|
Identifier to pass to |
AL_DIGI_NONE = 0; |
|
Identifier to pass to |
AL_MIDI_AUTODETECT = -1; |
|
Identifier to pass to |
AL_MIDI_NONE = 0; |
|
Identifier to pass to |
AL_MIDI_DIGMID = $44494749; |
|
Identifier to pass to |
AL_MIDI_VOICES = 64; |
|
Max number of MIDI voices. |
AL_MIDI_TRACKS = 32; |
|
Max number of MIDI tracks. |
al_errno: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_errno'; |
|
Stores the last error number. |
al_error: STRING; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_error'; |
|
Text string used by |
al_id_string: STRING; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_id'; |
|
Text string containing a date and version number for the library, in case you want to display these somewhere. |
AL_U_ASCII: LONGINT; |
|
Fixed size, 8-bit ASCII characters. . See also
|
AL_U_ASCII_CP: LONGINT; |
|
Alternative 8-bit codepage. . See also
|
AL_U_UNICODE: LONGINT; |
|
Fixed size, 16-bit Unicode characters. . See also
|
AL_U_UTF8: LONGINT; |
|
Variable size, UTF-8 format Unicode characters. . See also
|
AL_U_CURRENT: LONGINT; |
|
Current encoding. |
al_retrace_count: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'retrace_count'; |
|
If the retrace simulator is installed, this count is incremented on each vertical retrace; otherwise, if the refresh rate is known, the count is incremented at the same rate (ignoring retraces); otherwise, it is incremented 70 times a second. This provides a way of controlling the speed of your program without installing user timer functions. |
al_key: AL_KEY_LIST; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key'; |
|
Array of flags indicating the state of each key, ordered by scancode. Wherever possible these values will be updated asynchronously, but if IF al_key[AL_KEY_SPACE] <> 0 THEN WriteLn ('Space is pressed');
Note that the array is supposed to represent which keys are physically held down and which keys are not, so it is semantically read-only. These are the keyboard scancodes:
KEY_A ... KEY_Z,
KEY_0 ... KEY_9,
KEY_0_PAD ... KEY_9_PAD,
KEY_F1 ... KEY_F12,
KEY_ESC, KEY_TILDE, KEY_MINUS, KEY_EQUALS,
KEY_BACKSPACE, KEY_TAB, KEY_OPENBRACE, KEY_CLOSEBRACE,
KEY_ENTER, KEY_COLON, KEY_QUOTE, KEY_BACKSLASH,
KEY_BACKSLASH2, KEY_COMMA, KEY_STOP, KEY_SLASH,
KEY_SPACE,
KEY_INSERT, KEY_DEL, KEY_HOME, KEY_END, KEY_PGUP,
KEY_PGDN, KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN,
KEY_SLASH_PAD, KEY_ASTERISK, KEY_MINUS_PAD,
KEY_PLUS_PAD, KEY_DEL_PAD, KEY_ENTER_PAD,
KEY_PRTSCR, KEY_PAUSE,
KEY_ABNT_C1, KEY_YEN, KEY_KANA, KEY_CONVERT, KEY_NOCONVERT,
KEY_AT, KEY_CIRCUMFLEX, KEY_COLON2, KEY_KANJI,
KEY_LSHIFT, KEY_RSHIFT,
KEY_LCONTROL, KEY_RCONTROL,
KEY_ALT, KEY_ALTGR,
KEY_LWIN, KEY_RWIN, KEY_MENU,
KEY_SCRLOCK, KEY_NUMLOCK, KEY_CAPSLOCK
KEY_EQUALS_PAD, KEY_BACKQUOTE, KEY_SEMICOLON, KEY_COMMAND
Finally, you may notice an `odd' behaviour of the |
al_key_shifts: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key_shifts'; |
|
Bitmask containing the current state of
KB_SHIFT_FLAG
KB_CTRL_FLAG
KB_ALT_FLAG
KB_LWIN_FLAG
KB_RWIN_FLAG
KB_MENU_FLAG
KB_COMMAND_FLAG
KB_SCROLOCK_FLAG
KB_NUMLOCK_FLAG
KB_CAPSLOCK_FLAG
KB_INALTSEQ_FLAG
KB_ACCENT1_FLAG
KB_ACCENT2_FLAG
KB_ACCENT3_FLAG
KB_ACCENT4_FLAG
|
al_three_finger_flag: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'three_finger_flag'; |
|
The DJGPP keyboard handler provides an 'emergency exit' sequence which you can use to kill off your program. If you are running under DOS this is the three finger salute, ctrl+alt+del. Most multitasking OS's will trap this combination before it reaches the Allegro handler, in which case you can use the alternative ctrl+alt+end. If you want to disable this behaviour in release versions of your program, set this flag to |
al_key_led_flag: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'key_led_flag'; |
|
By default, the capslock, numlock, and scroll-lock keys toggle the keyboard LED indicators when they are pressed. If you are using these keys for input in your game (eg. capslock to fire) this may not be desirable, so you can set this flag to zero and prevent the LED's being updated. |
al_keyboard_lowlevel_callback: AL_INT_PROC; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'keyboard_lowlevel_callback'; |
|
If set, this function is called by the keyboard handler in response to every keyboard event, both presses (including keyboard repeat rate) and releases. It will be passed a raw keyboard scancode byte (scancodes are 7 bits long), with the top bit (8th bit) clear if the key has been pressed or set if it was released. This routine executes in an interrupt context, so it must be used carefully and only if needed. |
al_joy: AL_JOYSTICK_INFO_LIST; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'joy'; |
|
Global array of joystick state information, which is updated by the
A single joystick may provide several different stick inputs, but you can safely assume that the first element in the stick array will always be the main directional controller. Information about each of the stick axis is stored in the Note for people who spell funny: in case you don't like having to type (analogue), there are some aliases in this unit that will allow you to write analog instead. See also
|
al_num_joysticks: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'num_joysticks'; |
|
Global variable containing the number of active joystick devices. The current drivers support a maximum of eight controllers. |
al_palette_color: AL_PALETTE_DICTptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'palette_color'; |
|
Table mapping palette index colors (0-255) into whatever pixel format is being used by the current display mode. In a 256-color mode this just maps onto the array index. In truecolor modes it looks up the specified entry in the current palette, and converts that RGB value into the appropriate packed pixel format. See also
|
al_black_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'black_palette'; |
|
A palette containing solid black colors, used by the fade routines. |
al_desktop_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'desktop_palette'; |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|
The palette used by the Atari ST low resolution desktop. I'm not quite sure why this is still here, except that the original grabber and test programs use it. It is probably the only Atari legacy code left in Allegro, and it would be a shame to remove it :-) The contents of this palette are 16 colors repeated 16 times. Color entry zero is equal to color entry 16, which is equal to color entry 32, etc.
|
al_default_palette: AL_PALETTE; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'default_palette'; |
|
The default IBM BIOS palette. This will be automatically selected whenever you set a new graphics mode. The palette contains 16 basic colors plus many gradients between them. If you want to see the values, you can write a small Allegro program which saves a screenshot with this palette, or open the grabber tool provided with Allegro and create a new palette object, which will use this palette by default. |
al_rgb_table: AL_RGB_MAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'rgb_map'; |
|
To speed up reducing RGB values to 8-bit paletted colors, Allegro uses a 32k lookup table (5 bits for each color component). You must set up this table before using the gouraud shading routines, and if present the table will also vastly accelerate the |
al_mouse_x: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_x'; |
|
Global variable containing the current mouse horizontal position. Wherever possible these values will be updated asynchronously, but if The position is integer ranging from zero to the right side of the screen. |
al_mouse_y: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_y'; |
|
Global variable containing the current mouse vertical position. Wherever possible these values will be updated asynchronously, but if The position is integer ranging from zero to the bottom side of the screen. |
al_mouse_z: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_z'; |
|
Global variable containing the current mouse position. Wherever possible these values will be updated asynchronously, but if It holds the current vertical wheel position, when using an input driver that supports wheel mice. |
al_mouse_w: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_w'; |
|
Global variable containing the current mouse position. Wherever possible these values will be updated asynchronously, but if It holds the current horizontal wheel position, when using an input driver that supports wheel mice. |
al_mouse_b: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_b'; |
|
Global variable containing the current mouse button state. Wherever possible these values will be updated asynchronously, but if It is a bitfield indicating the state of each button: bit 0 is the left button, bit 1 the right, and bit 2 the middle button. Additional non standard mouse buttons might be available as higher bits in this variable. Usage example: IF (al_mouse_b AND 1) <> 0 THEN WriteLn ('Left button is pressed'); IF (al_mouse_b AND 2) = 0 THEN WriteLn ('Right button is not pressed'); |
al_mouse_pos: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_pos'; |
|
Global variable containing the current mouse position. Wherever possible these values will be updated asynchronously, but if It has the current X coordinate in the upper 16 bits and the Y in the lower 16 bits. This may be useful in tight polling loops where a mouse interrupt could occur between your reading of the two separate variables, since you can copy this value into a local variable with a single instruction and then split it up at your leisure. Example: VAR mpos, mx, my: LONGINT; ... mpos := al_mouse_pos; mx := mpos SHR 16; my := mpos AND $0000ffff; |
al_mouse_sprite: AL_BITMAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_sprite'; |
|
Global variable containing the current mouse sprite. This is read-only, and only to be modified using the |
al_mouse_x_focus: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_x_focus'; |
|
Global variable containing the current mouse focus point. This is read-only, and only to be modified using the |
al_mouse_y_focus: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'mouse_y_focus'; |
|
Global variable containing the current mouse focus point. This is read-only, and only to be modified using the |
al_screen: AL_BITMAPptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'screen'; |
|
Screen bitmap |
AL_SCREEN_W: LONGINT; |
|
Screen size. |
AL_SCREEN_H: LONGINT; |
|
Screen size. |
AL_VIRTUAL_W: LONGINT; |
|
Screen size. |
AL_VIRTUAL_H: LONGINT; |
|
Screen size. |
al_font: AL_FONTptr; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'font'; |
|
A simple 8x8 fixed size font (the mode 13h BIOS default). This font contains the standard ASCII (U+20 to U+7F), Latin-1 (U+A1 to U+FF), and Latin Extended-A (U+0100 to U+017F) character ranges. |
al_404_char: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'allegro_404_char'; |
|
When Allegro cannot find a glyph it needs in a font, it will instead output the character given in this variable. By default, this is set to the caret symbol, |
al_midi_loop_start: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_loop_start'; |
|
The loop start and end points, set by the |
al_midi_loop_end: LONGINT; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_loop_end'; |
al_midi_msg_callback: AL_MIDI_MSG_CALLBACK_PROC; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'midi_msg_callback'; |
|
Hook function allowing you to intercept MIDI player events. If set to anything other than See also
|