index 6f4456f765baee8527637e933cbbe9eac3cd8741..0560035d927097633e50020754300fea258a49ca 100644 (file)
mode: PGFX_MODE;
end;
+ PGFX_DRIVER_T = ^GFX_DRIVER_T;
+ GFX_DRIVER_T = record
+ id: cint;
+ name: PChar;
+ desc: PChar;
+ ascii_name: PChar;
+
+ init: Pointer;
+ exit: Pointer;
+ scroll: Pointer;
+ vsync: Pointer;
+ set_palette: Pointer;
+ request_scroll: Pointer;
+ poll_scroll: Pointer;
+ enable_triple_buffer: Pointer;
+ create_video_bitmap: Pointer;
+ destroy_video_bitmap: Pointer;
+ show_video_bitmap: Pointer;
+ request_video_bitmap: Pointer;
+ create_system_bitmap: Pointer;
+ destroy_system_bitmap: Pointer;
+ set_mouse_sprite: Pointer;
+ show_mouse: Pointer;
+ hide_mouse: Pointer;
+ move_mouse: Pointer;
+ drawing_mode: Pointer;
+ save_video_state: Pointer;
+ restore_video_state: Pointer;
+ set_blender_mode: Pointer;
+ fetch_mode_list: function (): PGFX_MODE_LIST; cdecl;
+ w, h: cint;
+ linear: cint;
+ bank_size: clong;
+ bank_gran: clong;
+ vid_mem: clong;
+ vid_phys_base: clong;
+ windowed: cint;
+ end;
+
RGB = record
r, g, b, filler: cuchar;
end;
PALETTE = array [0..PAL_SIZE - 1] of RGB;
PPALETTE = ^PALETTE;
+ COLOR_MAP_T = record
+ data: array [0..PAL_SIZE - 1, 0..PAL_SIZE - 1] of cuchar;
+ end;
+ PCOLOR_MAP_T = ^COLOR_MAP_T;
+
KeyboardCallback = procedure (scancode: cint); LibraryLibAllegroDecl;
AtExitCallback = procedure; LibraryLibAllegroDecl;
AtExitFunction = function (func: AtExitCallback): cint; LibraryLibAllegroDecl;
TimerIntCallback = procedure; LibraryLibAllegroDecl;
QuitCallback = procedure; LibraryLibAllegroDecl;
+ CreateTableCallback = procedure (pos: cint); LibraryLibAllegroDecl;
var
allegro_id: array [0..ALLEGRO_ERROR_SIZE] of char; LibraryLibAllegroVar;
desktop_palette: PALETTE; LibraryLibAllegroVar;
default_palette: PALETTE; LibraryLibAllegroVar;
_current_palette: PALETTE; LibraryLibAllegroVar;
+ key_shifts: cint; LibraryLibAllegroVar;
+ color_map: PCOLOR_MAP_T; LibraryLibAllegroVar;
+ gfx_driver: PGFX_DRIVER_T; LibraryLibAllegroVar;
function get_desktop_resolution (width, height: Pcint): cint; LibraryLibAllegroImp;
function get_gfx_mode_list (card: cint): PGFX_MODE_LIST; LibraryLibAllegroImp;
// function _install_allegro (system_id: cint; errno_prt: Pcint; AtExitFunction): cint; LibraryLibAllegroImp;
+ procedure acquire_bitmap (bmp: PBITMAP); LibraryLibAllegroImp;
+ procedure release_bitmap (bmp: PBITMAP); LibraryLibAllegroImp;
+ procedure acquire_screen; LibraryLibAllegroImp;
+ procedure release_screen; LibraryLibAllegroImp;
+
+ procedure rotate_sprite (bmp, sprite: PBITMAP; x, y: cint; a: cint32); LibraryLibAllegroImp;
+ procedure rotate_sprite_v_flip (bmp, sprite: PBITMAP; x, y: cint; a: cint32); LibraryLibAllegroImp;
+
+ function scancode_to_ascii (scancode: cint): cint; LibraryLibAllegroImp;
+ function scancode_to_name (scancode: cint): PChar; LibraryLibAllegroImp;
+
+ procedure drawing_mode (mode: cint; pattern: PBITMAP; x_anchor, y_anchor: cint); LibraryLibAllegroImp;
+
+ procedure set_trans_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_alpha_blender; LibraryLibAllegroImp;
+ procedure set_write_alpha_blender; LibraryLibAllegroImp;
+ procedure set_add_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_burn_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_color_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_difference_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_dissolve_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_dodge_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_hue_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_invert_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_luminance_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_multiply_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_saturation_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+ procedure set_screen_blender (r, g, b, a: cint); LibraryLibAllegroImp;
+
+ function getr (col: cint): cint; LibraryLibAllegroImp;
+ function getg (col: cint): cint; LibraryLibAllegroImp;
+ function getb (col: cint): cint; LibraryLibAllegroImp;
+ function geta (col: cint): cint; LibraryLibAllegroImp;
+
+ procedure create_light_table (table: PCOLOR_MAP_T; const pal: PALETTE; r, g, b: cint; callback: CreateTableCallback); LibraryLibAllegroImp;
+ procedure create_trans_table (table: PCOLOR_MAP_T; const pal: PALETTE; r, g, b: cint; callback: CreateTableCallback); LibraryLibAllegroImp;
+
+ procedure vsync; LibraryLibAllegroImp;
+ function desktop_color_depth: cint; LibraryLibAllegroImp;
+
(* MACRO *)
function install_allegro (system_id: cint; errno_ptr: Pcint; atexit_ptr: AtExitFunction): cint; inline;
function allegro_init: cint; inline;
function BPS_TO_TIMER (x: clong): clong; inline;
function BPM_TO_TIMER (x: clong): clong; inline;
-(*
- function acquire_bitmap (bmp: PBITMAP); inline;
- function release_bitmap (bmp: PBITMAP); inline;
- function acquire_screen; inline;
- function release_screen; inline;
-*)
-
- procedure acquire_bitmap (bmp: PBITMAP); LibraryLibAllegroImp;
- procedure release_bitmap (bmp: PBITMAP); LibraryLibAllegroImp;
- procedure acquire_screen; LibraryLibAllegroImp;
- procedure release_screen; LibraryLibAllegroImp;
implementation