X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Flib%2Fallegro4%2Fallegro.pas;h=0560035d927097633e50020754300fea258a49ca;hb=23c3f9ee3fc3837cd1d0380496a2e1b0f87833d8;hp=388b54a1aaf0f1709d5a82d0a3803d0238a13008;hpb=79a05da7687cb1fa00c62f031639d6933a321051;p=d2df-sdl.git diff --git a/src/lib/allegro4/allegro.pas b/src/lib/allegro4/allegro.pas index 388b54a..0560035 100644 --- a/src/lib/allegro4/allegro.pas +++ b/src/lib/allegro4/allegro.pas @@ -230,6 +230,45 @@ interface 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; @@ -237,11 +276,17 @@ interface 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; @@ -253,6 +298,8 @@ interface 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; @@ -310,6 +357,35 @@ interface 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;