aboutsummaryrefslogtreecommitdiff
path: root/graphics.ads
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-12-07 16:59:17 +0100
committerCharles <sircharlesaze@gmail.com>2019-12-07 16:59:17 +0100
commitacfbdcefdbc60e97a9e3447afed204b3e40d991e (patch)
tree8bd7db838cb47a39f985fd6a5be163fbe65a7a48 /graphics.ads
parent9b47ade2394becce870d195f198c235b3275ed34 (diff)
downloadsnake-acfbdcefdbc60e97a9e3447afed204b3e40d991e.tar.gz
snake-acfbdcefdbc60e97a9e3447afed204b3e40d991e.tar.bz2
snake-acfbdcefdbc60e97a9e3447afed204b3e40d991e.zip
Basic Graphics package
Diffstat (limited to 'graphics.ads')
-rw-r--r--graphics.ads33
1 files changed, 27 insertions, 6 deletions
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;