1. with Allegro.Bitmaps;                   use Allegro.Bitmaps; 
  2. with Allegro.Fixed_Point_Math;          use Allegro.Fixed_Point_Math; 
  3. with Allegro.Truecolor;                 use Allegro.Truecolor; 
  4.  
  5. package Allegro.Sprites is 
  6.  
  7.     -- Allegro 4.2.2 - Blitting and Sprites 
  8.     -- This package is complete 
  9.  
  10.     procedure Blit( source, 
  11.                     dest     : not null A_Bitmap; 
  12.                     source_x, 
  13.                     source_y, 
  14.                     dest_x, 
  15.                     dest_y   : Integer; 
  16.                     width, 
  17.                     height   : Natural ); 
  18.  
  19.     procedure Draw_Character_Ex( bmp, 
  20.                                  sprite : not null A_Bitmap; 
  21.                                  x, y   : Integer; 
  22.                                  color, 
  23.                                  bg     : Color_Type ); 
  24.  
  25.     procedure Draw_Gouraud_Sprite( bmp, 
  26.                                    sprite         : not null A_Bitmap; 
  27.                                    x, y, 
  28.                                    c1, c2, c3, c4 : Color_Type ); 
  29.  
  30.     procedure Draw_Lit_Sprite( bmp, 
  31.                                sprite : not null A_Bitmap; 
  32.                                x, y   : Integer; 
  33.                                color  : Color_Type ); 
  34.  
  35.     procedure Draw_Sprite( bmp, sprite : not null A_Bitmap; x, y : Integer ); 
  36.  
  37.     procedure Draw_Sprite_H_Flip( bmp, sprite : not null A_Bitmap; x, y : Integer ); 
  38.  
  39.     procedure Draw_Sprite_V_Flip( bmp, sprite : not null A_Bitmap; x, y : Integer ); 
  40.  
  41.     procedure Draw_Sprite_VH_Flip( bmp, sprite : not null A_Bitmap; x, y : Integer ); 
  42.  
  43.     procedure Draw_Trans_Sprite( bmp, sprite : not null A_Bitmap; x, y : Integer ); 
  44.  
  45.     procedure Masked_Blit( source, 
  46.                            dest     : not null A_Bitmap; 
  47.                            source_x, 
  48.                            source_y, 
  49.                            dest_x, 
  50.                            dest_y   : Integer; 
  51.                            width, 
  52.                            height   : Natural ); 
  53.  
  54.     procedure Masked_Stretch_Blit( source, 
  55.                                    dest     : not null A_Bitmap; 
  56.                                    source_x, 
  57.                                    source_y : Integer; 
  58.                                    source_w, 
  59.                                    source_h : Natural; 
  60.                                    dest_x, 
  61.                                    dest_y   : Integer; 
  62.                                    dest_w, 
  63.                                    dest_h   : Natural ); 
  64.  
  65.     procedure Pivot_Scaled_Sprite( bmp, 
  66.                                    sprite : not null A_Bitmap; 
  67.                                    x, y, 
  68.                                    cx, cy : Integer; 
  69.                                    angle, 
  70.                                    scale  : Fixed ); 
  71.  
  72.     procedure Pivot_Scaled_Sprite_V_Flip( bmp, 
  73.                                           sprite : not null A_Bitmap; 
  74.                                           x, y, 
  75.                                           cx, cy : Integer; 
  76.                                           angle, 
  77.                                           scale  : Fixed ); 
  78.  
  79.     procedure Pivot_Sprite( bmp, 
  80.                             sprite : not null A_Bitmap; 
  81.                             x, y, 
  82.                             cx, cy : Integer; 
  83.                             angle  : Fixed ); 
  84.  
  85.     procedure Pivot_Sprite_V_Flip( bmp, 
  86.                                    sprite : not null A_Bitmap; 
  87.                                    x, y, 
  88.                                    cx, cy : Integer; 
  89.                                    angle  : Fixed ); 
  90.  
  91.     procedure Rotate_Scaled_Sprite( bmp, 
  92.                                     sprite : not null A_Bitmap; 
  93.                                     x, y   : Integer; 
  94.                                     angle, 
  95.                                     scale  : Fixed ); 
  96.  
  97.     procedure Rotate_Scaled_Sprite_V_Flip( bmp, 
  98.                                            sprite : not null A_Bitmap; 
  99.                                            x, y   : Integer; 
  100.                                            angle, 
  101.                                            scale  : Fixed ); 
  102.  
  103.     procedure Rotate_Sprite( bmp, 
  104.                              sprite : not null A_Bitmap; 
  105.                              x, y   : Integer; 
  106.                              angle  : Fixed ); 
  107.  
  108.     procedure Rotate_Sprite_V_Flip( bmp, 
  109.                                     sprite : not null A_Bitmap; 
  110.                                     x, y   : Integer; 
  111.                                     angle  : Fixed ); 
  112.  
  113.     procedure Stretch_Blit( source, 
  114.                             dest          : not null A_Bitmap; 
  115.                             source_x, 
  116.                             source_y      : Integer; 
  117.                             source_width, 
  118.                             source_height : Natural; 
  119.                             dest_x, 
  120.                             dest_y        : Integer; 
  121.                             dest_width, 
  122.                             dest_height   : Natural ); 
  123.  
  124.     procedure Stretch_Sprite( bmp, 
  125.                               sprite : not null A_Bitmap; 
  126.                               x, y   : Integer; 
  127.                               w, h   : Natural ); 
  128.  
  129. private 
  130.  
  131.     pragma Import( C, Blit, "blit" ); 
  132.     pragma Import( C, Draw_Character_Ex, "draw_character_ex" ); 
  133.     pragma Import( C, Draw_Gouraud_Sprite, "draw_gouraud_sprite" ); 
  134.     pragma Import( C, Draw_Lit_Sprite, "draw_lit_sprite" ); 
  135.     pragma Import( C, Draw_Sprite, "draw_sprite" ); 
  136.     pragma Import( C, Draw_Sprite_H_Flip, "draw_sprite_h_flip" ); 
  137.     pragma Import( C, Draw_Sprite_V_Flip, "draw_sprite_v_flip" ); 
  138.     pragma Import( C, Draw_Sprite_VH_Flip, "draw_sprite_vh_flip" ); 
  139.     pragma Import( C, Draw_Trans_Sprite, "draw_trans_sprite" ); 
  140.     pragma Import( C, Masked_Blit, "masked_blit" ); 
  141.     pragma Import( C, Masked_Stretch_Blit, "masked_stretch_blit" ); 
  142.     pragma Import( C, Pivot_Scaled_Sprite, "pivot_scaled_sprite" ); 
  143.     pragma Import( C, Pivot_Scaled_Sprite_V_Flip, "pivot_scaled_sprite_v_flip" ); 
  144.     pragma Import( C, Pivot_Sprite, "pivot_sprite" ); 
  145.     pragma Import( C, Pivot_Sprite_V_Flip, "pivot_sprite_v_flip" ); 
  146.     pragma Import( C, Rotate_Scaled_Sprite, "rotate_scaled_sprite" ); 
  147.     pragma Import( C, Rotate_Scaled_Sprite_V_Flip, "rotate_scaled_sprite_v_flip" ); 
  148.     pragma Import( C, Rotate_Sprite, "rotate_sprite" ); 
  149.     pragma Import( C, Rotate_Sprite_V_Flip, "rotate_sprite_v_flip" ); 
  150.     pragma Import( C, Stretch_Blit, "stretch_blit" ); 
  151.     pragma Import( C, Stretch_Sprite, "stretch_sprite" ); 
  152.  
  153. end Allegro.Sprites;