Gamebit/src/gamebit-sprites.ads

31 lines
826 B
Ada

with HAL.Bitmap;
with Gamebit;
package Gamebit.Sprites is
type Direction is (Left, Right, Up, Down);
type Bird is new Gamebit.Sprite with private;
function Height (B : in Bird) return Positive;
function Width (B : in Bird) return Positive;
function Position (B : in Bird) return Point;
procedure Set_Position (B : in out Bird; Origin : in Point);
procedure Tick (B : in out Bird);
procedure Set_Framebuffer (B : in out Bird; Buffer : in HAL.Bitmap.Any_Bitmap_Buffer);
private
type Bird is new Gamebit.Sprite with record
Buffer : HAL.Bitmap.Any_Bitmap_Buffer;
Alive : Boolean := True;
Trajectory : Direction := Left;
Color : HAL.Bitmap.Bitmap_Color := HAL.Bitmap.Blue;
X : Natural;
Y : Natural;
end record;
end Gamebit.Sprites;