blob: 145038111daea941e90d48aab0e1b61cc001e293 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
with SDL;
-- 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;
-- game: T_Game;
window: SDL.Video.Windows.Window;
renderer: SDL.Video.Renderers.Renderer;
end record;
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;
|