ports/devel/asfml/files/patch-examples_pong_pong.adb
Alastair Hogge 0e5cb2d39a devel/asfml: New port: Ada bindings to the Simple and Fast Multimedia Library (SFML)
ASFML is an Ada semi-thick binding to SFML. The library uses Ada types,
and portable defined types, which eliminates the inclusion of Ada
interface libraries, however most of the functions are directly
imported.

Website: https://mgrojo.github.io/ASFML/

Differential Revision:	https://reviews.freebsd.org/D42151
2023-10-21 22:35:00 +02:00

20 lines
1,020 B
Ada

--- examples/pong/pong.adb.orig 2023-10-21 00:38:34 UTC
+++ examples/pong/pong.adb
@@ -42,7 +42,7 @@ begin
Reset (Gen);
Win := RenderWindow.Create(mode => (GameWidth, GameHeight, 32), title => "Ada SFML Pong");
RenderWindow.SetVerticalSyncEnabled(Win, sfTrue);
- BallSoundBuffer := SoundBuffer.CreateFromFile("ping_pong_8bit_beeep.ogg");
+ BallSoundBuffer := SoundBuffer.CreateFromFile("%%DATA_AUDIO%%ping_pong_8bit_beeep.ogg");
BallSound := Sound.Create;
Sound.SetBuffer(BallSound, BallSoundBuffer);
LeftPaddle := RectangleShape.Create;
@@ -65,7 +65,7 @@ begin
CircleShape.setOutlineColor (Ball, Color.sfBlack);
CircleShape.setFillColor (Ball, Color.sfWhite);
CircleShape.setOrigin (Ball, (0.5 * BallRadius, 0.5 * BallRadius));
- GameFont := Font.CreateFromFile("../renderwindow/aerial.ttf");
+ GameFont := Font.CreateFromFile("%%DATA_FONTS%%aerial.ttf");
GameMessage := Text.Create;
Text.setFont (GameMessage, GameFont);
Text.setCharacterSize (GameMessage, 30);