blob: 09ff6e87d8061781362834d53a244289ad38d1b8 (
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
|
with Sf;
with Sf.Graphics;
with Sf.Graphics.Image;
with Sf.Graphics.RenderWindow;
with Sf.Graphics.Sprite;
with Sf.Graphics.Texture;
package Video is
use Sf;
use Sf.Graphics;
Width : constant := 64;
Height : constant := 32;
Scale : constant := 10;
Title : constant String := "Ada-Chip";
procedure Clear_Screen;
procedure Initialize;
function Is_Running return Boolean;
procedure Display;
function Toggle_Pixel (X, Y : sfUint32) return Boolean;
procedure Finish;
private
Pixels : constant sfImage_Ptr := Image.create (Width, Height);
Pixels_Sprite : constant sfSprite_Ptr := Sprite.create;
Pixels_Texture : constant sfTexture_Ptr :=
Texture.createFromImage (Pixels);
app : constant sfRenderWindow_Ptr := RenderWindow.create
((Width * Scale, Height * Scale, 32), Title);
end Video;
|