From acfbdcefdbc60e97a9e3447afed204b3e40d991e Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 7 Dec 2019 16:59:17 +0100 Subject: Basic Graphics package --- graphics.ads | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'graphics.ads') diff --git a/graphics.ads b/graphics.ads index 78a4542..1450381 100644 --- a/graphics.ads +++ b/graphics.ads @@ -1,17 +1,38 @@ with SDL; -with Game; +-- with Game; +-- use Game; +with SDL.Video.Windows.Makers; +use SDL.Video.Windows.Makers; + +with SDL.Video.Renderers.Makers; +use SDL.Video.Renderers.Makers; + +with SDL.Video.Renderers; +use SDL.Video.Renderers; + +with SDL.Video.Windows; +use SDL.Video.Windows; package Graphics is + WINDOW_TITLE: constant String := "Snake"; + WINDOW_X: constant SDL.Natural_Coordinate := 10; + WINDOW_Y: constant SDL.Natural_Coordinate := 10; + WINDOW_WIDTH: constant SDL.Positive_Dimension := 400; + WINDOW_HEIGHT: constant SDL.Positive_Dimension := 400; + type T_State is record running: Boolean; - window: SDL.Window; - renderer: SDL.Renderer; - game: T_Game; + -- game: T_Game; + window: SDL.Video.Windows.Window; + renderer: SDL.Video.Renderers.Renderer; end record; - procedure EventHandler( - + procedure Init(state: out T_State); + procedure Quit(state: T_State); + procedure Run(state: in out T_State); + procedure Event_Handler(state: in out T_State); + procedure Update(state: T_State); end Graphics; -- cgit