|
|
@@ -17,6 +17,8 @@ package ray is |
|
|
|
for logical'size use 32; |
|
|
|
for colour_range'size use 8; |
|
|
|
|
|
|
|
type pixels is array (natural range <>) of colour_range; |
|
|
|
|
|
|
|
type window_flag is ( |
|
|
|
flag_none, |
|
|
|
flag_fullscreen_mode, |
|
|
@@ -71,6 +73,7 @@ package ray is |
|
|
|
type colour is record r, g, b, a : colour_range; end record with convention => c_pass_by_copy; |
|
|
|
type rectangle is record x ,y, width, height : float; end record with convention => c_pass_by_copy; |
|
|
|
type texture is record id : natural; width, height, mipmaps, format : integer; end record with convention => c_pass_by_copy; |
|
|
|
type image is record data : access pixels; width, height, mipmaps : integer; format : integer := 7; end record with convention => c_pass_by_copy; |
|
|
|
type font is record base, count, pad : integer; data : texture; squares : pointer; glyphs : pointer; end record with convention => c_pass_by_copy; |
|
|
|
type stream is record buffer, processor : pointer; rate, size, channels : natural; end record with convention => c_pass_by_copy; |
|
|
|
type sound is record data : stream; frame : natural; end record with convention => c_pass_by_copy; |
|
|
@@ -120,6 +123,13 @@ package ray is |
|
|
|
procedure unload_sound (data : in sound) with import => true, convention => c, external_name => "UnloadSound"; |
|
|
|
procedure unload_font (data : in font) with import => true, convention => c, external_name => "UnloadFont"; |
|
|
|
|
|
|
|
function image_colour (width, height : in integer; tint : in colour) return image with import => true, convention => c, external_name => "GenImageColor"; |
|
|
|
|
|
|
|
procedure image_clear_background (data : in out image; tint : in colour) with import => true, convention => c, external_name => "ImageClearBackground"; |
|
|
|
|
|
|
|
function dump_image (data : in image; file_path : in string) return integer with import => true, convention => c, external_name => "ExportImage"; |
|
|
|
|
|
|
|
|
|
|
|
procedure draw_line (x0, y0, x1, y1 : in integer; tint : in colour) with import => true, convention => c, external_name => "DrawLine"; |
|
|
|
procedure draw_rectangle (x, y, width, height : in integer; tint : in colour) with import => true, convention => c, external_name => "DrawRectangle"; |
|
|
|
|
|
|
|